Skip to content

Commit

Permalink
* defs/default_gems: separate from tool/rbinstall.rb.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jul 30, 2011
1 parent 77ed599 commit 92b9c6b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -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.
Expand Down
7 changes: 7 additions & 0 deletions defs/default_gems
@@ -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
20 changes: 10 additions & 10 deletions tool/rbinstall.rb
Expand Up @@ -539,16 +539,16 @@ class << (w = [])
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
Expand Down

0 comments on commit 92b9c6b

Please sign in to comment.