bundler 2.5.14 → 2.5.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/lib/bundler/build_metadata.rb +2 -2
  4. data/lib/bundler/cli/gem.rb +7 -14
  5. data/lib/bundler/cli.rb +3 -0
  6. data/lib/bundler/definition.rb +17 -13
  7. data/lib/bundler/man/bundle-add.1 +1 -1
  8. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  9. data/lib/bundler/man/bundle-cache.1 +1 -1
  10. data/lib/bundler/man/bundle-check.1 +1 -1
  11. data/lib/bundler/man/bundle-clean.1 +1 -1
  12. data/lib/bundler/man/bundle-config.1 +1 -1
  13. data/lib/bundler/man/bundle-console.1 +1 -1
  14. data/lib/bundler/man/bundle-doctor.1 +1 -1
  15. data/lib/bundler/man/bundle-exec.1 +1 -1
  16. data/lib/bundler/man/bundle-gem.1 +7 -1
  17. data/lib/bundler/man/bundle-gem.1.ronn +11 -0
  18. data/lib/bundler/man/bundle-help.1 +1 -1
  19. data/lib/bundler/man/bundle-info.1 +1 -1
  20. data/lib/bundler/man/bundle-init.1 +1 -1
  21. data/lib/bundler/man/bundle-inject.1 +1 -1
  22. data/lib/bundler/man/bundle-install.1 +1 -1
  23. data/lib/bundler/man/bundle-list.1 +1 -1
  24. data/lib/bundler/man/bundle-lock.1 +1 -1
  25. data/lib/bundler/man/bundle-open.1 +1 -1
  26. data/lib/bundler/man/bundle-outdated.1 +1 -1
  27. data/lib/bundler/man/bundle-platform.1 +1 -1
  28. data/lib/bundler/man/bundle-plugin.1 +1 -1
  29. data/lib/bundler/man/bundle-pristine.1 +1 -1
  30. data/lib/bundler/man/bundle-remove.1 +1 -1
  31. data/lib/bundler/man/bundle-show.1 +1 -1
  32. data/lib/bundler/man/bundle-update.1 +1 -1
  33. data/lib/bundler/man/bundle-version.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/rubygems_ext.rb +39 -1
  38. data/lib/bundler/rubygems_gem_installer.rb +31 -1
  39. data/lib/bundler/rubygems_integration.rb +1 -1
  40. data/lib/bundler/self_manager.rb +17 -2
  41. data/lib/bundler/vendored_net_http.rb +17 -6
  42. data/lib/bundler/version.rb +1 -1
  43. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e72f84d19fe7fbbf434d993f34d7b4cd12272cd72d4c61d6f02e7eb664f5058b
4
- data.tar.gz: d80704aaae9adfb1132c0902c4acfd0e41e4a082d4d7a5b8c174f0a4a14d28e1
3
+ metadata.gz: 7e2f845c327ff2e6c5937d3546c2f417a91026841d0f6afb1b4b1a33bf216197
4
+ data.tar.gz: 3b480f0e006b22393230e007296f99aaea6fad29d01d8632cedddac8051d59d0
5
5
  SHA512:
6
- metadata.gz: 5f3e9bea39eb37f092d0372e596a4803ed3ada1f70f00d0406554dc170ffef9f1c451cc98636d608669f673d199efa97c639f72c69be3adab05d417580d43a6e
7
- data.tar.gz: e1694c53d80fda23087d492e6a6264e230c12cc7a488c479987550afcbb51904284b6476ab62eea7f992ac051675f564f2596d9dce9f7ba9f543a9e382d165df
6
+ metadata.gz: 0fd4e8cf425683982d0684bcaee524925a7b9937c6cbe6bb1e490c7bad78d7723defb07f2649288507d77f4d24d0f6c201eb2172c5f08e4ddd854c6a2420ecf6
7
+ data.tar.gz: 2ef8c0e7d2293cd5ec6ccc2ba7bb71806a1b7504423e3adb80a60302dfa2a811e677fa90cdff90da4bd3a31eb40337afe2b9a952085d8cc0c7f626e305e3ad9c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ # 2.5.15 (July 8, 2024)
2
+
3
+ ## Enhancements:
4
+
5
+ - Support `--no-test`, `--no-ci`, and `--no-linter` options [#7780](https://github.com/rubygems/rubygems/pull/7780)
6
+ - Allow bundle command in new gems with invalid metadata [#7707](https://github.com/rubygems/rubygems/pull/7707)
7
+
8
+ ## Bug fixes:
9
+
10
+ - Protect creating RubyGems binstubs with a file lock [#7841](https://github.com/rubygems/rubygems/pull/7841)
11
+ - Only allow valid values for `--test`, `--ci`, and `--linter` options [#7801](https://github.com/rubygems/rubygems/pull/7801)
12
+ - Fix `bundle lock --add-platform <current_platform>` doing nothing [#7803](https://github.com/rubygems/rubygems/pull/7803)
13
+ - Print a proper error when bin dir does not have writable permission bit [#7794](https://github.com/rubygems/rubygems/pull/7794)
14
+
15
+ ## Documentation:
16
+
17
+ - Regenerate bundler docs for June 2024 [#7787](https://github.com/rubygems/rubygems/pull/7787)
18
+
1
19
  # 2.5.14 (June 21, 2024)
2
20
 
3
21
  ## 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 = "2024-06-21".freeze
8
- @git_commit_sha = "72920bc230".freeze
7
+ @built_at = "2024-07-09".freeze
8
+ @git_commit_sha = "ee7468dc1a".freeze
9
9
  @release = true
10
10
  # end ivars
11
11
 
@@ -32,7 +32,6 @@ module Bundler
32
32
 
33
33
  validate_ext_name if @extension
34
34
  validate_rust_builder_rubygems_version if @extension == "rust"
35
- travis_removal_info
36
35
  end
37
36
 
38
37
  def run
@@ -276,6 +275,7 @@ module Bundler
276
275
  end
277
276
 
278
277
  def ask_and_set_test_framework
278
+ return if skip?(:test)
279
279
  test_framework = options[:test] || Bundler.settings["gem.test"]
280
280
 
281
281
  if test_framework.to_s.empty?
@@ -301,6 +301,10 @@ module Bundler
301
301
  test_framework
302
302
  end
303
303
 
304
+ def skip?(option)
305
+ options.key?(option) && options[option].nil?
306
+ end
307
+
304
308
  def hint_text(setting)
305
309
  if Bundler.settings["gem.#{setting}"] == false
306
310
  "Your choice will only be applied to this gem."
@@ -311,6 +315,7 @@ module Bundler
311
315
  end
312
316
 
313
317
  def ask_and_set_ci
318
+ return if skip?(:ci)
314
319
  ci_template = options[:ci] || Bundler.settings["gem.ci"]
315
320
 
316
321
  if ci_template.to_s.empty?
@@ -342,6 +347,7 @@ module Bundler
342
347
  end
343
348
 
344
349
  def ask_and_set_linter
350
+ return if skip?(:linter)
345
351
  linter_template = options[:linter] || Bundler.settings["gem.linter"]
346
352
  linter_template = deprecated_rubocop_option if linter_template.nil?
347
353
 
@@ -448,19 +454,6 @@ module Bundler
448
454
  "1.3"
449
455
  end
450
456
 
451
- # TODO: remove at next minor release
452
- def travis_removal_info
453
- if options[:ci] == "travis"
454
- Bundler.ui.error "Support for Travis CI was removed from gem skeleton generator."
455
- exit 1
456
- end
457
-
458
- if Bundler.settings["gem.ci"] == "travis"
459
- Bundler.ui.error "Support for Travis CI was removed from gem skeleton generator, but it is present in bundle config. Please configure another provider using `bundle config set gem.ci SERVICE` (where SERVICE is one of github/gitlab/circle) or unset configuration using `bundle config unset gem.ci`."
460
- exit 1
461
- end
462
- end
463
-
464
457
  def validate_rust_builder_rubygems_version
465
458
  if Gem::Version.new(rust_builder_required_rubygems_version) > Gem.rubygems_version
466
459
  Bundler.ui.error "Your RubyGems version (#{Gem.rubygems_version}) is too old to build Rust extension. Please update your RubyGems using `gem update --system` or any other way and try again."
data/lib/bundler/cli.rb CHANGED
@@ -550,10 +550,13 @@ module Bundler
550
550
  method_option :rubocop, type: :boolean, desc: "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set --global gem.rubocop true`."
551
551
  method_option :changelog, type: :boolean, desc: "Generate changelog file. Set a default with `bundle config set --global gem.changelog true`."
552
552
  method_option :test, type: :string, lazy_default: Bundler.settings["gem.test"] || "", aliases: "-t", banner: "Use the specified test framework for your library",
553
+ enum: %w[rspec minitest test-unit],
553
554
  desc: "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set --global gem.test (rspec|minitest|test-unit)`."
554
555
  method_option :ci, type: :string, lazy_default: Bundler.settings["gem.ci"] || "",
556
+ enum: %w[github gitlab circle],
555
557
  desc: "Generate CI configuration, either GitHub Actions, GitLab CI or CircleCI. Set a default with `bundle config set --global gem.ci (github|gitlab|circle)`"
556
558
  method_option :linter, type: :string, lazy_default: Bundler.settings["gem.linter"] || "",
559
+ enum: %w[rubocop standard],
557
560
  desc: "Add a linter and code formatter, either RuboCop or Standard. Set a default with `bundle config set --global gem.linter (rubocop|standard)`"
558
561
  method_option :github_username, type: :string, default: Bundler.settings["gem.github_username"], banner: "Set your username on GitHub", desc: "Fill in GitHub username on README so that you don't have to do it manually. Set a default with `bundle config set --global gem.github_username <your_username>`."
559
562
 
@@ -621,14 +621,19 @@ module Bundler
621
621
  end
622
622
 
623
623
  def start_resolution
624
- @platforms |= [local_platform]
624
+ local_platform_needed_for_resolvability = @most_specific_non_local_locked_ruby_platform && !@platforms.include?(local_platform)
625
+ @platforms << local_platform if local_platform_needed_for_resolvability
625
626
 
626
627
  result = SpecSet.new(resolver.start)
627
628
 
628
629
  @resolved_bundler_version = result.find {|spec| spec.name == "bundler" }&.version
629
630
 
630
- if most_specific_ruby_locked_platform_is_not_local_platform?
631
- @platforms.delete(result.incomplete_for_platform?(dependencies, @current_ruby_locked_platform) ? @current_ruby_locked_platform : local_platform)
631
+ if @most_specific_non_local_locked_ruby_platform
632
+ if result.incomplete_for_platform?(dependencies, @most_specific_non_local_locked_ruby_platform)
633
+ @platforms.delete(@most_specific_non_local_locked_ruby_platform)
634
+ elsif local_platform_needed_for_resolvability
635
+ @platforms.delete(local_platform)
636
+ end
632
637
  end
633
638
 
634
639
  @platforms = result.add_extra_platforms!(platforms) if should_add_extra_platforms?
@@ -655,12 +660,6 @@ module Bundler
655
660
  end
656
661
  end
657
662
 
658
- def current_ruby_platform_locked?
659
- return false unless generic_local_platform_is_ruby?
660
-
661
- current_platform_locked?
662
- end
663
-
664
663
  def current_platform_locked?
665
664
  @platforms.any? do |bundle_platform|
666
665
  MatchPlatform.platforms_match?(bundle_platform, local_platform)
@@ -668,14 +667,19 @@ module Bundler
668
667
  end
669
668
 
670
669
  def add_current_platform
671
- @current_ruby_locked_platform = most_specific_locked_platform if current_ruby_platform_locked?
672
- return if most_specific_ruby_locked_platform_is_not_local_platform?
670
+ @most_specific_non_local_locked_ruby_platform = find_most_specific_non_local_locked_ruby_platform
671
+ return if @most_specific_non_local_locked_ruby_platform
673
672
 
674
673
  add_platform(local_platform)
675
674
  end
676
675
 
677
- def most_specific_ruby_locked_platform_is_not_local_platform?
678
- @current_ruby_locked_platform && @current_ruby_locked_platform != local_platform
676
+ def find_most_specific_non_local_locked_ruby_platform
677
+ return unless generic_local_platform_is_ruby? && current_platform_locked?
678
+
679
+ most_specific_locked_ruby_platform = most_specific_locked_platform
680
+ return unless most_specific_locked_ruby_platform != local_platform
681
+
682
+ most_specific_locked_ruby_platform
679
683
  end
680
684
 
681
685
  def change_reason
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-ADD" "1" "May 2024" ""
3
+ .TH "BUNDLE\-ADD" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-BINSTUBS" "1" "May 2024" ""
3
+ .TH "BUNDLE\-BINSTUBS" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CACHE" "1" "May 2024" ""
3
+ .TH "BUNDLE\-CACHE" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CHECK" "1" "May 2024" ""
3
+ .TH "BUNDLE\-CHECK" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CLEAN" "1" "May 2024" ""
3
+ .TH "BUNDLE\-CLEAN" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CONFIG" "1" "May 2024" ""
3
+ .TH "BUNDLE\-CONFIG" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-config\fR \- Set bundler configuration options
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-CONSOLE" "1" "May 2024" ""
3
+ .TH "BUNDLE\-CONSOLE" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-DOCTOR" "1" "May 2024" ""
3
+ .TH "BUNDLE\-DOCTOR" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-EXEC" "1" "May 2024" ""
3
+ .TH "BUNDLE\-EXEC" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-exec\fR \- Execute a command in the context of the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-GEM" "1" "May 2024" ""
3
+ .TH "BUNDLE\-GEM" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
6
6
  .SH "SYNOPSIS"
@@ -44,6 +44,8 @@ When Bundler is configured to not generate tests, an interactive prompt will be
44
44
  .IP
45
45
  When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
46
46
  .IP "\(bu" 4
47
+ \fB\-\-no\-test\fR: Do not use a test framework (overrides \fB\-\-test\fR specified in the global config)\.
48
+ .IP "\(bu" 4
47
49
  \fB\-\-ci\fR, \fB\-\-ci=github\fR, \fB\-\-ci=gitlab\fR, \fB\-\-ci=circle\fR: Specify the continuous integration service that Bundler should use when generating the project\. Acceptable values are \fBgithub\fR, \fBgitlab\fR and \fBcircle\fR\. A configuration file will be generated in the project directory\. Given no option is specified:
48
50
  .IP
49
51
  When Bundler is configured to generate CI files, this defaults to Bundler's global config setting \fBgem\.ci\fR\.
@@ -52,6 +54,8 @@ When Bundler is configured to not generate CI files, an interactive prompt will
52
54
  .IP
53
55
  When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
54
56
  .IP "\(bu" 4
57
+ \fB\-\-no\-ci\fR: Do not use a continuous integration service (overrides \fB\-\-ci\fR specified in the global config)\.
58
+ .IP "\(bu" 4
55
59
  \fB\-\-linter\fR, \fB\-\-linter=rubocop\fR, \fB\-\-linter=standard\fR: Specify the linter and code formatter that Bundler should add to the project's development dependencies\. Acceptable values are \fBrubocop\fR and \fBstandard\fR\. A configuration file will be generated in the project directory\. Given no option is specified:
56
60
  .IP
57
61
  When Bundler is configured to add a linter, this defaults to Bundler's global config setting \fBgem\.linter\fR\.
@@ -60,6 +64,8 @@ When Bundler is configured not to add a linter, an interactive prompt will be di
60
64
  .IP
61
65
  When Bundler is unconfigured, an interactive prompt will be displayed and the answer will be saved in Bundler's global config for future \fBbundle gem\fR use\.
62
66
  .IP "\(bu" 4
67
+ \fB\-\-no\-linter\fR: Do not add a linter (overrides \fB\-\-linter\fR specified in the global config)\.
68
+ .IP "\(bu" 4
63
69
  \fB\-e\fR, \fB\-\-edit[=EDITOR]\fR: Open the resulting GEM_NAME\.gemspec in EDITOR, or the default editor if not specified\. The default is \fB$BUNDLER_EDITOR\fR, \fB$VISUAL\fR, or \fB$EDITOR\fR\.
64
70
  .IP "" 0
65
71
  .SH "SEE ALSO"
@@ -76,6 +76,10 @@ configuration file using the following names:
76
76
  the answer will be saved in Bundler's global config for future `bundle gem`
77
77
  use.
78
78
 
79
+ * `--no-test`:
80
+ Do not use a test framework (overrides `--test` specified in the global
81
+ config).
82
+
79
83
  * `--ci`, `--ci=github`, `--ci=gitlab`, `--ci=circle`:
80
84
  Specify the continuous integration service that Bundler should use when
81
85
  generating the project. Acceptable values are `github`, `gitlab`
@@ -92,6 +96,10 @@ configuration file using the following names:
92
96
  the answer will be saved in Bundler's global config for future `bundle gem`
93
97
  use.
94
98
 
99
+ * `--no-ci`:
100
+ Do not use a continuous integration service (overrides `--ci` specified in
101
+ the global config).
102
+
95
103
  * `--linter`, `--linter=rubocop`, `--linter=standard`:
96
104
  Specify the linter and code formatter that Bundler should add to the
97
105
  project's development dependencies. Acceptable values are `rubocop` and
@@ -108,6 +116,9 @@ configuration file using the following names:
108
116
  the answer will be saved in Bundler's global config for future `bundle gem`
109
117
  use.
110
118
 
119
+ * `--no-linter`:
120
+ Do not add a linter (overrides `--linter` specified in the global config).
121
+
111
122
  * `-e`, `--edit[=EDITOR]`:
112
123
  Open the resulting GEM_NAME.gemspec in EDITOR, or the default editor if not
113
124
  specified. The default is `$BUNDLER_EDITOR`, `$VISUAL`, or `$EDITOR`.
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-HELP" "1" "May 2024" ""
3
+ .TH "BUNDLE\-HELP" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-help\fR \- Displays detailed help for each subcommand
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INFO" "1" "May 2024" ""
3
+ .TH "BUNDLE\-INFO" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-info\fR \- Show information for the given gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INIT" "1" "May 2024" ""
3
+ .TH "BUNDLE\-INIT" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-init\fR \- Generates a Gemfile into the current working directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INJECT" "1" "May 2024" ""
3
+ .TH "BUNDLE\-INJECT" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-INSTALL" "1" "May 2024" ""
3
+ .TH "BUNDLE\-INSTALL" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-LIST" "1" "May 2024" ""
3
+ .TH "BUNDLE\-LIST" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-list\fR \- List all the gems in the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-LOCK" "1" "May 2024" ""
3
+ .TH "BUNDLE\-LOCK" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-OPEN" "1" "May 2024" ""
3
+ .TH "BUNDLE\-OPEN" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-OUTDATED" "1" "May 2024" ""
3
+ .TH "BUNDLE\-OUTDATED" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-outdated\fR \- List installed gems with newer versions available
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PLATFORM" "1" "May 2024" ""
3
+ .TH "BUNDLE\-PLATFORM" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-platform\fR \- Displays platform compatibility information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PLUGIN" "1" "May 2024" ""
3
+ .TH "BUNDLE\-PLUGIN" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-plugin\fR \- Manage Bundler plugins
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-PRISTINE" "1" "May 2024" ""
3
+ .TH "BUNDLE\-PRISTINE" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-REMOVE" "1" "May 2024" ""
3
+ .TH "BUNDLE\-REMOVE" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-SHOW" "1" "May 2024" ""
3
+ .TH "BUNDLE\-SHOW" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-UPDATE" "1" "May 2024" ""
3
+ .TH "BUNDLE\-UPDATE" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-update\fR \- Update your gems to the latest available versions
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-VERSION" "1" "May 2024" ""
3
+ .TH "BUNDLE\-VERSION" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-version\fR \- Prints Bundler version information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE\-VIZ" "1" "May 2024" ""
3
+ .TH "BUNDLE\-VIZ" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "BUNDLE" "1" "May 2024" ""
3
+ .TH "BUNDLE" "1" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\fR \- Ruby Dependency Management
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with nRonn/v0.11.1
2
2
  .\" https://github.com/n-ronn/nronn/tree/0.11.1
3
- .TH "GEMFILE" "5" "May 2024" ""
3
+ .TH "GEMFILE" "5" "June 2024" ""
4
4
  .SH "NAME"
5
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
6
6
  .SH "SYNOPSIS"
@@ -30,8 +30,32 @@ module Gem
30
30
  end
31
31
  end
32
32
 
33
+ # Can be removed once RubyGems 3.5.14 support is dropped
34
+ unless Gem.respond_to?(:open_file_with_flock)
35
+ def self.open_file_with_flock(path, &block)
36
+ flags = File.exist?(path) ? "r+" : "a+"
37
+
38
+ File.open(path, flags) do |io|
39
+ begin
40
+ io.flock(File::LOCK_EX)
41
+ rescue Errno::ENOSYS, Errno::ENOTSUP
42
+ end
43
+ yield io
44
+ rescue Errno::ENOLCK # NFS
45
+ if Thread.main != Thread.current
46
+ raise
47
+ else
48
+ File.open(path, flags, &block)
49
+ end
50
+ end
51
+ end
52
+ end
53
+
33
54
  require "rubygems/specification"
34
55
 
56
+ # Can be removed once RubyGems 3.5.14 support is dropped
57
+ VALIDATES_FOR_RESOLUTION = Specification.new.respond_to?(:validate_for_resolution).freeze
58
+
35
59
  class Specification
36
60
  require_relative "match_metadata"
37
61
  require_relative "match_platform"
@@ -131,6 +155,12 @@ module Gem
131
155
  !default_gem? && !File.directory?(full_gem_path)
132
156
  end
133
157
 
158
+ unless VALIDATES_FOR_RESOLUTION
159
+ def validate_for_resolution
160
+ SpecificationPolicy.new(self).validate_for_resolution
161
+ end
162
+ end
163
+
134
164
  private
135
165
 
136
166
  def dependencies_to_gemfile(dependencies, group = nil)
@@ -150,6 +180,14 @@ module Gem
150
180
  end
151
181
  end
152
182
 
183
+ unless VALIDATES_FOR_RESOLUTION
184
+ class SpecificationPolicy
185
+ def validate_for_resolution
186
+ validate_required!
187
+ end
188
+ end
189
+ end
190
+
153
191
  module BetterPermissionError
154
192
  def data
155
193
  super
@@ -241,7 +279,7 @@ module Gem
241
279
 
242
280
  # cpu
243
281
  ([nil,"universal"].include?(@cpu) || [nil, "universal"].include?(other.cpu) || @cpu == other.cpu ||
244
- (@cpu == "arm" && other.cpu.start_with?("arm"))) &&
282
+ (@cpu == "arm" && other.cpu.start_with?("armv"))) &&
245
283
 
246
284
  # os
247
285
  @os == other.os &&
@@ -48,7 +48,17 @@ module Bundler
48
48
  spec
49
49
  end
50
50
 
51
- def pre_install_checks
51
+ if Bundler.rubygems.provides?("< 3.5")
52
+ def pre_install_checks
53
+ super
54
+ rescue Gem::FilePermissionError
55
+ # Ignore permission checks in RubyGems. Instead, go on, and try to write
56
+ # for real. We properly handle permission errors when they happen.
57
+ nil
58
+ end
59
+ end
60
+
61
+ def ensure_writable_dir(dir)
52
62
  super
53
63
  rescue Gem::FilePermissionError
54
64
  # Ignore permission checks in RubyGems. Instead, go on, and try to write
@@ -71,6 +81,26 @@ module Bundler
71
81
  end
72
82
  end
73
83
 
84
+ if Bundler.rubygems.provides?("< 3.5.15")
85
+ def generate_bin_script(filename, bindir)
86
+ bin_script_path = File.join bindir, formatted_program_filename(filename)
87
+
88
+ Gem.open_file_with_flock("#{bin_script_path}.lock") do
89
+ require "fileutils"
90
+ FileUtils.rm_f bin_script_path # prior install may have been --no-wrappers
91
+
92
+ File.open(bin_script_path, "wb", 0o755) do |file|
93
+ file.write app_script_text(filename)
94
+ file.chmod(options[:prog_mode] || 0o755)
95
+ end
96
+ end
97
+
98
+ verbose bin_script_path
99
+
100
+ generate_windows_script filename, bindir
101
+ end
102
+ end
103
+
74
104
  def build_extensions
75
105
  extension_cache_path = options[:bundler_extension_cache_path]
76
106
  extension_dir = spec.extension_dir
@@ -48,7 +48,7 @@ module Bundler
48
48
  end
49
49
 
50
50
  def validate(spec)
51
- Bundler.ui.silence { spec.validate(false) }
51
+ Bundler.ui.silence { spec.validate_for_resolution }
52
52
  rescue Gem::InvalidSpecificationException => e
53
53
  error_message = "The gemspec at #{spec.loaded_from} is not valid. Please fix this gemspec.\n" \
54
54
  "The validation error was '#{e.message}'\n"
@@ -70,8 +70,23 @@ module Bundler
70
70
  configured_gem_home = ENV["GEM_HOME"]
71
71
  configured_gem_path = ENV["GEM_PATH"]
72
72
 
73
- cmd = [$PROGRAM_NAME, *ARGV]
74
- cmd.unshift(Gem.ruby) unless File.executable?($PROGRAM_NAME)
73
+ # Bundler specs need some stuff to be required before Bundler starts
74
+ # running, for example, for faking the compact index API. However, these
75
+ # flags are lost when we reexec to a different version of Bundler. In the
76
+ # future, we may be able to properly reconstruct the original Ruby
77
+ # invocation (see https://bugs.ruby-lang.org/issues/6648), but for now
78
+ # there's no way to do it, so we need to be explicit about how to re-exec.
79
+ # This may be a feature end users request at some point, but maybe by that
80
+ # time, we have builtin tools to do. So for now, we use an undocumented
81
+ # ENV variable only for our specs.
82
+ bundler_spec_original_cmd = ENV["BUNDLER_SPEC_ORIGINAL_CMD"]
83
+ if bundler_spec_original_cmd
84
+ require "shellwords"
85
+ cmd = [*Shellwords.shellsplit(bundler_spec_original_cmd), *ARGV]
86
+ else
87
+ cmd = [$PROGRAM_NAME, *ARGV]
88
+ cmd.unshift(Gem.ruby) unless File.executable?($PROGRAM_NAME)
89
+ end
75
90
 
76
91
  Bundler.with_original_env do
77
92
  Kernel.exec(
@@ -1,12 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- begin
4
- require "rubygems/vendored_net_http"
5
- rescue LoadError
3
+ # This defined? guard can be removed once RubyGems 3.4 support is dropped.
4
+ #
5
+ # Bundler specs load this code from `spec/support/vendored_net_http.rb` to avoid
6
+ # activating the Bundler gem too early. Without this guard, we get redefinition
7
+ # warnings once Bundler is actually activated and
8
+ # `lib/bundler/vendored_net_http.rb` is required. This is not an issue in
9
+ # RubyGems versions including `rubygems/vendored_net_http` since `require` takes
10
+ # care of avoiding the double load.
11
+ #
12
+ unless defined?(Gem::Net)
6
13
  begin
7
- require "rubygems/net/http"
14
+ require "rubygems/vendored_net_http"
8
15
  rescue LoadError
9
- require "net/http"
10
- Gem::Net = Net
16
+ begin
17
+ require "rubygems/net/http"
18
+ rescue LoadError
19
+ require "net/http"
20
+ Gem::Net = Net
21
+ end
11
22
  end
12
23
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "2.5.14".freeze
4
+ VERSION = "2.5.15".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= VERSION.split(".").first.to_i
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.5.14
4
+ version: 2.5.15
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: 2024-06-21 00:00:00.000000000 Z
25
+ date: 2024-07-09 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
@@ -400,7 +400,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
400
400
  - !ruby/object:Gem::Version
401
401
  version: 3.2.3
402
402
  requirements: []
403
- rubygems_version: 3.5.14
403
+ rubygems_version: 3.5.15
404
404
  signing_key:
405
405
  specification_version: 4
406
406
  summary: The best way to manage your application's dependencies