diff options
author | Thong Kuah <tkuah@gitlab.com> | 2022-08-01 11:42:18 +1200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-10-23 13:59:01 +0900 |
commit | ad08674d8dc17c4ca031ce20760c4a4779c83e27 (patch) | |
tree | bf4958d6f06c36051f9c65e53c9e615ea1d978b2 /spec/bundler/runtime | |
parent | 2d468358a516f575d013f07801079e0906c61f0c (diff) |
[rubygems/rubygems] Add CHECKSUMS for each gem in lockfile
We lock the checksum for each resolved spec under a new CHECKSUMS
section in the lockfile.
If the locked spec does not resolve for the local platform, we preserve
the locked checksum, similar to how we preserve specs.
Checksum locking only makes sense on install. The compact index
information is only available then.
https://github.com/rubygems/rubygems/commit/bde37ca6bf
Diffstat (limited to 'spec/bundler/runtime')
-rw-r--r-- | spec/bundler/runtime/platform_spec.rb | 17 | ||||
-rw-r--r-- | spec/bundler/runtime/setup_spec.rb | 3 |
2 files changed, 14 insertions, 6 deletions
diff --git a/spec/bundler/runtime/platform_spec.rb b/spec/bundler/runtime/platform_spec.rb index b31bc4abe8..d0af8b1c1c 100644 --- a/spec/bundler/runtime/platform_spec.rb +++ b/spec/bundler/runtime/platform_spec.rb @@ -61,16 +61,16 @@ RSpec.describe "Bundler.setup with multi platform stuff" do build_repo4 do build_gem "nokogiri", "1.11.1" do |s| s.add_dependency "mini_portile2", "~> 2.5.0" - s.add_dependency "racc", "~> 1.5.2" + s.add_dependency "racca", "~> 1.5.2" end build_gem "nokogiri", "1.11.1" do |s| s.platform = Bundler.local_platform - s.add_dependency "racc", "~> 1.4" + s.add_dependency "racca", "~> 1.4" end build_gem "mini_portile2", "2.5.0" - build_gem "racc", "1.5.2" + build_gem "racca", "1.5.2" end good_lockfile = <<~L @@ -80,10 +80,10 @@ RSpec.describe "Bundler.setup with multi platform stuff" do mini_portile2 (2.5.0) nokogiri (1.11.1) mini_portile2 (~> 2.5.0) - racc (~> 1.5.2) + racca (~> 1.5.2) nokogiri (1.11.1-#{Bundler.local_platform}) - racc (~> 1.4) - racc (1.5.2) + racca (~> 1.4) + racca (1.5.2) PLATFORMS #{lockfile_platforms("ruby")} @@ -91,6 +91,11 @@ RSpec.describe "Bundler.setup with multi platform stuff" do DEPENDENCIES nokogiri (~> 1.11) + CHECKSUMS + 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"} + BUNDLED WITH #{Bundler::VERSION} L diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index d4234d684f..3abbea449b 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -1227,6 +1227,9 @@ end DEPENDENCIES rack + + CHECKSUMS + #{checksum_for_repo_gem gem_repo1, "rack", "1.0.0"} L if ruby_version |