summaryrefslogtreecommitdiff
path: root/tool/sync_default_gems.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-01-08 21:02:38 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-01-08 22:14:39 +0900
commit1cd4db772c164ade7a4bd03e5859d3bea84a4194 (patch)
tree43a1dd38ff30ae37fcb338bca5d598d624695107 /tool/sync_default_gems.rb
parent60ccd1ca81e05d184b2b770526c2a627853eb23f (diff)
Adjust spec of bundler like as `sync_default_gems` [ci skip]
Diffstat (limited to 'tool/sync_default_gems.rb')
-rwxr-xr-xtool/sync_default_gems.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index 74125557eb..81dbc1f631 100755
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -540,11 +540,22 @@ module SyncDefaultGems
end
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?
skipped = true
elsif /^CONFLICT/ =~ result
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!
ignore, conflict = result.partition {|name| IGNORE_FILE_PATTERN =~ name}
unless ignore.empty?