20 Commits

Author SHA1 Message Date
Mike McQuaid
924865ec7f curl: handle more non-executable curl edge-cases.
Address some additional issues mentioned in #3624.
2018-01-11 16:33:20 +00:00
Shaun Jackman
a4033c7196 Do not specify absolute paths to utilities
Specifying an absolute path to utilities is no longer needed,
since environment filtering uses a default PATH.
2017-12-12 09:25:16 -08:00
Martin Schimandl
0db069602e Refactor: Move FormulaAudit.check_http_content to utils/curl 2017-12-03 14:02:55 +01:00
Mike McQuaid
fb6cf0c3f8 More environment filtering fixes
- Make `brew pull` pass through Git environment variables
- Whitelist all `TRAVIS_` variables.
2017-11-27 10:48:03 +00:00
Mike McQuaid
5241d07474 environment filtering: pass through TRAVIS vars.
We use these internally so let's map them to `HOMEBREW_` variables.
2017-11-13 10:01:54 +00:00
Mike McQuaid
a7d74e0f53 curl: unset SSL_CERT_FILE. 2017-11-05 14:45:26 +00:00
Markus Reiter
1f66c9c9e0 Let curl_download handle HTTP 416 error. 2017-09-10 07:23:18 +02:00
Markus Reiter
15e572702e Fix pull. 2017-08-21 22:41:13 +02:00
Markus Reiter
d9587a8b5e Don’t pass --fail for curl_output. 2017-08-11 12:28:58 +02:00
Markus Reiter
fd477365b5 curl_download: Retry once on error 33. 2017-08-10 22:51:09 +02:00
Markus Reiter
2cba322200 Allow curl args to be overriden. 2017-08-08 23:06:40 +02:00
Markus Reiter
ae4bafdb36 Simplify CurlDownloadStrategy. 2017-08-08 18:10:13 +02:00
ilovezfs
986887b413 Revert "Refactor SVN and cURL download strategies." 2017-08-07 14:31:56 -07:00
Markus Reiter
dc5a2c1764 Simplify CurlDownloadStrategy. 2017-08-07 21:31:17 +02:00
Mike McQuaid
e7a81caaf4 Allow brew audit to fake a Safari user-agent.
This allows us to detect if homepages such as e.g. `aiccu` which
blocks `curl` are up or not.
2017-01-07 14:03:08 +00:00
Mike McQuaid
e6fb3c3114 curl: make curl_args more configurable.
Allow configuring whether output should be shown or the default the
default user agent is used.
2016-12-29 12:51:12 +00:00
Mike McQuaid
3bf5e779ab utils/curl: fix Rubocop warnings. 2016-09-11 19:13:00 +01:00
Mike McQuaid
ed5e2ea300 utils/curl: assume Ruby 2. 2016-08-17 10:27:45 +01:00
Mike McQuaid
23306ab434 github: produce better curl error messages. (#441)
* global: add RUBY_TWO global variable.

* test-bot: use RUBY_TWO global variable.

* github: produce better curl error messages.

If we don't know why curl has failed then ensure that the error messages
that it produced are included as part of the user output.
2016-07-12 19:46:29 +01:00
Mike McQuaid
8e0e1642ad 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.
2016-06-03 13:05:18 +01:00