1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use space inside block braces everywhere

To make rubygems code style consistent with bundler.
This commit is contained in:
David Rodríguez 2020-06-10 19:46:05 +02:00 committed by Hiroshi SHIBATA
parent ef481c120c
commit 955f1837a1
Notes: git 2020-06-15 21:21:04 +09:00
99 changed files with 469 additions and 469 deletions

View file

@ -75,7 +75,7 @@ is too hard to use.
terminate_interaction(check_installed_gems(gem_names)) if check_installed_gems?
gem_names.each { |n| show_gems(n) }
gem_names.each {|n| show_gems(n) }
end
private
@ -187,12 +187,12 @@ is too hard to use.
# Check if gem +name+ version +version+ is installed.
def installed?(name, req = Gem::Requirement.default)
Gem::Specification.any? { |s| s.name =~ name and req =~ s.version }
Gem::Specification.any? {|s| s.name =~ name and req =~ s.version }
end
def output_query_results(spec_tuples)
output = []
versions = Hash.new { |h,name| h[name] = [] }
versions = Hash.new {|h,name| h[name] = [] }
spec_tuples.each do |spec_tuple, source|
versions[spec_tuple.name] << [spec_tuple, source]
@ -209,9 +209,9 @@ is too hard to use.
def output_versions(output, versions)
versions.each do |gem_name, matching_tuples|
matching_tuples = matching_tuples.sort_by { |n,_| n.version }.reverse
matching_tuples = matching_tuples.sort_by {|n,_| n.version }.reverse
platforms = Hash.new { |h,version| h[version] = [] }
platforms = Hash.new {|h,version| h[version] = [] }
matching_tuples.each do |n, _|
platforms[n.version] << n.platform if n.platform
@ -254,7 +254,7 @@ is too hard to use.
list =
if platforms.empty? or options[:details]
name_tuples.map { |n| n.version }.uniq
name_tuples.map {|n| n.version }.uniq
else
platforms.sort.reverse.map do |version, pls|
out = version.to_s
@ -332,7 +332,7 @@ is too hard to use.
def spec_platforms(entry, platforms)
non_ruby = platforms.any? do |_, pls|
pls.any? { |pl| pl != Gem::Platform::RUBY }
pls.any? {|pl| pl != Gem::Platform::RUBY }
end
return unless non_ruby
@ -343,7 +343,7 @@ is too hard to use.
else
entry << " Platforms:\n"
sorted_platforms = platforms.sort_by { |version,| version }
sorted_platforms = platforms.sort_by {|version,| version }
sorted_platforms.each do |version, pls|
label = " #{version}: "