Class: Gem::Installer
- Inherits:
-
Object
- Object
- Gem::Installer
- Defined in:
- lib/rubygems/install_ban_plugin.rb
Overview
bouncy hacks bevhavior can be overridden using –force
Instance Method Summary collapse
- #ensure_dependency(spec, dependency) ⇒ Object
- #installation_satisfies_dependency?(dependency) ⇒ Boolean
- #old_ensure_dependency ⇒ Object
- #old_installation_satisfies_dependency? ⇒ Object
Instance Method Details
#ensure_dependency(spec, dependency) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/rubygems/install_ban_plugin.rb', line 15 def ensure_dependency(spec, dependency) unless @force gem_name = dependency.name.split('gem')[1] raise Gem::InstallError, "#{spec.name} attempted installation of banned gem #{gem_name}" if Gem::Ban.banned?(gem_name) end old_ensure_dependency(spec, dependency) end |
#installation_satisfies_dependency?(dependency) ⇒ Boolean
10 11 12 |
# File 'lib/rubygems/install_ban_plugin.rb', line 10 def installation_satisfies_dependency?(dependency) (@force || Gem::Ban.banned?(gem_name = dependency.name.split('gem')[1])) && old_installation_satisfies_dependency?(dependency) end |
#old_ensure_dependency ⇒ Object
14 |
# File 'lib/rubygems/install_ban_plugin.rb', line 14 alias :old_ensure_dependency :ensure_dependency |
#old_installation_satisfies_dependency? ⇒ Object
9 |
# File 'lib/rubygems/install_ban_plugin.rb', line 9 alias :old_installation_satisfies_dependency? :installation_satisfies_dependency? |