aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2016-09-11 17:41:51 +0100
committerMike McQuaid2016-09-11 19:14:55 +0100
commitf1c64f1cdce6f2ce1d45d93e553ae2629c2e419f (patch)
treecb768e6af38f76d210ac051fab84e0a52149c23a /Library/Homebrew
parent71fd2bb4b0b30b03fbb7b19c53d008b1780006bb (diff)
downloadbrew-f1c64f1cdce6f2ce1d45d93e553ae2629c2e419f.tar.bz2
dev-cmd/pull: fix Rubocop warnings.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/dev-cmd/pull.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb
index e18bf1c2f..a59792281 100644
--- a/Library/Homebrew/dev-cmd/pull.rb
+++ b/Library/Homebrew/dev-cmd/pull.rb
@@ -237,7 +237,7 @@ module Homebrew
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"]
raise "Need to load formulae to publish them!"
end
@@ -360,7 +360,13 @@ module Homebrew
def subject_for_bump(formula, old, new)
if old[:nonexistent]
# 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)"
else
# Update to existing formula
@@ -430,7 +436,7 @@ module Homebrew
FormulaInfoFromJson.new(Utils::JSON.load(json)[0])
end
- def bottle_tags()
+ def bottle_tags
return [] unless info["bottle"]["stable"]
info["bottle"]["stable"]["files"].keys
end
@@ -467,7 +473,6 @@ module Homebrew
end
end
-
# Bottle info as used internally by pull, with alternate platform support
class BottleInfo
# URL of bottle as string
@@ -522,7 +527,7 @@ module Homebrew
http.use_ssl = true
retry_count = 0
http.start do
- while true do
+ loop do
req = Net::HTTP::Head.new bottle_info.url
req.initialize_http_header "User-Agent" => HOMEBREW_USER_AGENT_RUBY
res = http.request req
@@ -551,7 +556,7 @@ module Homebrew
max_curl_retries = 1
retry_count = 0
# We're in the cache; make sure to force re-download
- while true do
+ loop do
begin
curl url, "-o", filename
break