summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2023-03-16 12:22:51 +0900
committerHiroshi SHIBATA <[email protected]>2023-03-17 18:50:55 +0900
commitae81ff0c9b120d1d2ee4b0d1400cf1358c81f86f (patch)
treee88cdb62e766b84de27d1f305ab5b31da48ad6e6 /lib
parent9a1269eaaa4b50e0d9e95041a76090e7c6f09313 (diff)
[rubygems/rubygems] util/rubocop -A --only Layout/MultilineBlockLayout
https://github.com/rubygems/rubygems/commit/9aa6101942
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/commands/dependency_command.rb3
-rw-r--r--lib/rubygems/local_remote_options.rb3
-rw-r--r--lib/rubygems/version_option.rb6
3 files changed, 4 insertions, 8 deletions
diff --git a/lib/rubygems/commands/dependency_command.rb b/lib/rubygems/commands/dependency_command.rb
index 3f69a95e83..a5870e9106 100644
--- a/lib/rubygems/commands/dependency_command.rb
+++ b/lib/rubygems/commands/dependency_command.rb
@@ -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
diff --git a/lib/rubygems/local_remote_options.rb b/lib/rubygems/local_remote_options.rb
index 0cf7564ce5..9751d9cd4c 100644
--- a/lib/rubygems/local_remote_options.rb
+++ b/lib/rubygems/local_remote_options.rb
@@ -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
diff --git a/lib/rubygems/version_option.rb b/lib/rubygems/version_option.rb
index 4dcd2c9266..538433f640 100644
--- a/lib/rubygems/version_option.rb
+++ b/lib/rubygems/version_option.rb
@@ -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])