summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-17 11:39:16 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-17 11:39:16 +0000
commitc982cbd16a97e74be42463580c8dea0c1c4bb280 (patch)
treeb8d3294439b2e47b7e96b9459ba8d0c9b6571e8d /tool
parentd459572c10d4f8a63a659278266facaf99293267 (diff)
Unified common workflow for default gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r--tool/sync_default_gems.rb34
1 files changed, 9 insertions, 25 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index 1ec11cb20c..dc21982298 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -127,16 +127,6 @@ def sync_default_gems(gem)
`cp -rf ../io-console/lib/console ext/io/console/lib`
`cp -f ../io-console/io-console.gemspec ext/io/console`
`git checkout ext/io/console/depend`
- when "csv"
- `rm -rf lib/csv* test/csv`
- `cp -rf ../csv/lib/* lib`
- `cp -rf ../csv/test/csv test`
- `cp -f ../csv/csv.gemspec lib/csv`
- when "irb"
- `rm -rf lib/irb* test/irb`
- `cp -rf ../irb/lib/* lib`
- `cp -rf ../irb/test/irb test`
- `cp -f ../irb/irb.gemspec lib/irb`
when "webrick"
`rm -rf lib/webrick* test/webrick`
`cp -rf ../webrick/lib/webrick* lib`
@@ -217,30 +207,24 @@ def sync_default_gems(gem)
`cp -rf ../prime/lib/* lib`
`cp -rf ../prime/test/test_prime.rb test`
`cp -f ../prime/prime.gemspec lib`
- when "matrix"
- `rm -rf lib/matrix* test/matrix`
- `cp -rf ../matrix/lib/* lib`
- `cp -rf ../matrix/test/matrix test`
- `cp -f ../matrix/matrix.gemspec lib/matrix`
when "ostruct"
`rm -rf lib/ostruct.rb test/ostruct`
`cp -rf ../ostruct/lib/* lib`
`cp -rf ../ostruct/test/ostruct test`
`cp -f ../ostruct/ostruct.gemspec lib`
- when "rexml"
- `rm -rf lib/rexml* test/rexml`
- `cp -rf ../rexml/lib/* lib`
- `cp -rf ../rexml/test/rexml test`
- `cp -f ../rexml/rexml.gemspec lib/rexml`
- when "rss"
- `rm -rf lib/rss* test/rss`
- `cp -rf ../rss/lib/* lib`
- `cp -rf ../rss/test/rss test`
- `cp -f ../rss/rss.gemspec lib/rss`
+ when "rexml", "rss", "matrix", "irb", "csv"
+ sync_lib gem
else
end
end
+def sync_lib(repo)
+ `rm -rf lib/#{repo}* test/#{repo}`
+ `cp -rf ../#{repo}/lib/* lib`
+ `cp -rf ../#{repo}/test/#{repo} test`
+ `cp -f ../#{repo}/#{repo}.gemspec lib/#{repo}`
+end
+
if ARGV[0]
sync_default_gems(ARGV[0])
else