mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Enable Layout/AlignArray
cop
https://github.com/rubygems/rubygems/commit/1ea674d8f7
This commit is contained in:
parent
0817d95714
commit
497efa0ec9
4 changed files with 9 additions and 9 deletions
|
@ -55,9 +55,9 @@ module Gem::Deprecate
|
||||||
klass = self.kind_of? Module
|
klass = self.kind_of? Module
|
||||||
target = klass ? "#{self}." : "#{self.class}#"
|
target = klass ? "#{self}." : "#{self.class}#"
|
||||||
msg = [ "NOTE: #{target}#{name} is deprecated",
|
msg = [ "NOTE: #{target}#{name} is deprecated",
|
||||||
repl == :none ? " with no replacement" : "; use #{repl} instead",
|
repl == :none ? " with no replacement" : "; use #{repl} instead",
|
||||||
". It will be removed on or after %4d-%02d-01." % [year, month],
|
". It will be removed on or after %4d-%02d-01." % [year, month],
|
||||||
"\n#{target}#{name} called from #{Gem.location_of_caller.join(":")}",
|
"\n#{target}#{name} called from #{Gem.location_of_caller.join(":")}",
|
||||||
]
|
]
|
||||||
warn "#{msg.join}." unless Gem::Deprecate.skip
|
warn "#{msg.join}." unless Gem::Deprecate.skip
|
||||||
send old, *args, &block
|
send old, *args, &block
|
||||||
|
|
|
@ -278,7 +278,7 @@ class Gem::RemoteFetcher
|
||||||
rescue Timeout::Error
|
rescue Timeout::Error
|
||||||
raise UnknownHostError.new('timed out', uri.to_s)
|
raise UnknownHostError.new('timed out', uri.to_s)
|
||||||
rescue IOError, SocketError, SystemCallError,
|
rescue IOError, SocketError, SystemCallError,
|
||||||
*(OpenSSL::SSL::SSLError if defined?(OpenSSL)) => e
|
*(OpenSSL::SSL::SSLError if defined?(OpenSSL)) => e
|
||||||
if e.message =~ /getaddrinfo/
|
if e.message =~ /getaddrinfo/
|
||||||
raise UnknownHostError.new('no such name', uri.to_s)
|
raise UnknownHostError.new('no such name', uri.to_s)
|
||||||
else
|
else
|
||||||
|
|
|
@ -129,7 +129,7 @@ class TestGemCommandManager < Gem::TestCase
|
||||||
check_options = nil
|
check_options = nil
|
||||||
@command_manager.process_args %w[
|
@command_manager.process_args %w[
|
||||||
install --force --local --document=ri,rdoc --install-dir .
|
install --force --local --document=ri,rdoc --install-dir .
|
||||||
--version 3.0 --no-wrapper --bindir .
|
--version 3.0 --no-wrapper --bindir .
|
||||||
]
|
]
|
||||||
assert_equal %w[rdoc ri], check_options[:document].sort
|
assert_equal %w[rdoc ri], check_options[:document].sort
|
||||||
assert_equal true, check_options[:force]
|
assert_equal true, check_options[:force]
|
||||||
|
|
|
@ -384,7 +384,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
||||||
|
|
||||||
expected = [
|
expected = [
|
||||||
[Gem::NameTuple.new('a', v(2), Gem::Platform::RUBY),
|
[Gem::NameTuple.new('a', v(2), Gem::Platform::RUBY),
|
||||||
Gem::Source.new(@gem_repo)],
|
Gem::Source.new(@gem_repo)],
|
||||||
]
|
]
|
||||||
|
|
||||||
assert_equal expected, @cmd.fetch_remote_gems(specs['a-1'])
|
assert_equal expected, @cmd.fetch_remote_gems(specs['a-1'])
|
||||||
|
@ -412,7 +412,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
||||||
|
|
||||||
expected = [
|
expected = [
|
||||||
[Gem::NameTuple.new('a', v(2), Gem::Platform::RUBY),
|
[Gem::NameTuple.new('a', v(2), Gem::Platform::RUBY),
|
||||||
Gem::Source.new(@gem_repo)],
|
Gem::Source.new(@gem_repo)],
|
||||||
]
|
]
|
||||||
|
|
||||||
assert_equal expected, @cmd.fetch_remote_gems(specs['a-1'])
|
assert_equal expected, @cmd.fetch_remote_gems(specs['a-1'])
|
||||||
|
@ -429,9 +429,9 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
|
||||||
|
|
||||||
expected = [
|
expected = [
|
||||||
[Gem::NameTuple.new('a', v(2), Gem::Platform::RUBY),
|
[Gem::NameTuple.new('a', v(2), Gem::Platform::RUBY),
|
||||||
Gem::Source.new(@gem_repo)],
|
Gem::Source.new(@gem_repo)],
|
||||||
[Gem::NameTuple.new('a', v('3.a'), Gem::Platform::RUBY),
|
[Gem::NameTuple.new('a', v('3.a'), Gem::Platform::RUBY),
|
||||||
Gem::Source.new(@gem_repo)],
|
Gem::Source.new(@gem_repo)],
|
||||||
]
|
]
|
||||||
|
|
||||||
assert_equal expected, @cmd.fetch_remote_gems(specs['a-1'])
|
assert_equal expected, @cmd.fetch_remote_gems(specs['a-1'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue