88 Commits

Author SHA1 Message Date
Mike McQuaid
589ed8e17c
Tweak diagnostic checks
- Make `gist-logs` perform more checks
- Don't complain about a non-/usr/local install at install time unless
  actually building from source.
- Show more checks output on a build error
- Improve naming of checks methods
2019-01-21 19:23:31 +00:00
Mike McQuaid
4ff0ecd443
gist-logs: don’t upload on unsupported configurations. 2019-01-21 13:58:04 +00:00
Colin Dean
6b2451e6ac
Adds 'password' to method doc 2018-10-21 15:20:45 -04:00
Colin Dean
91cd3cead2 Swap in description of current behavior instead of 1.9.3 hack comment
While working on f10691bcc, I noticed this odd comment and decided to
investigate. I wasn't able to reproduce the undesirable behavior because
I cannot get 1.8.7 to compile with rvm but I did notice through some
testing that iTerm2 displays a lock character when echo mode is
disabled. My intent had been to remove this method because Homebrew has
moved past a Ruby version that would necessitate the "hack" but this
method's behavior is actually desirable today, so I changed the comment
to remove the potential flag and instead left a comment explaining
a good second reason for the method.
2018-10-21 12:56:58 -04:00
Mike McQuaid
b167a88e4d
Merge pull request #5090 from JBallin/gist-token-error
Clarify how to set HOMEBREW_GITHUB_API_TOKEN
2018-10-21 15:41:34 +01:00
Colin Dean
f10691bccc Add --private flag to gist-logs
Co-Authored-By: JBallin <JBallin@users.noreply.github.com>
2018-10-20 14:46:53 -07:00
JBallin
2bf0db40b3 Normalize formatting of gist-logs errors 2018-10-14 20:40:24 -07:00
JBallin
2a1b936f76 Clarify HOMEBREW_GITHUB_API_TOKEN in gist-logs err 2018-10-14 20:40:24 -07:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Gautham Goli
1e0f9fb835 bump-formula-pr: Replace hub with GH API calls to fork and open Pull request 2018-03-31 19:44:55 +05:30
Mike McQuaid
83cca40fc9 RuboCop 0.53.0 manual fixes. 2018-03-08 14:10:02 +00:00
Mike McQuaid
a9c64c319f gist-logs: require API credentials.
Anonymous gists are going away shortly:
https://github.com/blog/2503-deprecation-notice-removing-anonymous-gist-creation
2018-02-19 16:14:32 +00:00
EricFromCanada
1d2b4ed321 docs: add more missing option descriptions
and improve wording or formatting where necessary.
2018-02-01 16:06:17 -05:00
Mike McQuaid
7a8f61c28c gist-logs: use full path to brew.
This fixes the command with environment filtering enabled.
2017-12-14 16:44:25 +00:00
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