diff options
Diffstat (limited to 'lib/bundler/installer/gem_installer.rb')
-rw-r--r-- | lib/bundler/installer/gem_installer.rb | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/bundler/installer/gem_installer.rb b/lib/bundler/installer/gem_installer.rb index 9a013eea4d..1da91857bd 100644 --- a/lib/bundler/installer/gem_installer.rb +++ b/lib/bundler/installer/gem_installer.rb @@ -2,27 +2,28 @@ module Bundler class GemInstaller - attr_reader :spec, :standalone, :worker, :force, :installer + attr_reader :spec, :standalone, :worker, :force, :local, :installer - def initialize(spec, installer, standalone = false, worker = 0, force = false) + def initialize(spec, installer, standalone = false, worker = 0, force = false, local = false) @spec = spec @installer = installer @standalone = standalone @worker = worker @force = force + @local = local end def install_from_spec post_install_message = install Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}" generate_executable_stubs - return true, post_install_message - rescue Bundler::InstallHookError, Bundler::SecurityError, Bundler::APIResponseMismatchError + [true, post_install_message] + rescue Bundler::InstallHookError, Bundler::SecurityError, Bundler::APIResponseMismatchError, Bundler::InsecureInstallPathError raise rescue Errno::ENOSPC - return false, out_of_space_message - rescue Bundler::BundlerError, Gem::InstallError, Bundler::APIResponseInvalidDependenciesError => e - return false, specific_failure_message(e) + [false, out_of_space_message] + rescue Bundler::BundlerError, Gem::InstallError => e + [false, specific_failure_message(e)] end private @@ -53,10 +54,10 @@ module Bundler def install spec.source.install( spec, - :force => force, - :ensure_builtin_gems_cached => standalone, - :build_args => Array(spec_settings), - :previous_spec => previous_spec, + force: force, + local: local, + build_args: Array(spec_settings), + previous_spec: previous_spec, ) end @@ -77,7 +78,7 @@ module Bundler if Bundler.settings[:bin] && standalone installer.generate_standalone_bundler_executable_stubs(spec) elsif Bundler.settings[:bin] - installer.generate_bundler_executable_stubs(spec, :force => true) + installer.generate_bundler_executable_stubs(spec, force: true) end end end |