bundler 2.3.13 → 2.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/lib/bundler/build_metadata.rb +2 -2
  4. data/lib/bundler/cli/cache.rb +1 -1
  5. data/lib/bundler/cli/common.rb +1 -1
  6. data/lib/bundler/cli/install.rb +0 -2
  7. data/lib/bundler/cli.rb +2 -6
  8. data/lib/bundler/definition.rb +17 -21
  9. data/lib/bundler/dependency.rb +2 -0
  10. data/lib/bundler/dsl.rb +7 -11
  11. data/lib/bundler/errors.rb +14 -4
  12. data/lib/bundler/fetcher/base.rb +6 -8
  13. data/lib/bundler/fetcher.rb +4 -0
  14. data/lib/bundler/friendly_errors.rb +16 -2
  15. data/lib/bundler/gem_helpers.rb +1 -1
  16. data/lib/bundler/injector.rb +4 -0
  17. data/lib/bundler/inline.rb +1 -11
  18. data/lib/bundler/installer/gem_installer.rb +14 -1
  19. data/lib/bundler/installer.rb +2 -11
  20. data/lib/bundler/lazy_specification.rb +1 -1
  21. data/lib/bundler/man/bundle-add.1 +7 -3
  22. data/lib/bundler/man/bundle-add.1.ronn +5 -2
  23. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  24. data/lib/bundler/man/bundle-cache.1 +1 -1
  25. data/lib/bundler/man/bundle-check.1 +1 -1
  26. data/lib/bundler/man/bundle-clean.1 +1 -1
  27. data/lib/bundler/man/bundle-config.1 +1 -1
  28. data/lib/bundler/man/bundle-doctor.1 +1 -1
  29. data/lib/bundler/man/bundle-exec.1 +1 -1
  30. data/lib/bundler/man/bundle-gem.1 +1 -1
  31. data/lib/bundler/man/bundle-info.1 +1 -1
  32. data/lib/bundler/man/bundle-init.1 +1 -1
  33. data/lib/bundler/man/bundle-inject.1 +1 -1
  34. data/lib/bundler/man/bundle-install.1 +1 -1
  35. data/lib/bundler/man/bundle-list.1 +1 -1
  36. data/lib/bundler/man/bundle-lock.1 +1 -1
  37. data/lib/bundler/man/bundle-open.1 +1 -1
  38. data/lib/bundler/man/bundle-outdated.1 +1 -1
  39. data/lib/bundler/man/bundle-platform.1 +1 -1
  40. data/lib/bundler/man/bundle-pristine.1 +1 -1
  41. data/lib/bundler/man/bundle-remove.1 +1 -1
  42. data/lib/bundler/man/bundle-show.1 +1 -1
  43. data/lib/bundler/man/bundle-update.1 +1 -1
  44. data/lib/bundler/man/bundle-viz.1 +1 -1
  45. data/lib/bundler/man/bundle.1 +1 -1
  46. data/lib/bundler/man/gemfile.5 +1 -1
  47. data/lib/bundler/plugin/api/source.rb +3 -3
  48. data/lib/bundler/plugin/installer/git.rb +0 -4
  49. data/lib/bundler/plugin/installer/rubygems.rb +0 -4
  50. data/lib/bundler/process_lock.rb +1 -1
  51. data/lib/bundler/resolver.rb +17 -20
  52. data/lib/bundler/rubygems_ext.rb +1 -1
  53. data/lib/bundler/rubygems_gem_installer.rb +11 -8
  54. data/lib/bundler/rubygems_integration.rb +3 -21
  55. data/lib/bundler/settings.rb +1 -1
  56. data/lib/bundler/shared_helpers.rb +5 -5
  57. data/lib/bundler/source/git.rb +7 -9
  58. data/lib/bundler/source/path.rb +1 -1
  59. data/lib/bundler/source/rubygems.rb +90 -86
  60. data/lib/bundler/source.rb +3 -4
  61. data/lib/bundler/spec_set.rb +5 -3
  62. data/lib/bundler/stub_specification.rb +5 -3
  63. data/lib/bundler/version.rb +1 -1
  64. data/lib/bundler.rb +12 -1
  65. metadata +3 -3
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-INSTALL" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-INSTALL" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-LIST" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-LIST" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-list\fR \- List all the gems in the bundle
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-LOCK" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-LOCK" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-OPEN" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-OPEN" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-OUTDATED" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-OUTDATED" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-PLATFORM" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-PLATFORM" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-platform\fR \- Displays platform compatibility information
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-PRISTINE" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-PRISTINE" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-REMOVE" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-REMOVE" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-SHOW" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-SHOW" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-UPDATE" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-UPDATE" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-update\fR \- Update your gems to the latest available versions
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-VIZ" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-VIZ" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE" "1" "March 2022" "" ""
4
+ .TH "BUNDLE" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\fR \- Ruby Dependency Management
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "GEMFILE" "5" "March 2022" "" ""
4
+ .TH "GEMFILE" "5" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@@ -258,7 +258,7 @@ module Bundler
258
258
  @dependencies |= Array(names)
259
259
  end
260
260
 
261
- # Note: Do not override if you don't know what you are doing.
261
+ # NOTE: Do not override if you don't know what you are doing.
262
262
  def can_lock?(spec)
263
263
  spec.source == self
264
264
  end
@@ -285,7 +285,7 @@ module Bundler
285
285
  end
286
286
  alias_method :identifier, :to_s
287
287
 
288
- # Note: Do not override if you don't know what you are doing.
288
+ # NOTE: Do not override if you don't know what you are doing.
289
289
  def include?(other)
290
290
  other == self
291
291
  end
@@ -294,7 +294,7 @@ module Bundler
294
294
  SharedHelpers.digest(:SHA1).hexdigest(uri)
295
295
  end
296
296
 
297
- # Note: Do not override if you don't know what you are doing.
297
+ # NOTE: Do not override if you don't know what you are doing.
298
298
  def gem_install_dir
299
299
  Bundler.install_path
300
300
  end
@@ -20,10 +20,6 @@ module Bundler
20
20
  end
21
21
  end
22
22
 
23
- def version_message(spec)
24
- "#{spec.name} #{spec.version}"
25
- end
26
-
27
23
  def root
28
24
  Plugin.root
29
25
  end
@@ -4,10 +4,6 @@ module Bundler
4
4
  module Plugin
5
5
  class Installer
6
6
  class Rubygems < Bundler::Source::Rubygems
7
- def version_message(spec)
8
- "#{spec.name} #{spec.version}"
9
- end
10
-
11
7
  private
12
8
 
13
9
  def requires_sudo?
@@ -12,7 +12,7 @@ module Bundler
12
12
  yield
13
13
  f.flock(File::LOCK_UN)
14
14
  end
15
- rescue Errno::EACCES, Errno::ENOLCK, Errno::ENOTSUP
15
+ rescue Errno::EACCES, Errno::ENOLCK, Errno::ENOTSUP, Errno::EPERM, Errno::EROFS
16
16
  # In the case the user does not have access to
17
17
  # create the lock file or is using NFS where
18
18
  # locks are not available we skip locking.
@@ -19,13 +19,15 @@ module Bundler
19
19
  # collection of gemspecs is returned. Otherwise, nil is returned.
20
20
  def self.resolve(requirements, source_requirements = {}, base = [], gem_version_promoter = GemVersionPromoter.new, additional_base_requirements = [], platforms = nil)
21
21
  base = SpecSet.new(base) unless base.is_a?(SpecSet)
22
- resolver = new(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
22
+ metadata_requirements, regular_requirements = requirements.partition {|dep| dep.name.end_with?("\0") }
23
+ resolver = new(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms, metadata_requirements)
23
24
  result = resolver.start(requirements)
24
- SpecSet.new(SpecSet.new(result).for(requirements.reject{|dep| dep.name.end_with?("\0") }))
25
+ SpecSet.new(SpecSet.new(result).for(regular_requirements))
25
26
  end
26
27
 
27
- def initialize(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
28
+ def initialize(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms, metadata_requirements)
28
29
  @source_requirements = source_requirements
30
+ @metadata_requirements = metadata_requirements
29
31
  @base = base
30
32
  @resolver = Molinillo::Resolver.new(self, self)
31
33
  @search_for = {}
@@ -231,19 +233,17 @@ module Bundler
231
233
  # before dependencies that are unconstrained
232
234
  def amount_constrained(dependency)
233
235
  @amount_constrained ||= {}
234
- @amount_constrained[dependency.name] ||= begin
235
- if (base = @base[dependency.name]) && !base.empty?
236
- dependency.requirement.satisfied_by?(base.first.version) ? 0 : 1
237
- else
238
- all = index_for(dependency).search(dependency.name).size
236
+ @amount_constrained[dependency.name] ||= if (base = @base[dependency.name]) && !base.empty?
237
+ dependency.requirement.satisfied_by?(base.first.version) ? 0 : 1
238
+ else
239
+ all = index_for(dependency).search(dependency.name).size
239
240
 
240
- if all <= 1
241
- all - 1_000_000
242
- else
243
- search = search_for(dependency)
244
- search = @prerelease_specified[dependency.name] ? search.count : search.count {|s| !s.version.prerelease? }
245
- search - all
246
- end
241
+ if all <= 1
242
+ all - 1_000_000
243
+ else
244
+ search = search_for(dependency)
245
+ search = @prerelease_specified[dependency.name] ? search.count : search.count {|s| !s.version.prerelease? }
246
+ search - all
247
247
  end
248
248
  end
249
249
  end
@@ -344,8 +344,6 @@ module Bundler
344
344
  trees.sort_by! {|t| t.reverse.map(&:name) }
345
345
  end
346
346
 
347
- metadata_requirements = {}
348
-
349
347
  o << trees.map do |tree|
350
348
  t = "".dup
351
349
  depth = 2
@@ -354,7 +352,6 @@ module Bundler
354
352
  base_tree_name = base_tree.name
355
353
 
356
354
  if base_tree_name.end_with?("\0")
357
- metadata_requirements[base_tree_name] = base_tree
358
355
  t = nil
359
356
  else
360
357
  tree.each do |req|
@@ -393,10 +390,10 @@ module Bundler
393
390
  end
394
391
  end
395
392
  elsif name.end_with?("\0")
396
- o << %(\n Current #{name} version:\n #{SharedHelpers.pretty_dependency(metadata_requirements[name])}\n\n)
393
+ o << %(\n Current #{name} version:\n #{SharedHelpers.pretty_dependency(@metadata_requirements.find {|req| req.name == name })}\n\n)
397
394
  elsif conflict.locked_requirement
398
395
  o << "\n"
399
- o << %(Running `bundle update` will rebuild your snapshot from scratch, using only\n)
396
+ o << %(Deleting your #{name_for_locking_dependency_source} file and running `bundle install` will rebuild your snapshot from scratch, using only\n)
400
397
  o << %(the gems in your Gemfile, which may resolve the conflict.\n)
401
398
  elsif !conflict.existing
402
399
  o << "\n"
@@ -34,7 +34,7 @@ module Gem
34
34
 
35
35
  def full_gem_path
36
36
  if source.respond_to?(:root)
37
- Pathname.new(loaded_from).dirname.expand_path(source.root).to_s.tap{|x| x.untaint if RUBY_VERSION < "2.7" }
37
+ Pathname.new(loaded_from).dirname.expand_path(source.root).to_s.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
38
38
  else
39
39
  rg_full_gem_path
40
40
  end
@@ -90,17 +90,20 @@ module Bundler
90
90
  end
91
91
  end
92
92
 
93
+ def spec
94
+ if Bundler.rubygems.provides?("< 3.3.12") # RubyGems implementation rescues and re-raises errors before 3.3.12 and we don't want that
95
+ @package.spec
96
+ else
97
+ super
98
+ end
99
+ end
100
+
93
101
  private
94
102
 
95
103
  def strict_rm_rf(dir)
96
- # FileUtils.rm_rf should probably rise in case of permission issues like
97
- # `rm -rf` does. However, it fails to delete the folder silently due to
98
- # https://github.com/ruby/fileutils/issues/57. It should probably be fixed
99
- # inside `fileutils` but for now I`m checking whether the folder was
100
- # removed after it completes, and raising otherwise.
101
- FileUtils.rm_rf dir
102
-
103
- raise PermissionError.new(dir, :delete) if File.directory?(dir)
104
+ Bundler.rm_rf dir
105
+ rescue Errno::ENOTEMPTY => e
106
+ raise DirectoryRemovalError.new(e.cause, "Could not delete previous installation of `#{dir}`")
104
107
  end
105
108
 
106
109
  def validate_bundler_checksum(checksum)
@@ -203,20 +203,9 @@ module Bundler
203
203
  EXT_LOCK
204
204
  end
205
205
 
206
- def spec_from_gem(path, policy = nil)
207
- require "rubygems/security"
208
- require "psych"
209
- gem_from_path(path, security_policies[policy]).spec
210
- rescue Exception, Gem::Exception, Gem::Security::Exception => e # rubocop:disable Lint/RescueException
211
- if e.is_a?(Gem::Security::Exception) ||
212
- e.message =~ /unknown trust policy|unsigned gem/i ||
213
- e.message =~ /couldn't verify (meta)?data signature/i
214
- raise SecurityError,
215
- "The gem #{File.basename(path, ".gem")} can't be installed because " \
216
- "the security policy didn't allow it, with the message: #{e.message}"
217
- else
218
- raise e
219
- end
206
+ def spec_from_gem(path)
207
+ require "rubygems/package"
208
+ Gem::Package.new(path).spec
220
209
  end
221
210
 
222
211
  def build_gem(gem_dir, spec)
@@ -514,13 +503,6 @@ module Bundler
514
503
  Gem::RemoteFetcher.new(proxy)
515
504
  end
516
505
 
517
- def gem_from_path(path, policy = nil)
518
- require "rubygems/package"
519
- p = Gem::Package.new(path)
520
- p.security_policy = policy if policy
521
- p
522
- end
523
-
524
506
  def build(spec, skip_validation = false)
525
507
  require "rubygems/package"
526
508
  Gem::Package.build(spec, skip_validation)
@@ -487,7 +487,7 @@ module Bundler
487
487
  /ix.freeze
488
488
 
489
489
  def self.key_for(key)
490
- key = normalize_uri(key).to_s if key.is_a?(String) && /https?:/ =~ key
490
+ key = normalize_uri(key).to_s if key.is_a?(String) && key.start_with?("http", "mirror.http")
491
491
  key = key.to_s.gsub(".", "__").gsub("-", "___").upcase
492
492
  "BUNDLE_#{key}"
493
493
  end
@@ -13,13 +13,13 @@ module Bundler
13
13
  def root
14
14
  gemfile = find_gemfile
15
15
  raise GemfileNotFound, "Could not locate Gemfile" unless gemfile
16
- Pathname.new(gemfile).tap{|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path.parent
16
+ Pathname.new(gemfile).tap {|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path.parent
17
17
  end
18
18
 
19
19
  def default_gemfile
20
20
  gemfile = find_gemfile
21
21
  raise GemfileNotFound, "Could not locate Gemfile" unless gemfile
22
- Pathname.new(gemfile).tap{|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path
22
+ Pathname.new(gemfile).tap {|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path
23
23
  end
24
24
 
25
25
  def default_lockfile
@@ -28,7 +28,7 @@ module Bundler
28
28
  case gemfile.basename.to_s
29
29
  when "gems.rb" then Pathname.new(gemfile.sub(/.rb$/, ".locked"))
30
30
  else Pathname.new("#{gemfile}.lock")
31
- end.tap{|x| x.untaint if RUBY_VERSION < "2.7" }
31
+ end.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
32
32
  end
33
33
 
34
34
  def default_bundle_dir
@@ -100,7 +100,7 @@ module Bundler
100
100
  #
101
101
  # @see {Bundler::PermissionError}
102
102
  def filesystem_access(path, action = :write, &block)
103
- yield(path.dup.tap{|x| x.untaint if RUBY_VERSION < "2.7" })
103
+ yield(path.dup.tap {|x| x.untaint if RUBY_VERSION < "2.7" })
104
104
  rescue Errno::EACCES
105
105
  raise PermissionError.new(path, action)
106
106
  rescue Errno::EAGAIN
@@ -236,7 +236,7 @@ module Bundler
236
236
 
237
237
  def search_up(*names)
238
238
  previous = nil
239
- current = File.expand_path(SharedHelpers.pwd).tap{|x| x.untaint if RUBY_VERSION < "2.7" }
239
+ current = File.expand_path(SharedHelpers.pwd).tap {|x| x.untaint if RUBY_VERSION < "2.7" }
240
240
 
241
241
  until !File.directory?(current) || current == previous
242
242
  if ENV["BUNDLER_SPEC_RUN"]
@@ -181,7 +181,7 @@ module Bundler
181
181
  def install(spec, options = {})
182
182
  force = options[:force]
183
183
 
184
- print_using_message "Using #{version_message(spec)} from #{self}"
184
+ print_using_message "Using #{version_message(spec, options[:previous_spec])} from #{self}"
185
185
 
186
186
  if (requires_checkout? && !@copied) || force
187
187
  Bundler.ui.debug " * Checking out revision: #{ref}"
@@ -219,13 +219,11 @@ module Bundler
219
219
  # across different projects, this cache will be shared.
220
220
  # When using local git repos, this is set to the local repo.
221
221
  def cache_path
222
- @cache_path ||= begin
223
- if Bundler.requires_sudo? || Bundler.feature_flag.global_gem_cache?
224
- Bundler.user_cache
225
- else
226
- Bundler.bundle_path.join("cache", "bundler")
227
- end.join("git", git_scope)
228
- end
222
+ @cache_path ||= if Bundler.requires_sudo? || Bundler.feature_flag.global_gem_cache?
223
+ Bundler.user_cache
224
+ else
225
+ Bundler.bundle_path.join("cache", "bundler")
226
+ end.join("git", git_scope)
229
227
  end
230
228
 
231
229
  def app_cache_dirname
@@ -336,7 +334,7 @@ module Bundler
336
334
 
337
335
  def load_gemspec(file)
338
336
  stub = Gem::StubSpecification.gemspec_stub(file, install_path.parent, install_path.parent)
339
- stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.tap{|x| x.untaint if RUBY_VERSION < "2.7" }
337
+ stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
340
338
  StubSpecification.from_stub(stub)
341
339
  end
342
340
 
@@ -82,7 +82,7 @@ module Bundler
82
82
  end
83
83
 
84
84
  def install(spec, options = {})
85
- using_message = "Using #{version_message(spec)} from #{self}"
85
+ using_message = "Using #{version_message(spec, options[:previous_spec])} from #{self}"
86
86
  using_message += " and installing its executables" unless spec.executables.empty?
87
87
  print_using_message using_message
88
88
  generate_bin(spec, :disable_extensions => true)