mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* instruby.rb (default gems): installs default gemspecs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8fd1340296
commit
6ec4b20520
2 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Mar 9 14:55:27 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* instruby.rb (default gems): installs default gemspecs.
|
||||
|
||||
Mon Mar 9 14:48:08 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/Makefile.sub (OPTFLAGS): simplified. see [ruby-core:22725]
|
||||
|
|
11
instruby.rb
11
instruby.rb
|
@ -484,6 +484,17 @@ install?(:ext, :comm, :gem) do
|
|||
end
|
||||
gpath = CONFIG["sitelibdir"].sub(%r'/site_ruby/(?=[^/]+)', '/gems/')
|
||||
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")
|
||||
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"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
$install << :local << :ext if $install.empty?
|
||||
|
|
Loading…
Reference in a new issue