dev-cmd/pull: fix Rubocop warnings.
This commit is contained in:
parent
71fd2bb4b0
commit
f1c64f1cdc
@ -237,7 +237,7 @@ module Homebrew
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def publish_changed_formula_bottles(tap, changed_formulae_names)
|
def publish_changed_formula_bottles(_tap, changed_formulae_names)
|
||||||
if ENV["HOMEBREW_DISABLE_LOAD_FORMULA"]
|
if ENV["HOMEBREW_DISABLE_LOAD_FORMULA"]
|
||||||
raise "Need to load formulae to publish them!"
|
raise "Need to load formulae to publish them!"
|
||||||
end
|
end
|
||||||
@ -360,7 +360,13 @@ module Homebrew
|
|||||||
def subject_for_bump(formula, old, new)
|
def subject_for_bump(formula, old, new)
|
||||||
if old[:nonexistent]
|
if old[:nonexistent]
|
||||||
# New formula
|
# New formula
|
||||||
headline_ver = new[:stable] ? new[:stable] : new[:devel] ? new[:devel] : new[:head]
|
headline_ver = if new[:stable]
|
||||||
|
new[:stable]
|
||||||
|
elsif new[:devel]
|
||||||
|
new[:devel]
|
||||||
|
else
|
||||||
|
new[:head]
|
||||||
|
end
|
||||||
subject = "#{formula.name} #{headline_ver} (new formula)"
|
subject = "#{formula.name} #{headline_ver} (new formula)"
|
||||||
else
|
else
|
||||||
# Update to existing formula
|
# Update to existing formula
|
||||||
@ -430,7 +436,7 @@ module Homebrew
|
|||||||
FormulaInfoFromJson.new(Utils::JSON.load(json)[0])
|
FormulaInfoFromJson.new(Utils::JSON.load(json)[0])
|
||||||
end
|
end
|
||||||
|
|
||||||
def bottle_tags()
|
def bottle_tags
|
||||||
return [] unless info["bottle"]["stable"]
|
return [] unless info["bottle"]["stable"]
|
||||||
info["bottle"]["stable"]["files"].keys
|
info["bottle"]["stable"]["files"].keys
|
||||||
end
|
end
|
||||||
@ -467,7 +473,6 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Bottle info as used internally by pull, with alternate platform support
|
# Bottle info as used internally by pull, with alternate platform support
|
||||||
class BottleInfo
|
class BottleInfo
|
||||||
# URL of bottle as string
|
# URL of bottle as string
|
||||||
@ -522,7 +527,7 @@ module Homebrew
|
|||||||
http.use_ssl = true
|
http.use_ssl = true
|
||||||
retry_count = 0
|
retry_count = 0
|
||||||
http.start do
|
http.start do
|
||||||
while true do
|
loop do
|
||||||
req = Net::HTTP::Head.new bottle_info.url
|
req = Net::HTTP::Head.new bottle_info.url
|
||||||
req.initialize_http_header "User-Agent" => HOMEBREW_USER_AGENT_RUBY
|
req.initialize_http_header "User-Agent" => HOMEBREW_USER_AGENT_RUBY
|
||||||
res = http.request req
|
res = http.request req
|
||||||
@ -551,7 +556,7 @@ module Homebrew
|
|||||||
max_curl_retries = 1
|
max_curl_retries = 1
|
||||||
retry_count = 0
|
retry_count = 0
|
||||||
# We're in the cache; make sure to force re-download
|
# We're in the cache; make sure to force re-download
|
||||||
while true do
|
loop do
|
||||||
begin
|
begin
|
||||||
curl url, "-o", filename
|
curl url, "-o", filename
|
||||||
break
|
break
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user