summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-01 15:03:48 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-01 15:03:48 +0000
commitf89c440e879993de0cfd61ed8d3be161587f7530 (patch)
tree0fb2e9ed7b911b772e777413c075dd33ce315083 /tool
parentffb913796cd245221b07865b539249b55c1b8c78 (diff)
merges r29200 from trunk into ruby_1_9_2, but also leaves the old
files without suffixed. -- * tool/rbinstall.rb (install?): gemspec filename should include its version. patched by Luis Lavena [ruby-core:32165] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@29663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/rbinstall.rb15
1 files changed, 11 insertions, 4 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index f5586fe1f0..ffac2bf031 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -513,15 +513,22 @@ install?(:ext, :comm, :gem) do
version = open(src) {|f| f.find {|s| /^\s*\w*VERSION\s*=(?!=)/ =~ s}} or next
version = version.split(%r"=\s*", 2)[1].strip[/\A([\'\"])(.*?)\1/, 2]
puts "#{" "*30}#{name} #{version}"
- open_for_install(File.join(destdir, "#{name}.gemspec"), $data_mode) do
- <<-GEMSPEC
+ gemspec = <<-GEMSPEC
Gem::Specification.new do |s|
s.name = #{name.dump}
s.version = #{version.dump}
s.summary = "This #{name} is bundled with Ruby"
end
- GEMSPEC
- end
+ GEMSPEC
+ open_for_install(File.join(destdir, "#{name}-#{version}.gemspec"), $data_mode) { gemspec }
+ open_for_install(File.join(destdir, "#{name}.gemspec"), $data_mode) {
+ <<-WARNING + gemspec
+# #{name}.gemspec remains just for compatibility with installation
+# before Ruby 1.9.2-p32.
+# This file will no longer exist in Ruby 1.9.3.
+# Refer #{name}-#{version}.gemspec instead.
+ WARNING
+ }
end
end