Class: Bundler::GemInstaller
- Inherits:
-
Object
- Object
- Bundler::GemInstaller
- Defined in:
- lib/bundler/installer/gem_installer.rb
Instance Attribute Summary collapse
-
#force ⇒ Object
readonly
Returns the value of attribute force.
-
#installer ⇒ Object
readonly
Returns the value of attribute installer.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
-
#standalone ⇒ Object
readonly
Returns the value of attribute standalone.
-
#worker ⇒ Object
readonly
Returns the value of attribute worker.
Instance Method Summary collapse
-
#initialize(spec, installer, standalone = false, worker = 0, force = false) ⇒ GemInstaller
constructor
A new instance of GemInstaller.
- #install_from_spec ⇒ Object
Constructor Details
#initialize(spec, installer, standalone = false, worker = 0, force = false) ⇒ GemInstaller
Returns a new instance of GemInstaller.
7 8 9 10 11 12 13 |
# File 'lib/bundler/installer/gem_installer.rb', line 7 def initialize(spec, installer, standalone = false, worker = 0, force = false) @spec = spec @installer = installer @standalone = standalone @worker = worker @force = force end |
Instance Attribute Details
#force ⇒ Object (readonly)
Returns the value of attribute force.
5 6 7 |
# File 'lib/bundler/installer/gem_installer.rb', line 5 def force @force end |
#installer ⇒ Object (readonly)
Returns the value of attribute installer.
5 6 7 |
# File 'lib/bundler/installer/gem_installer.rb', line 5 def installer @installer end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
5 6 7 |
# File 'lib/bundler/installer/gem_installer.rb', line 5 def spec @spec end |
#standalone ⇒ Object (readonly)
Returns the value of attribute standalone.
5 6 7 |
# File 'lib/bundler/installer/gem_installer.rb', line 5 def standalone @standalone end |
#worker ⇒ Object (readonly)
Returns the value of attribute worker.
5 6 7 |
# File 'lib/bundler/installer/gem_installer.rb', line 5 def worker @worker end |
Instance Method Details
#install_from_spec ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/bundler/installer/gem_installer.rb', line 15 def install_from_spec = install Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}" generate_executable_stubs [true, ] rescue Bundler::InstallHookError, Bundler::SecurityError, Bundler::APIResponseMismatchError, Bundler::InsecureInstallPathError raise rescue Errno::ENOSPC [false, ] rescue Bundler::BundlerError, Gem::InstallError => e [false, (e)] end |