diff options
author | Martin Emde <martin.emde@gmail.com> | 2023-12-01 14:20:51 -0800 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-12-05 21:09:53 +0000 |
commit | 5f0ea3f590f8983669fe478bc9eace6880353b84 (patch) | |
tree | ca777e6b654fa43b841e3286a9b35a0869987d2e /spec/bundler/runtime/platform_spec.rb | |
parent | a33632e1ca7af1e3ba34cff05643aa067561a8cc (diff) |
[rubygems/rubygems] Converts Bundler lockfile checksum validation to opt-in only
Looks for the CHECKSUMS section in the lockfile, activating the feature
only if the section exists. Without a CHECKSUMS section, Bundler will
continue as normal, validating checksums when gems are installed while
checksums from the compact index are present.
https://github.com/rubygems/rubygems/commit/2353cc93a4
Diffstat (limited to 'spec/bundler/runtime/platform_spec.rb')
-rw-r--r-- | spec/bundler/runtime/platform_spec.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/bundler/runtime/platform_spec.rb b/spec/bundler/runtime/platform_spec.rb index 82120f75b2..4cbb52764b 100644 --- a/spec/bundler/runtime/platform_spec.rb +++ b/spec/bundler/runtime/platform_spec.rb @@ -73,6 +73,13 @@ RSpec.describe "Bundler.setup with multi platform stuff" do build_gem "racca", "1.5.2" end + checksums = checksums_section do |c| + c.checksum gem_repo4, "mini_portile2", "2.5.0" + c.checksum gem_repo4, "nokogiri", "1.11.1" + c.checksum gem_repo4, "nokogiri", "1.11.1", Bundler.local_platform + c.checksum gem_repo4, "racca", "1.5.2" + end + good_lockfile = <<~L GEM remote: #{file_uri_for(gem_repo4)}/ @@ -90,13 +97,7 @@ RSpec.describe "Bundler.setup with multi platform stuff" do DEPENDENCIES nokogiri (~> 1.11) - - CHECKSUMS - #{checksum_for_repo_gem gem_repo4, "mini_portile2", "2.5.0"} - #{checksum_for_repo_gem gem_repo4, "nokogiri", "1.11.1"} - #{checksum_for_repo_gem gem_repo4, "nokogiri", "1.11.1", Bundler.local_platform} - #{checksum_for_repo_gem gem_repo4, "racca", "1.5.2"} - + #{checksums} BUNDLED WITH #{Bundler::VERSION} L |