ruby/SOURCES/rubygem-bundler-2.3.26-Test...

61 lines
1.8 KiB
Diff

From cb3d287a91e9b6762e47635137d6024fe39e117d Mon Sep 17 00:00:00 2001
From: Jarek Prokop <jprokop@redhat.com>
Date: Fri, 31 Mar 2023 12:06:21 +0200
Subject: [PATCH] Tests from bundler's PR#6225.
See <https://github.com/rubygems/rubygems/pull/6225>.
---
.../install/gemfile/specific_platform_spec.rb | 36 +++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/bundler/spec/install/gemfile/specific_platform_spec.rb b/bundler/spec/install/gemfile/specific_platform_spec.rb
index 98efec396..a29446305 100644
--- a/bundler/spec/install/gemfile/specific_platform_spec.rb
+++ b/bundler/spec/install/gemfile/specific_platform_spec.rb
@@ -104,6 +104,42 @@
L
end
+ it "still installs the generic RUBY variant if necessary even when running on a legacy lockfile locked only to RUBY" do
+ build_repo4 do
+ build_gem "nokogiri", "1.3.10"
+ build_gem "nokogiri", "1.3.10" do |s|
+ s.platform = "arm64-darwin"
+ s.required_ruby_version = "< #{Gem.ruby_version}"
+ end
+
+ build_gem "bundler", "2.1.4"
+ end
+
+ gemfile <<~G
+ source "#{file_uri_for(gem_repo4)}"
+ gem "nokogiri"
+ G
+
+ lockfile <<-L
+ GEM
+ remote: #{file_uri_for(gem_repo4)}/
+ specs:
+ nokogiri (1.3.10)
+ PLATFORMS
+ ruby
+ DEPENDENCIES
+ nokogiri
+ RUBY VERSION
+ 2.5.3p105
+ BUNDLED WITH
+ 2.1.4
+ L
+
+ simulate_platform "arm64-darwin-22" do
+ bundle "update --bundler", :artifice => "compact_index", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s }
+ end
+ end
+
it "doesn't discard previously installed platform specific gem and fall back to ruby on subsequent bundles" do
build_repo2 do
build_gem("libv8", "8.4.255.0")
--
2.40.0