diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2024-11-07 14:05:08 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-11-11 19:24:42 +0000 |
| commit | db0c7be6423dbe8ddcb8a525d7a72e0c4c95e72e (patch) | |
| tree | fcf753f6d4c13b55ad3ee8902b4c933e25fa5fdd /spec | |
| parent | 8672e88cd2c983917c38f6c1c138b3de55607b96 (diff) | |
[rubygems/rubygems] Add a `lockfile_checksums` configuration to include checksums in fresh lockfiles
https://github.com/rubygems/rubygems/commit/50b9ef8589
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/bundler/commands/lock_spec.rb | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/spec/bundler/commands/lock_spec.rb b/spec/bundler/commands/lock_spec.rb index 816fadf707..4f89f9f5a3 100644 --- a/spec/bundler/commands/lock_spec.rb +++ b/spec/bundler/commands/lock_spec.rb @@ -1832,6 +1832,48 @@ RSpec.describe "bundle lock" do L end + it "generates checksums by default if configured to do so" do + build_repo4 do + build_gem "nokogiri", "1.14.2" + build_gem "nokogiri", "1.14.2" do |s| + s.platform = "x86_64-linux" + end + end + + bundle "config lockfile_checksums true" + + simulate_platform "x86_64-linux" do + install_gemfile <<-G + source "https://gem.repo4" + + gem "nokogiri" + G + end + + checksums = checksums_section do |c| + c.checksum gem_repo4, "nokogiri", "1.14.2" + c.checksum gem_repo4, "nokogiri", "1.14.2", "x86_64-linux" + end + + expect(lockfile).to eq <<~L + GEM + remote: https://gem.repo4/ + specs: + nokogiri (1.14.2) + nokogiri (1.14.2-x86_64-linux) + + PLATFORMS + ruby + x86_64-linux + + DEPENDENCIES + nokogiri + #{checksums} + BUNDLED WITH + #{Bundler::VERSION} + L + end + context "when re-resolving to include prereleases" do before do build_repo4 do |
