diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-28 10:08:52 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-28 10:08:52 +0000 |
commit | c97f55efa5a7cd96e047d585f1270193acd784fb (patch) | |
tree | 991b68344fd1117f49582a0257f8906a9b65b6b8 | |
parent | 5d8bff6d904685f9c317cd04c5b6ae07165c02fb (diff) | |
download | ruby-c97f55efa5a7cd96e047d585f1270193acd784fb.tar.gz |
* tool/instruby.rb (:gem): registers the bundled version
of minitest as a gem as rdoc or rake.
c.f. [ruby-dev:38692].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rwxr-xr-x | tool/instruby.rb | 14 |
2 files changed, 16 insertions, 6 deletions
@@ -1,6 +1,12 @@ +Sun Jun 28 19:03:46 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp> + + * tool/instruby.rb (:gem): registers the bundled version + of minitest as a gem as rdoc or rake. + c.f. [ruby-dev:38692]. + Sun Jun 28 19:02:07 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp> - * lib/rubygems.rb (ConfigMap[:rubylibprefix]): new entry + * lib/rubygems.rb (ConfigMap[:rubylibprefix]): new entry. * lib/rubygems/defaults.rb (Gem.default_dir): considers "--with-rubylibprefix" configure option. diff --git a/tool/instruby.rb b/tool/instruby.rb index 730a9151d4..26f75bbbf6 100755 --- a/tool/instruby.rb +++ b/tool/instruby.rb @@ -511,13 +511,17 @@ install?(:ext, :comm, :gem) do prepare "default gems", gpath, directories destdir = File.join(gpath, directories.grep(/^spec/)[0]) - gems = %w[rake rdoc] - gems.each do |gem| - lib = File.join(srcdir, "lib/#{gem}.rb") + default_gems = [ + ['rake', 'rake.rb'], + ['rdoc', 'rdoc.rb'], + ['minitest', 'minitest/unit.rb'], + ] + default_gems.each do |name, lib| + lib = File.join(srcdir, "lib", lib) version = open(lib) {|f| f.find {|s| /^\s*\w*VERSION\s*=(?!=)/ =~ s}} or next version = version.split(%r"=\s*", 2)[1].strip - open_for_install(File.join(destdir, "#{gem}.gemspec"), $data_mode) do |f| - "Gem::Specification.new {|s| s.name, s.version = #{gem.dump}, #{version}}\n" + open_for_install(File.join(destdir, "#{name}.gemspec"), $data_mode) do |f| + "Gem::Specification.new {|s| s.name, s.version = #{name.dump}, #{version}}\n" end end end |