diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-27 23:20:57 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-27 23:20:57 +0000 |
commit | a6c92a85e418dd9b748e37d0f4445784ad1e9c71 (patch) | |
tree | 057b304a1e5c55162104eec3c387cd81c7a84460 /test/rubygems/test_gem_installer.rb | |
parent | 4e040aa6ac4cc4f3b00007b8635a990ef36526c4 (diff) | |
download | ruby-a6c92a85e418dd9b748e37d0f4445784ad1e9c71.tar.gz |
* lib/rubygems/available_set.rb: Undent for style
* lib/rubygems/dependency_installer.rb: Pick latest prerelease gem to
install. Fixes RubyGems bug #468.
* test/rubygems/test_gem_dependency_installer.rb: Test for the above.
* lib/rubygems/dependency_installer.rb: Don't display "Done installing
documentation" if documentation will not be installed.
* lib/rubygems/rdoc.rb: ditto
* lib/rubygems/dependency_list.rb: Use Array#concat for Ruby 1.x
performance.
* lib/rubygems/installer.rb: Use formatted program name when comparing
executables. RubyGems pull request #471
* test/rubygems/test_gem_installer.rb: Test for the above.
* lib/rubygems/package.rb: Use more explicit feature check to work
around JRuby bug #552
* lib/rubygems/ssl_certs/GeoTrust_Global_CA.pem: Added GeoTrust root
certificate.
* test/rubygems/test_gem_source_list.rb: Use "example" instead of real
hostname
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_installer.rb')
-rw-r--r-- | test/rubygems/test_gem_installer.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index bb48f35d9f..ddedd8144c 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -190,6 +190,43 @@ load Gem.bin_path('a', 'executable', version) Gem::ConfigMap[:bindir] = orig_bindir end + def test_check_executable_overwrite_format_executable + @installer.generate_bin + + @spec = Gem::Specification.new do |s| + s.files = ['lib/code.rb'] + s.name = "a" + s.version = "3" + s.summary = "summary" + s.description = "desc" + s.require_path = 'lib' + end + + open File.join(util_inst_bindir, 'executable'), 'w' do |io| + io.write <<-EXEC +#!/usr/local/bin/ruby +# +# This file was generated by RubyGems + +gem 'other', version + EXEC + end + + util_make_exec + Gem::Installer.exec_format = 'foo-%s-bar' + @installer.gem_dir = @spec.gem_dir + @installer.wrappers = true + @installer.format_executable = true + + @installer.generate_bin # should not raise + + installed_exec = File.join util_inst_bindir, 'foo-executable-bar' + assert File.exist? installed_exec + + wrapper = File.read installed_exec + assert_match %r|generated by RubyGems|, wrapper + end + def test_check_executable_overwrite_other_gem util_conflict_executable true |