[rubygems/rubygems] util/rubocop -A --only Layout/EmptyLinesAroundExceptionHandlingKeywords
https://github.com/rubygems/rubygems/commit/ad1fe68d97
This commit is contained in:
parent
583fbc627c
commit
9ffd73523d
@ -262,7 +262,6 @@ For further reading on signing gems see `ri Gem::Security`.
|
|||||||
key = File.read key_file
|
key = File.read key_file
|
||||||
passphrase = ENV["GEM_PRIVATE_KEY_PASSPHRASE"]
|
passphrase = ENV["GEM_PRIVATE_KEY_PASSPHRASE"]
|
||||||
options[:key] = OpenSSL::PKey.read key, passphrase
|
options[:key] = OpenSSL::PKey.read key, passphrase
|
||||||
|
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
alert_error \
|
alert_error \
|
||||||
"--private-key not specified and ~/.gem/gem-private_key.pem does not exist"
|
"--private-key not specified and ~/.gem/gem-private_key.pem does not exist"
|
||||||
|
@ -178,7 +178,6 @@ class Gem::DependencyInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
set << specs
|
set << specs
|
||||||
|
|
||||||
rescue Gem::RemoteFetcher::FetchError => e
|
rescue Gem::RemoteFetcher::FetchError => e
|
||||||
# FIX if there is a problem talking to the network, we either need to always tell
|
# FIX if there is a problem talking to the network, we either need to always tell
|
||||||
# the user (no really_verbose) or fail hard, not silently tell them that we just
|
# the user (no really_verbose) or fail hard, not silently tell them that we just
|
||||||
|
@ -223,7 +223,6 @@ class Gem::Request
|
|||||||
end
|
end
|
||||||
|
|
||||||
verbose "#{response.code} #{response.message}"
|
verbose "#{response.code} #{response.message}"
|
||||||
|
|
||||||
rescue Net::HTTPBadResponse
|
rescue Net::HTTPBadResponse
|
||||||
verbose "bad response"
|
verbose "bad response"
|
||||||
|
|
||||||
|
@ -592,7 +592,6 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
|
|||||||
@current_repository = repository
|
@current_repository = repository
|
||||||
|
|
||||||
yield
|
yield
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
@current_repository = nil
|
@current_repository = nil
|
||||||
end
|
end
|
||||||
@ -684,7 +683,6 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
|
|||||||
@current_groups = groups
|
@current_groups = groups
|
||||||
|
|
||||||
yield
|
yield
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
@current_groups = nil
|
@current_groups = nil
|
||||||
end
|
end
|
||||||
@ -759,7 +757,6 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
|
|||||||
@current_platforms = platforms
|
@current_platforms = platforms
|
||||||
|
|
||||||
yield
|
yield
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
@current_platforms = nil
|
@current_platforms = nil
|
||||||
end
|
end
|
||||||
|
@ -68,7 +68,6 @@ class TestGemCommand < Gem::TestCase
|
|||||||
|
|
||||||
Gem::Command.extra_args = "--awesome=true --verbose"
|
Gem::Command.extra_args = "--awesome=true --verbose"
|
||||||
assert_equal %w[--awesome=true --verbose], Gem::Command.extra_args
|
assert_equal %w[--awesome=true --verbose], Gem::Command.extra_args
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
Gem::Command.extra_args = extra_args
|
Gem::Command.extra_args = extra_args
|
||||||
$; = separator
|
$; = separator
|
||||||
|
@ -48,7 +48,6 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
|
|||||||
assert_match %r{- /bin$}, @ui.output
|
assert_match %r{- /bin$}, @ui.output
|
||||||
|
|
||||||
assert_empty @ui.error
|
assert_empty @ui.error
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
Gem.sources.replace orig_sources
|
Gem.sources.replace orig_sources
|
||||||
ENV["PATH"] = orig_path
|
ENV["PATH"] = orig_path
|
||||||
@ -125,7 +124,6 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
|
|||||||
|
|
||||||
assert_equal "http://gems.example.com\n", @ui.output
|
assert_equal "http://gems.example.com\n", @ui.output
|
||||||
assert_equal "", @ui.error
|
assert_equal "", @ui.error
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
Gem.sources.replace orig_sources
|
Gem.sources.replace orig_sources
|
||||||
end
|
end
|
||||||
|
@ -218,7 +218,6 @@ end
|
|||||||
RbConfig::CONFIG["configure_args"] = args if args
|
RbConfig::CONFIG["configure_args"] = args if args
|
||||||
|
|
||||||
yield
|
yield
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
if configure_args
|
if configure_args
|
||||||
RbConfig::CONFIG["configure_args"] = configure_args
|
RbConfig::CONFIG["configure_args"] = configure_args
|
||||||
|
@ -361,7 +361,6 @@ gem 'other', version
|
|||||||
end
|
end
|
||||||
|
|
||||||
assert_equal "", @ui.error
|
assert_equal "", @ui.error
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
ENV["PATH"] = old_path
|
ENV["PATH"] = old_path
|
||||||
end
|
end
|
||||||
|
@ -127,7 +127,6 @@ class TestGemRequestConnectionPool < Gem::TestCase
|
|||||||
net_http_args = pools.send :net_http_args, URI("http://example"), @proxy
|
net_http_args = pools.send :net_http_args, URI("http://example"), @proxy
|
||||||
|
|
||||||
assert_equal ["example", 80, nil, nil], net_http_args
|
assert_equal ["example", 80, nil, nil], net_http_args
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
ENV["no_proxy"] = orig_no_proxy
|
ENV["no_proxy"] = orig_no_proxy
|
||||||
end
|
end
|
||||||
|
@ -362,7 +362,6 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|||||||
|
|
||||||
assert_empty @set.dependencies
|
assert_empty @set.dependencies
|
||||||
end
|
end
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
Gem.win_platform = win_platform
|
Gem.win_platform = win_platform
|
||||||
end
|
end
|
||||||
|
@ -810,7 +810,6 @@ dependencies: []
|
|||||||
@a2.files.clear
|
@a2.files.clear
|
||||||
|
|
||||||
assert_equal @a2, spec
|
assert_equal @a2, spec
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
$SAFE = 0
|
$SAFE = 0
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user