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:
parent
599dbf65a5
commit
05ba6fffcc
3 changed files with 21 additions and 0 deletions
|
@ -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>
|
Mon Dec 9 04:52:25 2013 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* NEWS: Update RubyGems entry with notable features.
|
* NEWS: Update RubyGems entry with notable features.
|
||||||
|
|
|
@ -40,6 +40,13 @@ class Gem::Commands::InstallCommand < Gem::Command
|
||||||
File.exist? file
|
File.exist? file
|
||||||
end unless v
|
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
|
o[:gemdeps] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -809,14 +809,22 @@ ERROR: Possible alternatives: non_existent_with_hint
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_handle_options_file
|
def test_handle_options_file
|
||||||
|
FileUtils.touch 'Gemfile'
|
||||||
|
|
||||||
@cmd.handle_options %w[-g Gemfile]
|
@cmd.handle_options %w[-g Gemfile]
|
||||||
|
|
||||||
assert_equal 'Gemfile', @cmd.options[:gemdeps]
|
assert_equal 'Gemfile', @cmd.options[:gemdeps]
|
||||||
|
|
||||||
|
FileUtils.rm 'Gemfile'
|
||||||
|
|
||||||
|
FileUtils.touch 'gem.deps.rb'
|
||||||
|
|
||||||
@cmd.handle_options %w[--file gem.deps.rb]
|
@cmd.handle_options %w[--file gem.deps.rb]
|
||||||
|
|
||||||
assert_equal 'gem.deps.rb', @cmd.options[:gemdeps]
|
assert_equal 'gem.deps.rb', @cmd.options[:gemdeps]
|
||||||
|
|
||||||
|
FileUtils.rm 'gem.deps.rb'
|
||||||
|
|
||||||
FileUtils.touch 'Isolate'
|
FileUtils.touch 'Isolate'
|
||||||
|
|
||||||
@cmd.handle_options %w[-g]
|
@cmd.handle_options %w[-g]
|
||||||
|
|
Loading…
Reference in a new issue