[rubygems/rubygems] Simplify `lockfile_platforms` helper

To make it easier to change the default platforms that get locked later.

https://github.com/rubygems/rubygems/commit/255c4012ec
This commit is contained in:
David Rodríguez 2022-07-09 13:11:28 +02:00 коммит произвёл Hiroshi SHIBATA
Родитель 9492efbe71
Коммит 2d8b55fcd2
6 изменённых файлов: 8 добавлений и 12 удалений

Просмотреть файл

@ -154,7 +154,7 @@ RSpec.describe Bundler::Definition do
only_java (1.1-java)
PLATFORMS
#{lockfile_platforms_for("java", specific_local_platform)}
#{lockfile_platforms("java")}
DEPENDENCIES
only_java

Просмотреть файл

@ -674,7 +674,7 @@ RSpec.describe "bundle install from an existing gemspec" do
railties (6.1.4)
PLATFORMS
#{lockfile_platforms_for("java", specific_local_platform)}
#{lockfile_platforms("java")}
DEPENDENCIES
activeadmin!

Просмотреть файл

@ -514,7 +514,7 @@ RSpec.describe "bundle install with specific platforms" do
sorbet-runtime (= 0.5.10160)
PLATFORMS
#{lockfile_platforms_for([specific_local_platform, "ruby"])}
#{lockfile_platforms("ruby")}
DEPENDENCIES
sorbet-static-and-runtime
@ -769,7 +769,7 @@ RSpec.describe "bundle install with specific platforms" do
nokogiri (1.13.8-#{Gem::Platform.local})
PLATFORMS
#{lockfile_platforms_for([specific_local_platform, "ruby"])}
#{lockfile_platforms("ruby")}
DEPENDENCIES
nokogiri

Просмотреть файл

@ -982,7 +982,7 @@ RSpec.describe "the lockfile format" do
rack (1.0.0)
PLATFORMS
#{lockfile_platforms_for("java", specific_local_platform)}
#{lockfile_platforms("java")}
DEPENDENCIES
rack

Просмотреть файл

@ -86,7 +86,7 @@ RSpec.describe "Bundler.setup with multi platform stuff" do
racc (1.5.2)
PLATFORMS
#{lockfile_platforms_for("ruby", specific_local_platform)}
#{lockfile_platforms("ruby")}
DEPENDENCIES
nokogiri (~> 1.11)

Просмотреть файл

@ -99,12 +99,8 @@ module Spec
9999
end
def lockfile_platforms
lockfile_platforms_for(specific_local_platform)
end
def lockfile_platforms_for(*platforms)
platforms.map(&:to_s).sort.join("\n ")
def lockfile_platforms(*extra)
[specific_local_platform, *extra].map(&:to_s).sort.join("\n ")
end
end
end