Class: Bundler::GemInstaller
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/bundler/installer/gem_installer.rb |
Class Method Summary
Instance Attribute Summary
- #force readonly
- #installer readonly
- #spec readonly
- #standalone readonly
- #worker readonly
Instance Method Summary
- #install_from_spec
- #failure_message private
- #generate_executable_stubs private
- #install private
- #install_error_message private
- #install_with_settings private
- #out_of_space_message private
- #spec_settings private
- #specific_failure_message(e) private
Constructor Details
.new(spec, installer, standalone = false, worker = 0, force = false) ⇒ GemInstaller
# 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 (readonly)
[ GitHub ]# File 'lib/bundler/installer/gem_installer.rb', line 5
attr_reader :spec, :standalone, :worker, :force, :installer
#installer (readonly)
[ GitHub ]# File 'lib/bundler/installer/gem_installer.rb', line 5
attr_reader :spec, :standalone, :worker, :force, :installer
#spec (readonly)
[ GitHub ]# File 'lib/bundler/installer/gem_installer.rb', line 5
attr_reader :spec, :standalone, :worker, :force, :installer
#standalone (readonly)
[ GitHub ]#worker (readonly)
[ GitHub ]# File 'lib/bundler/installer/gem_installer.rb', line 5
attr_reader :spec, :standalone, :worker, :force, :installer
Instance Method Details
#failure_message (private)
[ GitHub ]# File 'lib/bundler/installer/gem_installer.rb', line 37
def end
#generate_executable_stubs (private)
[ GitHub ]# File 'lib/bundler/installer/gem_installer.rb', line 66
def generate_executable_stubs return if Bundler.feature_flag. return if Bundler.settings[:inline] if Bundler.settings[:bin] && standalone installer.generate_standalone_bundler_executable_stubs(spec) elsif Bundler.settings[:bin] installer.generate_bundler_executable_stubs(spec, :force => true) end end
#install (private)
[ GitHub ]# File 'lib/bundler/installer/gem_installer.rb', line 53
def install spec.source.install(spec, :force => force, :ensure_builtin_gems_cached => standalone, :build_args => Array(spec_settings)) end
#install_error_message (private)
[ GitHub ]#install_from_spec
[ GitHub ]# File 'lib/bundler/installer/gem_installer.rb', line 15
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, Bundler::APIResponseMismatchError raise rescue Errno::ENOSPC return false, rescue Bundler::BundlerError, Gem::InstallError, Bundler::APIResponseInvalidDependenciesError => e return false, (e) end
#install_with_settings (private)
[ GitHub ]# File 'lib/bundler/installer/gem_installer.rb', line 57
def install_with_settings # Build arguments are global, so this is mutexed Bundler.rubygems.install_with_build_args([spec_settings]) { install } end
#out_of_space_message (private)
[ GitHub ]# File 'lib/bundler/installer/gem_installer.rb', line 62
def "#{}\nYour disk is out of space. Free some space to be able to install your bundle." end