[rubygems/rubygems] util/rubocop -A --only Layout/EmptyLinesAroundExceptionHandlingKeywords

https://github.com/rubygems/rubygems/commit/ad1fe68d97
This commit is contained in:
Hiroshi SHIBATA 2023-03-16 11:58:13 +09:00
parent 583fbc627c
commit 9ffd73523d
11 changed files with 0 additions and 14 deletions

View File

@ -262,7 +262,6 @@ For further reading on signing gems see `ri Gem::Security`.
key = File.read key_file
passphrase = ENV["GEM_PRIVATE_KEY_PASSPHRASE"]
options[:key] = OpenSSL::PKey.read key, passphrase
rescue Errno::ENOENT
alert_error \
"--private-key not specified and ~/.gem/gem-private_key.pem does not exist"

View File

@ -178,7 +178,6 @@ class Gem::DependencyInstaller
end
set << specs
rescue Gem::RemoteFetcher::FetchError => e
# 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

View File

@ -223,7 +223,6 @@ class Gem::Request
end
verbose "#{response.code} #{response.message}"
rescue Net::HTTPBadResponse
verbose "bad response"

View File

@ -592,7 +592,6 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
@current_repository = repository
yield
ensure
@current_repository = nil
end
@ -684,7 +683,6 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
@current_groups = groups
yield
ensure
@current_groups = nil
end
@ -759,7 +757,6 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
@current_platforms = platforms
yield
ensure
@current_platforms = nil
end

View File

@ -68,7 +68,6 @@ class TestGemCommand < Gem::TestCase
Gem::Command.extra_args = "--awesome=true --verbose"
assert_equal %w[--awesome=true --verbose], Gem::Command.extra_args
ensure
Gem::Command.extra_args = extra_args
$; = separator

View File

@ -48,7 +48,6 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
assert_match %r{- /bin$}, @ui.output
assert_empty @ui.error
ensure
Gem.sources.replace orig_sources
ENV["PATH"] = orig_path
@ -125,7 +124,6 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
assert_equal "http://gems.example.com\n", @ui.output
assert_equal "", @ui.error
ensure
Gem.sources.replace orig_sources
end

View File

@ -218,7 +218,6 @@ end
RbConfig::CONFIG["configure_args"] = args if args
yield
ensure
if configure_args
RbConfig::CONFIG["configure_args"] = configure_args

View File

@ -361,7 +361,6 @@ gem 'other', version
end
assert_equal "", @ui.error
ensure
ENV["PATH"] = old_path
end

View File

@ -127,7 +127,6 @@ class TestGemRequestConnectionPool < Gem::TestCase
net_http_args = pools.send :net_http_args, URI("http://example"), @proxy
assert_equal ["example", 80, nil, nil], net_http_args
ensure
ENV["no_proxy"] = orig_no_proxy
end

View File

@ -362,7 +362,6 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
assert_empty @set.dependencies
end
ensure
Gem.win_platform = win_platform
end

View File

@ -810,7 +810,6 @@ dependencies: []
@a2.files.clear
assert_equal @a2, spec
ensure
$SAFE = 0
end