From c982cbd16a97e74be42463580c8dea0c1c4bb280 Mon Sep 17 00:00:00 2001 From: hsbt Date: Tue, 17 Jul 2018 11:39:16 +0000 Subject: Unified common workflow for default gems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/sync_default_gems.rb | 34 +++++++++------------------------- 1 file 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 -- cgit v1.2.3