1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rubygems: Update to RubyGems master bf37240. Fixes useless

error message with `gem install -g` with no gem dependencies file.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2013-12-08 23:41:14 +00:00
parent 599dbf65a5
commit 05ba6fffcc
3 changed files with 21 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Mon Dec 9 08:40:40 2013 Eric Hodel <drbrain@segment7.net>
* lib/rubygems: Update to RubyGems master bf37240. Fixes useless
error message with `gem install -g` with no gem dependencies file.
* test/rubygems: ditto.
Mon Dec 9 04:52:25 2013 Eric Hodel <drbrain@segment7.net>
* NEWS: Update RubyGems entry with notable features.

View file

@ -40,6 +40,13 @@ class Gem::Commands::InstallCommand < Gem::Command
File.exist? file
end unless v
unless v then
message = v ? v : "(tried #{Gem::GEM_DEP_FILES.join ', '})"
raise OptionParser::InvalidArgument,
"cannot find gem dependencies file #{message}"
end
o[:gemdeps] = v
end

View file

@ -809,14 +809,22 @@ ERROR: Possible alternatives: non_existent_with_hint
end
def test_handle_options_file
FileUtils.touch 'Gemfile'
@cmd.handle_options %w[-g Gemfile]
assert_equal 'Gemfile', @cmd.options[:gemdeps]
FileUtils.rm 'Gemfile'
FileUtils.touch 'gem.deps.rb'
@cmd.handle_options %w[--file gem.deps.rb]
assert_equal 'gem.deps.rb', @cmd.options[:gemdeps]
FileUtils.rm 'gem.deps.rb'
FileUtils.touch 'Isolate'
@cmd.handle_options %w[-g]