mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* defs/default_gems: separate from tool/rbinstall.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
321346cfa5
commit
6466df87a6
3 changed files with 21 additions and 10 deletions
|
@ -1,3 +1,7 @@
|
|||
Sat Jul 30 23:19:09 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* defs/default_gems: separate from tool/rbinstall.rb.
|
||||
|
||||
Sat Jul 30 23:14:44 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* io.c (rb_io_each_byte): rbuf can be refreshed during yield.
|
||||
|
|
7
defs/default_gems
Normal file
7
defs/default_gems
Normal file
|
@ -0,0 +1,7 @@
|
|||
# gem versioning file [executable files under bin]
|
||||
rake lib/rake/version.rb [rake]
|
||||
rdoc lib/rdoc.rb [rdoc ri]
|
||||
minitest lib/minitest/unit.rb
|
||||
json ext/json/lib/json/version.rb
|
||||
io-console ext/io/console/io-console.gemspec
|
||||
bigdecimal ext/bigdecimal/bigdecimal.gemspec
|
|
@ -540,16 +540,16 @@ install?(:ext, :comm, :gem) do
|
|||
prepare "default gems", gem_dir, directories
|
||||
|
||||
spec_dir = File.join(gem_dir, directories.grep(/^spec/)[0])
|
||||
default_gems = [
|
||||
['rake', 'lib/rake/version.rb', ['rake']],
|
||||
['rdoc', 'lib/rdoc.rb', ['rdoc', 'ri']],
|
||||
['minitest', 'lib/minitest/unit.rb'],
|
||||
['json', 'ext/json/lib/json/version.rb'],
|
||||
['io-console', 'ext/io/console/io-console.gemspec'],
|
||||
['bigdecimal', 'ext/bigdecimal/bigdecimal.gemspec'],
|
||||
]
|
||||
|
||||
default_gems.each do |name, src, execs|
|
||||
File.foreach(File.join(srcdir, "defs/default_gems")) do |line|
|
||||
line.chomp!
|
||||
line.sub!(/\s*#.*/, '')
|
||||
next if line.empty?
|
||||
words = []
|
||||
line.scan(/\G\s*([^\[\]\s]+|\[([^\[\]]*)\])/) do
|
||||
words << ($2 ? $2.split : $1)
|
||||
end
|
||||
name, src, execs = *words
|
||||
next unless name and src
|
||||
execs ||= []
|
||||
src = File.join(srcdir, src)
|
||||
version = open(src) {|f| f.find {|s| /^\s*\w*VERSION\s*=(?!=)/ =~ s}} or next
|
||||
|
|
Loading…
Reference in a new issue