24 Commits

Author SHA1 Message Date
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Mike McQuaid
9e17e44b3e Change manpage internal links in correct location. 2017-06-04 11:12:56 +01:00
Markus Reiter
59e2d67721 No if/unless-modifier on multiline blocks. 2016-11-13 23:37:40 +01:00
Mike McQuaid
3c7446f3ff Improve GitHub API scopes output.
Improve the GitHub API scope and token related messaging by
autopopulating the scopes we need on the new scopes page and, in the
case of a lacking a scope we need, output what scope was required.

Also, DRY up the personal access token code.
2016-10-30 15:38:19 -04:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Martin Afanasjew
823505a058 Fix minor issues in command help text formatting
- Inconsistent or unneeded indentation
- Missing or superfluous empty lines
- Missing or wrongly formatted arguments in command summary
- Missing punctuation
2016-08-17 01:25:51 +02:00
Andrew Janke
f518f57bd8 gist-logs: truncate log files to be gist-friendly (#279)
Truncates each log file to about 1 MB. This avoids upload and
download errors with the gists, and respects GitHub's suggested
size limits.
2016-07-05 08:45:17 -04:00
Mike McQuaid
14657443ce gist-logs: fix new-issue URL. 2016-06-05 12:40:26 +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
Jam
a558629654 gist-logs: add proper documentation, improve error handling (#217) 2016-05-09 04:39:22 +02:00
Mike McQuaid
c7edf9a063 gist-logs: fix system_config reference. 2016-05-08 20:38:17 +01:00
Mike McQuaid
6135da800e utils, gist-logs: improve/fix credential handling.
The API used (`Net::HTTP::Post`) does not handle basic authentication
credentials in the same way as `open` so fix both cases so they work.

Also, do some general usability tweaks to point out to people what could
be wrong with their tokens or credentials to help them debug.

Closes Homebrew/homebrew#50410.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-28 18:22:47 +08:00
Mike McQuaid
041c8502c5 Set HOMEBREW_API_TOKEN from Git when available.
As requested in Homebrew/homebrew#46578. Falls back to existing functionality.

Closes Homebrew/homebrew#46578.

Closes Homebrew/homebrew#49846.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-08 20:52:11 +08:00
Andrew Janke
d05c4d2408 gist-logs: Friendlier titles and display for log gists
Adds a summary file and description to get more informative displays on gist.github.com.

Closes Homebrew/homebrew#45023.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2015-11-26 12:42:30 -05:00
Baptiste Fontaine
abfaa59e06 MacOS: full_version added
Closes Homebrew/homebrew#44988.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-18 22:57:42 +08:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Xu Cheng
c41c473513 gist-logs: use ARGV.resolved_formulae 2015-05-27 13:53:41 +08:00
Alex Muller
83bcde2317 Update links to GitHub's personal access token
The link for the page that allows creation of API tokens has changed
from /settings/applications to /settings/tokens. Also the wording
on that page calls them "personal access tokens", so update
Homebrew to be consistent with that.

Closes Homebrew/homebrew#39378.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
2015-05-05 15:46:42 -07:00
Jack Nagel
16dfe3dd40 Add Formula#logs 2015-04-25 23:14:05 -04:00
Xu Cheng
4d17d4c8db gist-logs: show the formula origin for non core-formula
Closes Homebrew/homebrew#36730.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-02-11 11:04:37 +00:00
Stefan
28d465fab1 gist-logs: basic login
Closes Homebrew/homebrew#33839.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-11-10 17:07:36 -06:00
Jack Nagel
1c71fb4287 Drop executable bits from imported commands
Closes Homebrew/homebrew#32743.
2014-09-27 23:57:03 -05:00
Mike McQuaid
706e8abe29 brew-gist-logs: make an internal command. 2014-09-24 15:22:46 -07:00