Rename single line block parameters to acc/elem
.
This commit is contained in:
parent
e9391481a8
commit
c648518f35
@ -139,6 +139,9 @@ Style/RegexpLiteral:
|
|||||||
Style/SpaceAroundOperators:
|
Style/SpaceAroundOperators:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
Style/SingleLineBlockParams:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
# not a problem for typical shell users
|
# not a problem for typical shell users
|
||||||
Style/SpecialGlobalVars:
|
Style/SpecialGlobalVars:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
@ -147,7 +147,7 @@ module Hbc
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.size_in_bytes(files)
|
def self.size_in_bytes(files)
|
||||||
Array(files).reduce(0) { |a, e| a + (File.size?(e) || 0) }
|
Array(files).reduce(0) { |acc, elem| acc + (File.size?(elem) || 0) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.capture_stderr
|
def self.capture_stderr
|
||||||
|
@ -62,7 +62,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
tap_migrations = Utils::JSON.load(File.read(tap_migrations_path))
|
tap_migrations = Utils::JSON.load(File.read(tap_migrations_path))
|
||||||
tap_migrations[formula.name] = boneyard_tap.name
|
tap_migrations[formula.name] = boneyard_tap.name
|
||||||
tap_migrations = tap_migrations.sort.inject({}) { |a, e| a.merge!(e[0] => e[1]) }
|
tap_migrations = tap_migrations.sort.inject({}) { |acc, elem| acc.merge!(elem[0] => elem[1]) }
|
||||||
tap_migrations_path.atomic_write(JSON.pretty_generate(tap_migrations) + "\n")
|
tap_migrations_path.atomic_write(JSON.pretty_generate(tap_migrations) + "\n")
|
||||||
end
|
end
|
||||||
unless which("hub") || local_only
|
unless which("hub") || local_only
|
||||||
|
@ -69,7 +69,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def inject_file_list(list, string)
|
def inject_file_list(list, string)
|
||||||
list.inject(string) { |a, e| a << " #{e}\n" }
|
list.inject(string) { |acc, elem| acc << " #{elem}\n" }
|
||||||
end
|
end
|
||||||
############# END HELPERS
|
############# END HELPERS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user