bundler 2.3.13 → 2.3.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/lib/bundler/build_metadata.rb +2 -2
  4. data/lib/bundler/cli/common.rb +1 -1
  5. data/lib/bundler/definition.rb +2 -2
  6. data/lib/bundler/dsl.rb +1 -1
  7. data/lib/bundler/gem_helpers.rb +1 -1
  8. data/lib/bundler/installer/gem_installer.rb +14 -1
  9. data/lib/bundler/installer.rb +1 -1
  10. data/lib/bundler/lazy_specification.rb +1 -1
  11. data/lib/bundler/man/bundle-add.1 +7 -3
  12. data/lib/bundler/man/bundle-add.1.ronn +5 -2
  13. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  14. data/lib/bundler/man/bundle-cache.1 +1 -1
  15. data/lib/bundler/man/bundle-check.1 +1 -1
  16. data/lib/bundler/man/bundle-clean.1 +1 -1
  17. data/lib/bundler/man/bundle-config.1 +1 -1
  18. data/lib/bundler/man/bundle-doctor.1 +1 -1
  19. data/lib/bundler/man/bundle-exec.1 +1 -1
  20. data/lib/bundler/man/bundle-gem.1 +1 -1
  21. data/lib/bundler/man/bundle-info.1 +1 -1
  22. data/lib/bundler/man/bundle-init.1 +1 -1
  23. data/lib/bundler/man/bundle-inject.1 +1 -1
  24. data/lib/bundler/man/bundle-install.1 +1 -1
  25. data/lib/bundler/man/bundle-list.1 +1 -1
  26. data/lib/bundler/man/bundle-lock.1 +1 -1
  27. data/lib/bundler/man/bundle-open.1 +1 -1
  28. data/lib/bundler/man/bundle-outdated.1 +1 -1
  29. data/lib/bundler/man/bundle-platform.1 +1 -1
  30. data/lib/bundler/man/bundle-pristine.1 +1 -1
  31. data/lib/bundler/man/bundle-remove.1 +1 -1
  32. data/lib/bundler/man/bundle-show.1 +1 -1
  33. data/lib/bundler/man/bundle-update.1 +1 -1
  34. data/lib/bundler/man/bundle-viz.1 +1 -1
  35. data/lib/bundler/man/bundle.1 +1 -1
  36. data/lib/bundler/man/gemfile.5 +1 -1
  37. data/lib/bundler/plugin/installer/git.rb +0 -4
  38. data/lib/bundler/plugin/installer/rubygems.rb +0 -4
  39. data/lib/bundler/resolver.rb +1 -1
  40. data/lib/bundler/rubygems_ext.rb +1 -1
  41. data/lib/bundler/shared_helpers.rb +5 -5
  42. data/lib/bundler/source/git.rb +2 -2
  43. data/lib/bundler/source/path.rb +1 -1
  44. data/lib/bundler/source/rubygems.rb +13 -10
  45. data/lib/bundler/source.rb +3 -4
  46. data/lib/bundler/spec_set.rb +5 -3
  47. data/lib/bundler/version.rb +1 -1
  48. data/lib/bundler.rb +1 -1
  49. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bcf48063fd68ff2303185f1bb117dcb52395cfdbc622d9a41dfc658115b196eb
4
- data.tar.gz: 28a397130a9eb30ec877e7563cecccf29e8a1d849096028a6c49eb7ddd48ebd6
3
+ metadata.gz: 64817a3760b34f35e53aea5e788049373a97d786d75921aa67fbd6a676eb5bcb
4
+ data.tar.gz: 584ecd0d1b0a738a7de9e95f9cdbfef0ca3e8ac00f2a928fd5e23b4777b073e7
5
5
  SHA512:
6
- metadata.gz: 8e1ef096a5444ba67c2b3d89ad91f6e26df973c18793c41b96ff2797ca15be596df5e6bd0c78a9e17d9078d30f5e348bcc17cde5d76bb1ce2534f3247716538f
7
- data.tar.gz: 2ab4b43b9863888cb4515a5305b1fcbcb5eb4fa5e4f9aaa27c8202ad0de0a210dbf3304318728514436513060e950a8bfbad0c849f6ae73ac61eac120b36d644
6
+ metadata.gz: 5397e12203b667c6870f7ee605c7ad2b43c31af5716c45c2376577cc5a2a2be93b1e48ae36eab6e23f7b49e1942a21d9e8c3c04d2ea8d18606fd3e4ea2b4f1ac
7
+ data.tar.gz: 1db7fcf817b82739a0b6867e532705fec37e82b571103b9e2b688374f208f4d5ce9e9daad3bdd0062abddfb9025190953535c100c3365c0b3109e993efdb1ea6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ # 2.3.14 (May 18, 2022)
2
+
3
+ ## Bug fixes:
4
+
5
+ - Fix confusing inline mode install output [#5530](https://github.com/rubygems/rubygems/pull/5530)
6
+ - Fix error message when locked version of a gem does not support running Ruby [#5525](https://github.com/rubygems/rubygems/pull/5525)
7
+
8
+ ## Performance:
9
+
10
+ - Improve `bundler/setup` performance again by not deduplicating intermediate results [#5533](https://github.com/rubygems/rubygems/pull/5533)
11
+
12
+ ## Documentation:
13
+
14
+ - Fix typo in documentation [#5514](https://github.com/rubygems/rubygems/pull/5514)
15
+ - Update man page for `require` option in `bundle add` command [#5513](https://github.com/rubygems/rubygems/pull/5513)
16
+
1
17
  # 2.3.13 (May 4, 2022)
2
18
 
3
19
  ## Bug fixes:
@@ -4,8 +4,8 @@ module Bundler
4
4
  # Represents metadata from when the Bundler gem was built.
5
5
  module BuildMetadata
6
6
  # begin ivars
7
- @built_at = "2022-05-04".freeze
8
- @git_commit_sha = "b20be5a433".freeze
7
+ @built_at = "2022-05-18".freeze
8
+ @git_commit_sha = "467ad58a7c".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -40,7 +40,7 @@ module Bundler
40
40
  end
41
41
 
42
42
  def self.verbalize_groups(groups)
43
- groups.map!{|g| "'#{g}'" }
43
+ groups.map! {|g| "'#{g}'" }
44
44
  group_list = [groups[0...-1].join(", "), groups[-1..-1]].
45
45
  reject {|s| s.to_s.empty? }.join(" and ")
46
46
  group_str = groups.size == 1 ? "group" : "groups"
@@ -261,7 +261,7 @@ module Bundler
261
261
  @locked_specs
262
262
  elsif !unlocking? && nothing_changed?
263
263
  Bundler.ui.debug("Found no changes, using resolution from the lockfile")
264
- SpecSet.new(filter_specs(@locked_specs, @dependencies.select{|dep| @locked_specs[dep].any? }))
264
+ SpecSet.new(filter_specs(@locked_specs, @dependencies.select {|dep| @locked_specs[dep].any? }))
265
265
  else
266
266
  last_resolve = converge_locked_specs
267
267
  # Run a resolve against the locally available gems
@@ -731,7 +731,7 @@ module Bundler
731
731
  end
732
732
  end
733
733
 
734
- SpecSet.new(filter_specs(converged, deps).reject{|s| @unlock[:gems].include?(s.name) })
734
+ SpecSet.new(filter_specs(converged, deps).reject {|s| @unlock[:gems].include?(s.name) })
735
735
  end
736
736
 
737
737
  def metadata_dependencies
data/lib/bundler/dsl.rb CHANGED
@@ -46,7 +46,7 @@ module Bundler
46
46
  @gemfile = expanded_gemfile_path
47
47
  @gemfiles << expanded_gemfile_path
48
48
  contents ||= Bundler.read_file(@gemfile.to_s)
49
- instance_eval(contents.dup.tap{|x| x.untaint if RUBY_VERSION < "2.7" }, gemfile.to_s, 1)
49
+ instance_eval(contents.dup.tap {|x| x.untaint if RUBY_VERSION < "2.7" }, gemfile.to_s, 1)
50
50
  rescue Exception => e # rubocop:disable Lint/RescueException
51
51
  message = "There was an error " \
52
52
  "#{e.is_a?(GemfileEvalError) ? "evaluating" : "parsing"} " \
@@ -48,7 +48,7 @@ module Bundler
48
48
  sorted_matching = matching.sort_by {|spec| platform_specificity_match(spec.platform, platform) }
49
49
  exemplary_spec = sorted_matching.first
50
50
 
51
- sorted_matching.take_while{|spec| same_specificity(platform, spec, exemplary_spec) && same_deps(spec, exemplary_spec) }
51
+ sorted_matching.take_while {|spec| same_specificity(platform, spec, exemplary_spec) && same_deps(spec, exemplary_spec) }
52
52
  end
53
53
  module_function :select_best_platform_match
54
54
 
@@ -51,7 +51,20 @@ module Bundler
51
51
  end
52
52
 
53
53
  def install
54
- spec.source.install(spec, :force => force, :ensure_builtin_gems_cached => standalone, :build_args => Array(spec_settings))
54
+ spec.source.install(
55
+ spec,
56
+ :force => force,
57
+ :ensure_builtin_gems_cached => standalone,
58
+ :build_args => Array(spec_settings),
59
+ :previous_spec => previous_spec,
60
+ )
61
+ end
62
+
63
+ def previous_spec
64
+ locked_gems = installer.definition.locked_gems
65
+ return unless locked_gems
66
+
67
+ locked_gems.specs.find {|s| s.name == spec.name }
55
68
  end
56
69
 
57
70
  def out_of_space_message
@@ -13,7 +13,7 @@ module Bundler
13
13
  Installer.ambiguous_gems = []
14
14
  end
15
15
 
16
- attr_reader :post_install_messages
16
+ attr_reader :post_install_messages, :definition
17
17
 
18
18
  # Begins the installation process for Bundler.
19
19
  # For more information see the #run method on this class.
@@ -94,7 +94,7 @@ module Bundler
94
94
  (spec.required_ruby_version.satisfied_by?(Gem.ruby_version) &&
95
95
  spec.required_rubygems_version.satisfied_by?(Gem.rubygems_version))
96
96
  end
97
- search = installable_candidates.last
97
+ search = installable_candidates.last || same_platform_candidates.last
98
98
  search.dependencies = dependencies if search && (search.is_a?(RemoteSpecification) || search.is_a?(EndpointSpecification))
99
99
  search
100
100
  end
@@ -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\-ADD" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-ADD" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
@@ -45,6 +45,10 @@ Specify the group(s) for the added gem\. Multiple groups should be separated by
45
45
  Specify the source for the added gem\.
46
46
  .
47
47
  .TP
48
+ \fB\-\-require\fR, \fB\-r\fR
49
+ Adds require path to gem\. Provide false, or a path as a string\.
50
+ .
51
+ .TP
48
52
  \fB\-\-git\fR
49
53
  Specify the git source for the added gem\.
50
54
  .
@@ -66,9 +70,9 @@ Adds the gem to the Gemfile but does not install it\.
66
70
  .
67
71
  .TP
68
72
  \fB\-\-optimistic\fR
69
- Adds optimistic declaration of version
73
+ Adds optimistic declaration of version\.
70
74
  .
71
75
  .TP
72
76
  \fB\-\-strict\fR
73
- Adds strict declaration of version
77
+ Adds strict declaration of version\.
74
78
 
@@ -30,6 +30,9 @@ bundle add rails --group "development, test"
30
30
  * `--source`, , `-s`:
31
31
  Specify the source for the added gem.
32
32
 
33
+ * `--require`, `-r`:
34
+ Adds require path to gem. Provide false, or a path as a string.
35
+
33
36
  * `--git`:
34
37
  Specify the git source for the added gem.
35
38
 
@@ -46,7 +49,7 @@ bundle add rails --group "development, test"
46
49
  Adds the gem to the Gemfile but does not install it.
47
50
 
48
51
  * `--optimistic`:
49
- Adds optimistic declaration of version
52
+ Adds optimistic declaration of version.
50
53
 
51
54
  * `--strict`:
52
- Adds strict declaration of version
55
+ Adds strict declaration of version.
@@ -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\-BINSTUBS" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-BINSTUBS" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
@@ -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\-CACHE" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-CACHE" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
@@ -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\-CHECK" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-CHECK" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
@@ -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\-CLEAN" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-CLEAN" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
@@ -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\-CONFIG" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-CONFIG" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-config\fR \- Set bundler configuration options
@@ -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\-DOCTOR" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-DOCTOR" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
@@ -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\-EXEC" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-EXEC" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-exec\fR \- Execute a command in the context of 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\-GEM" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-GEM" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
@@ -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\-INFO" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-INFO" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-info\fR \- Show information for the given 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\-INIT" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-INIT" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-init\fR \- Generates a Gemfile into the current working directory
@@ -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\-INJECT" "1" "March 2022" "" ""
4
+ .TH "BUNDLE\-INJECT" "1" "May 2022" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-inject\fR \- Add named gem(s) with version requirements to 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\-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
@@ -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?
@@ -21,7 +21,7 @@ module Bundler
21
21
  base = SpecSet.new(base) unless base.is_a?(SpecSet)
22
22
  resolver = new(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
23
23
  result = resolver.start(requirements)
24
- SpecSet.new(SpecSet.new(result).for(requirements.reject{|dep| dep.name.end_with?("\0") }))
24
+ SpecSet.new(SpecSet.new(result).for(requirements.reject {|dep| dep.name.end_with?("\0") }))
25
25
  end
26
26
 
27
27
  def initialize(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
@@ -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
@@ -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}"
@@ -336,7 +336,7 @@ module Bundler
336
336
 
337
337
  def load_gemspec(file)
338
338
  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" }
339
+ stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
340
340
  StubSpecification.from_stub(stub)
341
341
  end
342
342
 
@@ -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)
@@ -135,9 +135,9 @@ module Bundler
135
135
  end
136
136
  end
137
137
 
138
- def install(spec, opts = {})
139
- force = opts[:force]
140
- ensure_builtin_gems_cached = opts[:ensure_builtin_gems_cached]
138
+ def install(spec, options = {})
139
+ force = options[:force]
140
+ ensure_builtin_gems_cached = options[:ensure_builtin_gems_cached]
141
141
 
142
142
  if ensure_builtin_gems_cached && spec.default_gem?
143
143
  if !cached_path(spec)
@@ -162,7 +162,7 @@ module Bundler
162
162
  uris.uniq!
163
163
  Installer.ambiguous_gems << [spec.name, *uris] if uris.length > 1
164
164
 
165
- path = fetch_gem(spec)
165
+ path = fetch_gem(spec, options[:previous_spec])
166
166
  begin
167
167
  s = Bundler.rubygems.spec_from_gem(path, Bundler.settings["trust-policy"])
168
168
  spec.__swap__(s)
@@ -173,7 +173,7 @@ module Bundler
173
173
  end
174
174
 
175
175
  unless Bundler.settings[:no_install]
176
- message = "Installing #{version_message(spec)}"
176
+ message = "Installing #{version_message(spec, options[:previous_spec])}"
177
177
  message += " with native extensions" if spec.extensions.any?
178
178
  Bundler.ui.confirm message
179
179
 
@@ -198,7 +198,7 @@ module Bundler
198
198
  :ignore_dependencies => true,
199
199
  :wrappers => true,
200
200
  :env_shebang => true,
201
- :build_args => opts[:build_args],
201
+ :build_args => options[:build_args],
202
202
  :bundler_expected_checksum => spec.respond_to?(:checksum) && spec.checksum,
203
203
  :bundler_extension_cache_path => extension_cache_path(spec)
204
204
  ).install
@@ -458,7 +458,7 @@ module Bundler
458
458
  end
459
459
  end
460
460
 
461
- def fetch_gem(spec)
461
+ def fetch_gem(spec, previous_spec = nil)
462
462
  return false unless spec.remote
463
463
 
464
464
  spec.fetch_platform
@@ -476,7 +476,7 @@ module Bundler
476
476
  SharedHelpers.filesystem_access(download_cache_path) do |p|
477
477
  FileUtils.mkdir_p(p)
478
478
  end
479
- download_gem(spec, download_cache_path)
479
+ download_gem(spec, download_cache_path, previous_spec)
480
480
 
481
481
  if requires_sudo?
482
482
  SharedHelpers.filesystem_access(cache_path) do |p|
@@ -521,9 +521,12 @@ module Bundler
521
521
  # @param [String] download_cache_path
522
522
  # the local directory the .gem will end up in.
523
523
  #
524
- def download_gem(spec, download_cache_path)
524
+ # @param [Specification] previous_spec
525
+ # the spec previously locked
526
+ #
527
+ def download_gem(spec, download_cache_path, previous_spec = nil)
525
528
  uri = spec.remote.uri
526
- Bundler.ui.confirm("Fetching #{version_message(spec)}")
529
+ Bundler.ui.confirm("Fetching #{version_message(spec, previous_spec)}")
527
530
  Bundler.rubygems.download_gem(spec, uri, download_cache_path)
528
531
  end
529
532
 
@@ -15,13 +15,12 @@ module Bundler
15
15
  specs.unmet_dependency_names
16
16
  end
17
17
 
18
- def version_message(spec)
18
+ def version_message(spec, locked_spec = nil)
19
19
  message = "#{spec.name} #{spec.version}"
20
20
  message += " (#{spec.platform})" if spec.platform != Gem::Platform::RUBY && !spec.platform.nil?
21
21
 
22
- if Bundler.locked_gems
23
- locked_spec = Bundler.locked_gems.specs.find {|s| s.name == spec.name }
24
- locked_spec_version = locked_spec.version if locked_spec
22
+ if locked_spec
23
+ locked_spec_version = locked_spec.version
25
24
  if locked_spec_version && spec.version != locked_spec_version
26
25
  message += Bundler.ui.add_color(" (was #{locked_spec_version})", version_color(spec.version, locked_spec_version))
27
26
  end
@@ -18,13 +18,13 @@ module Bundler
18
18
 
19
19
  loop do
20
20
  break unless dep = deps.shift
21
- next if handled.any?{|d| d.name == dep.name && (match_current_platform || d.__platform == dep.__platform) } || dep.name == "bundler"
21
+ next if handled.any? {|d| d.name == dep.name && (match_current_platform || d.__platform == dep.__platform) } || dep.name == "bundler"
22
22
 
23
23
  handled << dep
24
24
 
25
25
  specs_for_dep = spec_for_dependency(dep, match_current_platform)
26
26
  if specs_for_dep.any?
27
- match_current_platform ? specs += specs_for_dep : specs |= specs_for_dep
27
+ specs.concat(specs_for_dep)
28
28
 
29
29
  specs_for_dep.first.dependencies.each do |d|
30
30
  next if d.type == :development
@@ -40,6 +40,8 @@ module Bundler
40
40
  specs << spec
41
41
  end
42
42
 
43
+ specs.uniq! unless match_current_platform
44
+
43
45
  check ? true : specs
44
46
  end
45
47
 
@@ -172,7 +174,7 @@ module Bundler
172
174
  def spec_for_dependency(dep, match_current_platform)
173
175
  specs_for_platforms = lookup[dep.name]
174
176
  if match_current_platform
175
- GemHelpers.select_best_platform_match(specs_for_platforms.select{|s| Gem::Platform.match_spec?(s) }, Bundler.local_platform)
177
+ GemHelpers.select_best_platform_match(specs_for_platforms.select {|s| Gem::Platform.match_spec?(s) }, Bundler.local_platform)
176
178
  else
177
179
  GemHelpers.select_best_platform_match(specs_for_platforms, dep.__platform)
178
180
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.3.13".freeze
4
+ VERSION = "2.3.14".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
data/lib/bundler.rb CHANGED
@@ -19,7 +19,7 @@ require_relative "bundler/build_metadata"
19
19
  #
20
20
  # Since Ruby 2.6, Bundler is a part of Ruby's standard library.
21
21
  #
22
- # Bunder is used by creating _gemfiles_ listing all the project dependencies
22
+ # Bundler is used by creating _gemfiles_ listing all the project dependencies
23
23
  # and (optionally) their versions and then using
24
24
  #
25
25
  # require 'bundler/setup'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.13
4
+ version: 2.3.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -22,7 +22,7 @@ authors:
22
22
  autorequire:
23
23
  bindir: exe
24
24
  cert_chain: []
25
- date: 2022-05-04 00:00:00.000000000 Z
25
+ date: 2022-05-18 00:00:00.000000000 Z
26
26
  dependencies: []
27
27
  description: Bundler manages an application's dependencies through its entire life,
28
28
  across many machines, systematically and repeatably
@@ -369,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
369
369
  - !ruby/object:Gem::Version
370
370
  version: 2.5.2
371
371
  requirements: []
372
- rubygems_version: 3.3.13
372
+ rubygems_version: 3.3.14
373
373
  signing_key:
374
374
  specification_version: 4
375
375
  summary: The best way to manage your application's dependencies