summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2024-09-12 18:58:01 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-09-17 14:39:04 +0900
commit7428709d204728b807db1250be43abdf3dd514e8 (patch)
tree38f73878297f7a27c9f5ae5271d0b00f5dafa2db
parent7e0934d33e7ce09f9d2f50eb3f31708c0d852817 (diff)
[rubygems/rubygems] Inline a private method
Removes an (in my opinion) excessive indirection and handles options more consistently. https://github.com/rubygems/rubygems/commit/642e6d2c0c
-rw-r--r--lib/bundler/installer.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 8868fc772f..6c07d2328b 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -194,9 +194,13 @@ module Bundler
# that said, it's a rare situation (other than rake), and parallel
# installation is SO MUCH FASTER. so we let people opt in.
def install(options)
+ standalone = options[:standalone]
force = options[:force]
jobs = installation_parallelization(options)
- install_in_parallel jobs, options[:standalone], force
+ spec_installations = ParallelInstaller.call(self, @definition.specs, jobs, standalone, force)
+ spec_installations.each do |installation|
+ post_install_messages[installation.name] = installation.post_install_message if installation.has_post_install_message?
+ end
end
def installation_parallelization(options)
@@ -224,13 +228,6 @@ module Bundler
end
end
- def install_in_parallel(size, standalone, force = false)
- spec_installations = ParallelInstaller.call(self, @definition.specs, size, standalone, force)
- spec_installations.each do |installation|
- post_install_messages[installation.name] = installation.post_install_message if installation.has_post_install_message?
- end
- end
-
# returns whether or not a re-resolve was needed
def resolve_if_needed(options)
@definition.prefer_local! if options[:"prefer-local"]