rubygems-update 3.5.13 → 3.5.15
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/bundler/CHANGELOG.md +26 -0
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/fund.rb +1 -1
- data/bundler/lib/bundler/cli/gem.rb +7 -14
- data/bundler/lib/bundler/cli.rb +3 -0
- data/bundler/lib/bundler/definition.rb +18 -13
- data/bundler/lib/bundler/man/bundle-add.1 +1 -1
- data/bundler/lib/bundler/man/bundle-binstubs.1 +1 -1
- data/bundler/lib/bundler/man/bundle-cache.1 +1 -1
- data/bundler/lib/bundler/man/bundle-check.1 +1 -1
- data/bundler/lib/bundler/man/bundle-clean.1 +1 -1
- data/bundler/lib/bundler/man/bundle-config.1 +1 -1
- data/bundler/lib/bundler/man/bundle-console.1 +1 -1
- data/bundler/lib/bundler/man/bundle-doctor.1 +1 -1
- data/bundler/lib/bundler/man/bundle-exec.1 +1 -1
- data/bundler/lib/bundler/man/bundle-gem.1 +7 -1
- data/bundler/lib/bundler/man/bundle-gem.1.ronn +11 -0
- data/bundler/lib/bundler/man/bundle-help.1 +1 -1
- data/bundler/lib/bundler/man/bundle-info.1 +1 -1
- data/bundler/lib/bundler/man/bundle-init.1 +1 -1
- data/bundler/lib/bundler/man/bundle-inject.1 +1 -1
- data/bundler/lib/bundler/man/bundle-install.1 +1 -1
- data/bundler/lib/bundler/man/bundle-list.1 +1 -1
- data/bundler/lib/bundler/man/bundle-lock.1 +1 -1
- data/bundler/lib/bundler/man/bundle-open.1 +1 -1
- data/bundler/lib/bundler/man/bundle-outdated.1 +1 -1
- data/bundler/lib/bundler/man/bundle-platform.1 +1 -1
- data/bundler/lib/bundler/man/bundle-plugin.1 +1 -1
- data/bundler/lib/bundler/man/bundle-pristine.1 +1 -1
- data/bundler/lib/bundler/man/bundle-remove.1 +1 -1
- data/bundler/lib/bundler/man/bundle-show.1 +1 -1
- data/bundler/lib/bundler/man/bundle-update.1 +1 -1
- data/bundler/lib/bundler/man/bundle-version.1 +1 -1
- data/bundler/lib/bundler/man/bundle-viz.1 +1 -1
- data/bundler/lib/bundler/man/bundle.1 +1 -1
- data/bundler/lib/bundler/man/gemfile.5 +1 -1
- data/bundler/lib/bundler/rubygems_ext.rb +39 -1
- data/bundler/lib/bundler/rubygems_gem_installer.rb +31 -1
- data/bundler/lib/bundler/rubygems_integration.rb +1 -1
- data/bundler/lib/bundler/self_manager.rb +17 -2
- data/bundler/lib/bundler/source/rubygems.rb +5 -9
- data/bundler/lib/bundler/vendored_net_http.rb +17 -6
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems/bundler_version_finder.rb +1 -1
- data/lib/rubygems/installer.rb +8 -7
- data/lib/rubygems/platform.rb +2 -2
- data/lib/rubygems/requirement.rb +2 -2
- data/lib/rubygems/specification.rb +7 -3
- data/lib/rubygems/specification_policy.rb +14 -4
- data/lib/rubygems.rb +20 -14
- data/rubygems-update.gemspec +1 -1
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 28cfb831008b4e410b548da95cb6d13d1ce5bf6e8fa627d7b9b68054a8d9986a
         | 
| 4 | 
            +
              data.tar.gz: 56a3282f366046b58dc95dd26ff68a1654f4020cebc24ec47ba9161aab5c66d3
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: bae4267616d578f691e583b6bdea0d8022a42cee9f7be5e46e09962a766624900e059f295647f83d0d621df32b4637165d96c92bfe66ff222d943b161f67e93b
         | 
| 7 | 
            +
              data.tar.gz: 44d6c04d7f8531f3154a901b98a9f707941e0d8955bc02bd5a5b0cc2f8c01702fcb00ad2955886d89f4fece3ce6cb85c9a4bc412f756308ca9ada5b3a6b700e0
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,3 +1,34 @@ | |
| 1 | 
            +
            # 3.5.15 / 2024-07-08
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            ## Enhancements:
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            * Installs bundler 2.5.15 as a default gem.
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            ## Bug fixes:
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            * Restrict generic `arm` to only match 32-bit arm. Pull request
         | 
| 10 | 
            +
              [#7830](https://github.com/rubygems/rubygems/pull/7830) by ntkme
         | 
| 11 | 
            +
            * Protect creating binstubs with a file lock. Pull request
         | 
| 12 | 
            +
              [#7806](https://github.com/rubygems/rubygems/pull/7806) by
         | 
| 13 | 
            +
              deivid-rodriguez
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            ## Documentation:
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            * Make it clearer that `add_dependency` is the main way to add
         | 
| 18 | 
            +
              non-development dependencies. Pull request
         | 
| 19 | 
            +
              [#7800](https://github.com/rubygems/rubygems/pull/7800) by jeromedalbert
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            # 3.5.14 / 2024-06-21
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            ## Enhancements:
         | 
| 24 | 
            +
             | 
| 25 | 
            +
            * Installs bundler 2.5.14 as a default gem.
         | 
| 26 | 
            +
             | 
| 27 | 
            +
            ## Bug fixes:
         | 
| 28 | 
            +
             | 
| 29 | 
            +
            * Make "bundler? update --bundler" behave identically. Pull request
         | 
| 30 | 
            +
              [#7778](https://github.com/rubygems/rubygems/pull/7778) by x-yuri
         | 
| 31 | 
            +
             | 
| 1 32 | 
             
            # 3.5.13 / 2024-06-14
         | 
| 2 33 |  | 
| 3 34 | 
             
            ## Enhancements:
         | 
    
        data/bundler/CHANGELOG.md
    CHANGED
    
    | @@ -1,3 +1,29 @@ | |
| 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 | 
            +
             | 
| 19 | 
            +
            # 2.5.14 (June 21, 2024)
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            ## Bug fixes:
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              - Fix credentials being re-added when re-resolving without a full unlock [#7767](https://github.com/rubygems/rubygems/pull/7767)
         | 
| 24 | 
            +
              - Fix `bundle update <gem_name>` edge case [#7770](https://github.com/rubygems/rubygems/pull/7770)
         | 
| 25 | 
            +
              - Fix `bundle fund` when the gemfile contains optional groups [#7758](https://github.com/rubygems/rubygems/pull/7758)
         | 
| 26 | 
            +
             | 
| 1 27 | 
             
            # 2.5.13 (June 14, 2024)
         | 
| 2 28 |  | 
| 3 29 | 
             
            ## 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- | 
| 8 | 
            -
                @git_commit_sha = " | 
| 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/bundler/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 | 
            -
                  @ | 
| 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  | 
| 631 | 
            -
                     | 
| 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 | 
            -
                  @ | 
| 672 | 
            -
                  return if  | 
| 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  | 
| 678 | 
            -
                   | 
| 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
         | 
| @@ -1058,6 +1062,7 @@ module Bundler | |
| 1058 1062 | 
             
                            (@new_platform && platforms.last == platform) ||
         | 
| 1059 1063 | 
             
                            @path_changes ||
         | 
| 1060 1064 | 
             
                            @dependency_changes ||
         | 
| 1065 | 
            +
                            @locked_spec_with_invalid_deps ||
         | 
| 1061 1066 | 
             
                            !@originally_locked_specs.incomplete_for_platform?(dependencies, platform)
         | 
| 1062 1067 |  | 
| 1063 1068 | 
             
                    remove_platform(platform)
         | 
| @@ -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" " | 
| 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" " | 
| 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\-CONSOLE" "1" " | 
| 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\-GEM" "1" " | 
| 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\-INIT" "1" " | 
| 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" " | 
| 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" " | 
| 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\-OUTDATED" "1" " | 
| 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" " | 
| 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\-PRISTINE" "1" " | 
| 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\-SHOW" "1" " | 
| 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" " | 
| 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"
         | 
| @@ -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?(" | 
| 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 | 
            -
                 | 
| 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. | 
| 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 | 
            -
                   | 
| 74 | 
            -
                   | 
| 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(
         | 
| @@ -10,7 +10,7 @@ module Bundler | |
| 10 10 | 
             
                  # Ask for X gems per API request
         | 
| 11 11 | 
             
                  API_REQUEST_SIZE = 50
         | 
| 12 12 |  | 
| 13 | 
            -
                   | 
| 13 | 
            +
                  attr_accessor :remotes
         | 
| 14 14 |  | 
| 15 15 | 
             
                  def initialize(options = {})
         | 
| 16 16 | 
             
                    @options = options
         | 
| @@ -20,9 +20,10 @@ module Bundler | |
| 20 20 | 
             
                    @allow_cached = false
         | 
| 21 21 | 
             
                    @allow_local = options["allow_local"] || false
         | 
| 22 22 | 
             
                    @checksum_store = Checksum::Store.new
         | 
| 23 | 
            -
                    @original_remotes = nil
         | 
| 24 23 |  | 
| 25 24 | 
             
                    Array(options["remotes"]).reverse_each {|r| add_remote(r) }
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                    @lockfile_remotes = @remotes if options["from_lockfile"]
         | 
| 26 27 | 
             
                  end
         | 
| 27 28 |  | 
| 28 29 | 
             
                  def caches
         | 
| @@ -92,12 +93,7 @@ module Bundler | |
| 92 93 |  | 
| 93 94 | 
             
                  def self.from_lock(options)
         | 
| 94 95 | 
             
                    options["remotes"] = Array(options.delete("remote")).reverse
         | 
| 95 | 
            -
                    new(options)
         | 
| 96 | 
            -
                  end
         | 
| 97 | 
            -
             | 
| 98 | 
            -
                  def remotes=(new_remotes)
         | 
| 99 | 
            -
                    @original_remotes = @remotes
         | 
| 100 | 
            -
                    @remotes = new_remotes
         | 
| 96 | 
            +
                    new(options.merge("from_lockfile" => true))
         | 
| 101 97 | 
             
                  end
         | 
| 102 98 |  | 
| 103 99 | 
             
                  def to_lock
         | 
| @@ -470,7 +466,7 @@ module Bundler | |
| 470 466 | 
             
                  private
         | 
| 471 467 |  | 
| 472 468 | 
             
                  def lockfile_remotes
         | 
| 473 | 
            -
                    @ | 
| 469 | 
            +
                    @lockfile_remotes || credless_remotes
         | 
| 474 470 | 
             
                  end
         | 
| 475 471 |  | 
| 476 472 | 
             
                  # Checks if the requested spec exists in the global cache. If it does,
         | 
| @@ -1,12 +1,23 @@ | |
| 1 1 | 
             
            # frozen_string_literal: true
         | 
| 2 2 |  | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 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/ | 
| 14 | 
            +
                require "rubygems/vendored_net_http"
         | 
| 8 15 | 
             
              rescue LoadError
         | 
| 9 | 
            -
                 | 
| 10 | 
            -
             | 
| 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
         | 
| @@ -21,7 +21,7 @@ module Gem::BundlerVersionFinder | |
| 21 21 | 
             
              end
         | 
| 22 22 |  | 
| 23 23 | 
             
              def self.bundle_update_bundler_version
         | 
| 24 | 
            -
                return unless File.basename($0) | 
| 24 | 
            +
                return unless ["bundle", "bundler"].include? File.basename($0)
         | 
| 25 25 | 
             
                return unless "update".start_with?(ARGV.first || " ")
         | 
| 26 26 | 
             
                bundler_version = nil
         | 
| 27 27 | 
             
                update_index = nil
         | 
    
        data/lib/rubygems/installer.rb
    CHANGED
    
    | @@ -500,8 +500,7 @@ class Gem::Installer | |
| 500 500 | 
             
                  dir_mode = options[:prog_mode] || (mode | 0o111)
         | 
| 501 501 |  | 
| 502 502 | 
             
                  unless dir_mode == mode
         | 
| 503 | 
            -
                     | 
| 504 | 
            -
                    FileUtils.chmod dir_mode, bin_path
         | 
| 503 | 
            +
                    File.chmod dir_mode, bin_path
         | 
| 505 504 | 
             
                  end
         | 
| 506 505 |  | 
| 507 506 | 
             
                  check_executable_overwrite filename
         | 
| @@ -539,12 +538,14 @@ class Gem::Installer | |
| 539 538 | 
             
              def generate_bin_script(filename, bindir)
         | 
| 540 539 | 
             
                bin_script_path = File.join bindir, formatted_program_filename(filename)
         | 
| 541 540 |  | 
| 542 | 
            -
                 | 
| 543 | 
            -
             | 
| 541 | 
            +
                Gem.open_file_with_flock("#{bin_script_path}.lock") do
         | 
| 542 | 
            +
                  require "fileutils"
         | 
| 543 | 
            +
                  FileUtils.rm_f bin_script_path # prior install may have been --no-wrappers
         | 
| 544 544 |  | 
| 545 | 
            -
             | 
| 546 | 
            -
             | 
| 547 | 
            -
             | 
| 545 | 
            +
                  File.open(bin_script_path, "wb", 0o755) do |file|
         | 
| 546 | 
            +
                    file.write app_script_text(filename)
         | 
| 547 | 
            +
                    file.chmod(options[:prog_mode] || 0o755)
         | 
| 548 | 
            +
                  end
         | 
| 548 549 | 
             
                end
         | 
| 549 550 |  | 
| 550 551 | 
             
                verbose bin_script_path
         | 
    
        data/lib/rubygems/platform.rb
    CHANGED
    
    | @@ -176,7 +176,7 @@ class Gem::Platform | |
| 176 176 | 
             
              # they have the same version, or either one has no version
         | 
| 177 177 | 
             
              #
         | 
| 178 178 | 
             
              # Additionally, the platform will match if the local CPU is 'arm' and the
         | 
| 179 | 
            -
              # other CPU starts with " | 
| 179 | 
            +
              # other CPU starts with "armv" (for generic 32-bit ARM family support).
         | 
| 180 180 | 
             
              #
         | 
| 181 181 | 
             
              # Of note, this method is not commutative. Indeed the OS 'linux' has a
         | 
| 182 182 | 
             
              # special case: the version is the libc name, yet while "no version" stands
         | 
| @@ -197,7 +197,7 @@ class Gem::Platform | |
| 197 197 |  | 
| 198 198 | 
             
                # cpu
         | 
| 199 199 | 
             
                ([nil,"universal"].include?(@cpu) || [nil, "universal"].include?(other.cpu) || @cpu == other.cpu ||
         | 
| 200 | 
            -
                (@cpu == "arm" && other.cpu.start_with?(" | 
| 200 | 
            +
                (@cpu == "arm" && other.cpu.start_with?("armv"))) &&
         | 
| 201 201 |  | 
| 202 202 | 
             
                  # os
         | 
| 203 203 | 
             
                  @os == other.os &&
         | 
    
        data/lib/rubygems/requirement.rb
    CHANGED
    
    | @@ -13,8 +13,8 @@ class Gem::Requirement | |
| 13 13 | 
             
              OPS = { # :nodoc:
         | 
| 14 14 | 
             
                "=" => lambda {|v, r| v == r },
         | 
| 15 15 | 
             
                "!=" => lambda {|v, r| v != r },
         | 
| 16 | 
            -
                ">" => lambda {|v, r| v > | 
| 17 | 
            -
                "<" => lambda {|v, r| v < | 
| 16 | 
            +
                ">" => lambda {|v, r| v > r },
         | 
| 17 | 
            +
                "<" => lambda {|v, r| v < r },
         | 
| 18 18 | 
             
                ">=" => lambda {|v, r| v >= r },
         | 
| 19 19 | 
             
                "<=" => lambda {|v, r| v <= r },
         | 
| 20 20 | 
             
                "~>" => lambda {|v, r| v >= r && v.release < r.bump },
         | 
| @@ -546,9 +546,9 @@ class Gem::Specification < Gem::BasicSpecification | |
| 546 546 | 
             
              #
         | 
| 547 547 | 
             
              # Usage:
         | 
| 548 548 | 
             
              #
         | 
| 549 | 
            -
              #   spec. | 
| 549 | 
            +
              #   spec.add_dependency 'example', '~> 1.1', '>= 1.1.4'
         | 
| 550 550 |  | 
| 551 | 
            -
              def  | 
| 551 | 
            +
              def add_dependency(gem, *requirements)
         | 
| 552 552 | 
             
                if requirements.uniq.size != requirements.size
         | 
| 553 553 | 
             
                  warn "WARNING: duplicated #{gem} dependency #{requirements}"
         | 
| 554 554 | 
             
                end
         | 
| @@ -1504,7 +1504,7 @@ class Gem::Specification < Gem::BasicSpecification | |
| 1504 1504 |  | 
| 1505 1505 | 
             
              private :add_dependency_with_type
         | 
| 1506 1506 |  | 
| 1507 | 
            -
              alias_method : | 
| 1507 | 
            +
              alias_method :add_runtime_dependency, :add_dependency
         | 
| 1508 1508 |  | 
| 1509 1509 | 
             
              ##
         | 
| 1510 1510 | 
             
              # Adds this spec's require paths to LOAD_PATH, in the proper location.
         | 
| @@ -2585,6 +2585,10 @@ class Gem::Specification < Gem::BasicSpecification | |
| 2585 2585 | 
             
                @test_files.delete_if       {|x| File.directory?(x) && !File.symlink?(x) }
         | 
| 2586 2586 | 
             
              end
         | 
| 2587 2587 |  | 
| 2588 | 
            +
              def validate_for_resolution
         | 
| 2589 | 
            +
                Gem::SpecificationPolicy.new(self).validate_for_resolution
         | 
| 2590 | 
            +
              end
         | 
| 2591 | 
            +
             | 
| 2588 2592 | 
             
              def validate_metadata
         | 
| 2589 2593 | 
             
                Gem::SpecificationPolicy.new(self).validate_metadata
         | 
| 2590 2594 | 
             
              end
         | 
| @@ -45,6 +45,7 @@ class Gem::SpecificationPolicy | |
| 45 45 |  | 
| 46 46 | 
             
              def validate(strict = false)
         | 
| 47 47 | 
             
                validate_required!
         | 
| 48 | 
            +
                validate_required_metadata!
         | 
| 48 49 |  | 
| 49 50 | 
             
                validate_optional(strict) if packaging || strict
         | 
| 50 51 |  | 
| @@ -85,15 +86,17 @@ class Gem::SpecificationPolicy | |
| 85 86 |  | 
| 86 87 | 
             
                validate_authors_field
         | 
| 87 88 |  | 
| 88 | 
            -
                validate_metadata
         | 
| 89 | 
            -
             | 
| 90 89 | 
             
                validate_licenses_length
         | 
| 91 90 |  | 
| 92 | 
            -
                validate_lazy_metadata
         | 
| 93 | 
            -
             | 
| 94 91 | 
             
                validate_duplicate_dependencies
         | 
| 95 92 | 
             
              end
         | 
| 96 93 |  | 
| 94 | 
            +
              def validate_required_metadata!
         | 
| 95 | 
            +
                validate_metadata
         | 
| 96 | 
            +
             | 
| 97 | 
            +
                validate_lazy_metadata
         | 
| 98 | 
            +
              end
         | 
| 99 | 
            +
             | 
| 97 100 | 
             
              def validate_optional(strict)
         | 
| 98 101 | 
             
                validate_licenses
         | 
| 99 102 |  | 
| @@ -120,6 +123,13 @@ class Gem::SpecificationPolicy | |
| 120 123 | 
             
                end
         | 
| 121 124 | 
             
              end
         | 
| 122 125 |  | 
| 126 | 
            +
              ##
         | 
| 127 | 
            +
              # Implementation for Specification#validate_for_resolution
         | 
| 128 | 
            +
             | 
| 129 | 
            +
              def validate_for_resolution
         | 
| 130 | 
            +
                validate_required!
         | 
| 131 | 
            +
              end
         | 
| 132 | 
            +
             | 
| 123 133 | 
             
              ##
         | 
| 124 134 | 
             
              # Implementation for Specification#validate_metadata
         | 
| 125 135 |  | 
    
        data/lib/rubygems.rb
    CHANGED
    
    | @@ -9,7 +9,7 @@ | |
| 9 9 | 
             
            require "rbconfig"
         | 
| 10 10 |  | 
| 11 11 | 
             
            module Gem
         | 
| 12 | 
            -
              VERSION = "3.5. | 
| 12 | 
            +
              VERSION = "3.5.15"
         | 
| 13 13 | 
             
            end
         | 
| 14 14 |  | 
| 15 15 | 
             
            # Must be first since it unloads the prelude from 1.9.2
         | 
| @@ -760,6 +760,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]} | |
| 760 760 |  | 
| 761 761 | 
             
              ##
         | 
| 762 762 | 
             
              # Safely write a file in binary mode on all platforms.
         | 
| 763 | 
            +
             | 
| 763 764 | 
             
              def self.write_binary(path, data)
         | 
| 764 765 | 
             
                open_file(path, "wb") do |io|
         | 
| 765 766 | 
             
                  io.write data
         | 
| @@ -771,24 +772,29 @@ An Array (#{env.inspect}) was passed in from #{caller[3]} | |
| 771 772 | 
             
              end
         | 
| 772 773 |  | 
| 773 774 | 
             
              ##
         | 
| 774 | 
            -
              # Open a file with given flags | 
| 775 | 
            +
              # Open a file with given flags
         | 
| 775 776 |  | 
| 776 777 | 
             
              def self.open_file(path, flags, &block)
         | 
| 778 | 
            +
                File.open(path, flags, &block)
         | 
| 779 | 
            +
              end
         | 
| 780 | 
            +
             | 
| 781 | 
            +
              ##
         | 
| 782 | 
            +
              # Open a file with given flags, and protect access with flock
         | 
| 783 | 
            +
             | 
| 784 | 
            +
              def self.open_file_with_flock(path, &block)
         | 
| 785 | 
            +
                flags = File.exist?(path) ? "r+" : "a+"
         | 
| 786 | 
            +
             | 
| 777 787 | 
             
                File.open(path, flags) do |io|
         | 
| 778 | 
            -
                   | 
| 779 | 
            -
                     | 
| 780 | 
            -
             | 
| 781 | 
            -
                    rescue Errno::ENOSYS, Errno::ENOTSUP
         | 
| 782 | 
            -
                    end
         | 
| 788 | 
            +
                  begin
         | 
| 789 | 
            +
                    io.flock(File::LOCK_EX)
         | 
| 790 | 
            +
                  rescue Errno::ENOSYS, Errno::ENOTSUP
         | 
| 783 791 | 
             
                  end
         | 
| 784 792 | 
             
                  yield io
         | 
| 785 | 
            -
                 | 
| 786 | 
            -
             | 
| 787 | 
            -
             | 
| 788 | 
            -
                   | 
| 789 | 
            -
             | 
| 790 | 
            -
                  File.open(path, flags) do |io|
         | 
| 791 | 
            -
                    yield io
         | 
| 793 | 
            +
                rescue Errno::ENOLCK # NFS
         | 
| 794 | 
            +
                  if Thread.main != Thread.current
         | 
| 795 | 
            +
                    raise
         | 
| 796 | 
            +
                  else
         | 
| 797 | 
            +
                    open_file(path, flags, &block)
         | 
| 792 798 | 
             
                  end
         | 
| 793 799 | 
             
                end
         | 
| 794 800 | 
             
              end
         | 
    
        data/rubygems-update.gemspec
    CHANGED
    
    | @@ -2,7 +2,7 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            Gem::Specification.new do |s|
         | 
| 4 4 | 
             
              s.name = "rubygems-update"
         | 
| 5 | 
            -
              s.version = "3.5. | 
| 5 | 
            +
              s.version = "3.5.15"
         | 
| 6 6 | 
             
              s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
         | 
| 7 7 | 
             
              s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
         | 
| 8 8 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rubygems-update
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 3.5. | 
| 4 | 
            +
              version: 3.5.15
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Jim Weirich
         | 
| @@ -16,7 +16,7 @@ authors: | |
| 16 16 | 
             
            autorequire:
         | 
| 17 17 | 
             
            bindir: exe
         | 
| 18 18 | 
             
            cert_chain: []
         | 
| 19 | 
            -
            date: 2024- | 
| 19 | 
            +
            date: 2024-07-09 00:00:00.000000000 Z
         | 
| 20 20 | 
             
            dependencies: []
         | 
| 21 21 | 
             
            description: |-
         | 
| 22 22 | 
             
              A package (also known as a library) contains a set of functionality
         | 
| @@ -727,7 +727,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 727 727 | 
             
                - !ruby/object:Gem::Version
         | 
| 728 728 | 
             
                  version: '0'
         | 
| 729 729 | 
             
            requirements: []
         | 
| 730 | 
            -
            rubygems_version: 3.5. | 
| 730 | 
            +
            rubygems_version: 3.5.15
         | 
| 731 731 | 
             
            signing_key:
         | 
| 732 732 | 
             
            specification_version: 4
         | 
| 733 733 | 
             
            summary: RubyGems is a package management framework for Ruby. This gem is downloaded
         |