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

https://github.com/rubygems/rubygems/commit/9aa6101942
This commit is contained in:
Hiroshi SHIBATA 2023-03-16 12:22:51 +09:00
parent 9a1269eaaa
commit ae81ff0c9b
4 changed files with 6 additions and 10 deletions

View File

@ -17,8 +17,7 @@ class Gem::Commands::DependencyCommand < Gem::Command
add_prerelease_option
add_option("-R", "--[no-]reverse-dependencies",
"Include reverse dependencies in the output") do
|value, options|
"Include reverse dependencies in the output") do |value, options|
options[:reverse_dependencies] = value
end

View File

@ -65,8 +65,7 @@ module Gem::LocalRemoteOptions
def add_bulk_threshold_option
add_option(:"Local/Remote", "-B", "--bulk-threshold COUNT",
"Threshold for switching to bulk",
"synchronization (default #{Gem.configuration.bulk_threshold})") do
|value, _options|
"synchronization (default #{Gem.configuration.bulk_threshold})") do |value, _options|
Gem.configuration.bulk_threshold = value.to_i
end
end

View File

@ -24,8 +24,7 @@ module Gem::VersionOption
end
add_option("--platform PLATFORM", Gem::Platform,
"Specify the platform of gem to #{task}", *wrap) do
|value, options|
"Specify the platform of gem to #{task}", *wrap) do |value, options|
unless options[:added_platform]
Gem.platforms = [Gem::Platform::RUBY]
options[:added_platform] = true
@ -55,8 +54,7 @@ module Gem::VersionOption
end
add_option("-v", "--version VERSION", Gem::Requirement,
"Specify version of gem to #{task}", *wrap) do
|value, options|
"Specify version of gem to #{task}", *wrap) do |value, options|
# Allow handling for multiple --version operators
if options[:version] && !options[:version].none?
options[:version].concat([value])

View File

@ -207,8 +207,8 @@ class TestGemResolver < Gem::TestCase
s.add_development_dependency "b"
end
b_spec = util_spec "b", 1 do
|s| s.add_development_dependency "c"
b_spec = util_spec "b", 1 do |s|
s.add_development_dependency "c"
end
c_spec = util_spec "c", 1