aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/pull.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-06-03 13:05:18 +0100
committerGitHub2016-06-03 13:05:18 +0100
commit8e0e1642ad9cf87cd71521aabd03f03b8e7ddc8d (patch)
tree7e1cd52cd52f2868a043971bd930873316f11d40 /Library/Homebrew/cmd/pull.rb
parentb2c9625d780277f021c63e21cac4a7c954170784 (diff)
downloadbrew-8e0e1642ad9cf87cd71521aabd03f03b8e7ddc8d.tar.bz2
Use `curl` for the GitHub API (#295)
* Move GitHub API module to utils/github.rb. * Move curl method to utils/curl.rb. * global: use long curl arguments and an array. This makes the code more self-documenting. * utils/curl: support reading curl's output. * utils/github: use curl instead of open-uri. It has far better proxy support. * pull: set Homebrew user agent. * gist-logs: remove trailing whitespace. * gist-logs: use first instead of [0]. Easier to read. * gist-logs: use curl-based GitHub.open method.
Diffstat (limited to 'Library/Homebrew/cmd/pull.rb')
-rw-r--r--Library/Homebrew/cmd/pull.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb
index 0aca8a1ec..3a90e9229 100644
--- a/Library/Homebrew/cmd/pull.rb
+++ b/Library/Homebrew/cmd/pull.rb
@@ -503,6 +503,7 @@ module Homebrew
url = URI(bottle_info.url)
puts "Verifying bottle: #{File.basename(url.path)}"
http = Net::HTTP.new(url.host, url.port)
+ http.initialize_http_header "User-Agent" => HOMEBREW_USER_AGENT_RUBY
http.use_ssl = true
retry_count = 0
http.start do