155 Commits

Author SHA1 Message Date
Martin Afanasjew
87540ada6a utils/github: fix reverted order of credentials
We always return the token/password first and, if applicable, the user
name is the second element in the returned array.

Closes #581.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-07-27 21:27:25 +02:00
Martin Afanasjew
bdc1991d77 utils/github: fix broken pipe error
Closes #573.
2016-07-27 21:27:25 +02: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
Andrew Janke
f4b3dadb64 gist-logs: close temp file before passing to curl (#418)
Ensures that the data gets written to disk so curl can see it, avoiding
intermittent JSON parsing errors in gist creation.
2016-07-03 17:21:13 -04: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