summaryrefslogtreecommitdiff
path: root/spec/bundler/install/yanked_spec.rb
diff options
context:
space:
mode:
authorMercedes Bernard <mercedesrbernard@gmail.com>2023-02-10 13:34:30 -0600
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-10-23 13:59:01 +0900
commit69d7e9a12eb6e3dbfa1b1021b73c2afcbf7d4a46 (patch)
tree10e56a9112f606e866624095ec8acacce0500288 /spec/bundler/install/yanked_spec.rb
parentad08674d8dc17c4ca031ce20760c4a4779c83e27 (diff)
[rubygems/rubygems] Use the server checksum, then calculate from gem on disk if possible
1. Use the checksum provided by the server if provided: provides security knowing if the gem you downloaded matches the gem on the server 2. Calculate the checksum from the gem on disk: provides security knowing if the gem has changed between installs 3. In some cases, neither is possible in which case we don't put anything in the checksum and we maintain functionality as it is today Add the checksums to specs in the index if we already have them Prior to checksums, we didn't lose any information when overwriting specs in the index with stubs. But now when we overwrite EndpointSpecifications or RemoteSpecifications with more generic specs, we could lose checksum info. This manually sets checksum info so we keep it in the index. https://github.com/rubygems/rubygems/commit/de00a4f153
Diffstat (limited to 'spec/bundler/install/yanked_spec.rb')
-rw-r--r--spec/bundler/install/yanked_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/bundler/install/yanked_spec.rb b/spec/bundler/install/yanked_spec.rb
index 930e3c4791..bc84e25417 100644
--- a/spec/bundler/install/yanked_spec.rb
+++ b/spec/bundler/install/yanked_spec.rb
@@ -161,6 +161,7 @@ RSpec.context "when resolving a bundle that includes yanked gems, but unlocking
foo
CHECKSUMS
+ #{checksum_for_repo_gem(gem_repo4, "bar", "2.0.0")}
BUNDLED WITH
#{Bundler::VERSION}