Adjust spec of bundler like as sync_default_gems [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2023-01-08 21:02:38 +09:00
parent 60ccd1ca81
commit 1cd4db772c
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -540,11 +540,22 @@ module SyncDefaultGems
end end
next if skipped next if skipped
case gem
when "rubygems"
%w[bundler/spec/support/artifice/vcr_cassettes].each do |rem|
if File.exist?(rem)
system("git", "reset", rem)
rm_rf(rem)
end
end
system(*%w[git add spec/bundler])
end
if result.empty? if result.empty?
skipped = true skipped = true
elsif /^CONFLICT/ =~ result elsif /^CONFLICT/ =~ result
result = pipe_readlines(%W"git status --porcelain -z") result = pipe_readlines(%W"git status --porcelain -z")
result.map! {|line| line[/\A(?:.U|AA) (.*)/, 1]} result.map! {|line| line[/\A(?:.U|[UA]A) (.*)/, 1]}
result.compact! result.compact!
ignore, conflict = result.partition {|name| IGNORE_FILE_PATTERN =~ name} ignore, conflict = result.partition {|name| IGNORE_FILE_PATTERN =~ name}
unless ignore.empty? unless ignore.empty?