зеркало из https://github.com/github/ruby.git
* 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:
Родитель
599dbf65a5
Коммит
05ba6fffcc
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
Загрузка…
Ссылка в новой задаче