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.
9 10 11 12 13 14 15 |
# File 'lib/bundler/installer/gem_installer.rb', line 9 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.
7 8 9 |
# File 'lib/bundler/installer/gem_installer.rb', line 7 def force @force end |
#installer ⇒ Object (readonly)
Returns the value of attribute installer.
7 8 9 |
# File 'lib/bundler/installer/gem_installer.rb', line 7 def installer @installer end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
7 8 9 |
# File 'lib/bundler/installer/gem_installer.rb', line 7 def spec @spec end |
#standalone ⇒ Object (readonly)
Returns the value of attribute standalone.
7 8 9 |
# File 'lib/bundler/installer/gem_installer.rb', line 7 def standalone @standalone end |
#worker ⇒ Object (readonly)
Returns the value of attribute worker.
7 8 9 |
# File 'lib/bundler/installer/gem_installer.rb', line 7 def worker @worker end |
Instance Method Details
#install_from_spec ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bundler/installer/gem_installer.rb', line 17 def install_from_spec = spec_settings ? install_with_settings : install Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}" generate_executable_stubs return true, rescue Bundler::InstallHookError, Bundler::SecurityError, APIResponseMismatchError raise rescue Errno::ENOSPC return false, rescue StandardError => e return false, (e) end |