Commit Graph
3956 Commits
Author SHA1 Message Date
Jack Nagel 3df0a13a6a search: use a queue to collect errors
The threading in the tap search code makes handling errors difficult. If
an API-related error is raised in one thread, it is likely to be raised
in each of the rest as well. This results in duplicated error messages,
which is ugly and bad UX.

This patch adds a synchronized queue to collect these exceptions. The
first one added to the queue is re-raised after all operations are
complete.

It's not ideal, but it's minimally invasive and I don't have the energy
or time to do a rewrite.
2014-02-16 23:19:09 -05:00
Jack Nagel c1704a61f7 Add helpful error message for authentication failures 2014-02-16 23:19:09 -05:00
Jack Nagel 97e111d003 Move error text and helper into error class 2014-02-16 23:19:09 -05:00
Jack Nagel 1f4a261bd3 Add a more useful message when ratelimit is exceeded 2014-02-16 23:11:17 -05:00
Jack Nagel 6772741d54 Make GitHub::Error a RuntimeError to suppress backtrace 2014-02-16 22:24:33 -05:00
Jack Nagel 2894f17a33 Handle GitHub API authentication failures 2014-02-16 22:24:33 -05:00
Jack Nagel 9a4cd4a738 Extract error handling from GitHub.open 2014-02-16 22:24:33 -05:00
Mike McQuaid f95d539566 audit: handle recommended/optional options better. 2014-02-16 22:35:14 +00:00
Mike McQuaid 870fb34316 audit: whitelist pyobject3 use of ARGV. 2014-02-16 22:10:22 +00:00
Mike McQuaid 5c1feb6773 versions: ignore validation errors.
References #26748.
2014-02-16 18:35:33 +00:00
Jack Nagel cf44bb010b Formula#system: simplify xcodebuild special case 2014-02-15 17:47:24 -05:00
Jack Nagel 8393d86ddb Formula#system: remove unnecessary string casts 2014-02-15 17:47:24 -05:00
Mike McQuaid 73194f224a bottle: fail if there is no stable version.
Closes #26742.
2014-02-15 11:28:48 +00:00
Jack Nagel 3d5fd54e71 GitDownloadStrategy: fix typo'd parameter name
This should be "resource", not "resources", though it works anyway
because there is a also "resource" reader method.
2014-02-15 01:43:06 -05:00
Misty De Meo 1cb51e2870 ARGV.help?: anchor to end of string
Fixes #26735.
2014-02-14 16:23:38 -08:00
Jack Nagel 32598fdf14 GitDownloadStrategy: allow disabling of shallow clone
Closes #25751.
Closes #26730.
2014-02-14 16:55:26 -05:00
Jack Nagel d894703150 VCSDownloadStrategy: use REF_TYPES when extracting ref to use 2014-02-14 15:33:37 -05:00
Jack Nagel 3d3ff997c5 VCSDownloadStrategy: document acceptable ref types 2014-02-14 15:33:37 -05:00
Jack Nagel a343405894 GitDownloadStrategy: inline simple method 2014-02-14 15:33:37 -05:00
Jack Nagel d225923d44 GitDownloadStrategy: move constant to top of class body 2014-02-14 15:33:37 -05:00
Mike McQuaid bf41a56f19 brew: check for --help and friends in more of ARGV
Let's check for e.g. --help anywhere in the ARGV array rather than just
the first value to avoid brew upgrade --help causing problems.

Closes #26675.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-02-14 18:32:56 +00:00
Jack Nagel b5ec3918f6 Use a more accurate method name and drop unhelpful block 2014-02-13 23:22:43 -05:00
Jack Nagel 50449db20a Always print top-level issue URL 2014-02-13 23:22:43 -05:00
Jack Nagel 537960164a Delete comment that isn't relevant to this code anymore 2014-02-13 17:42:37 -05:00
Jack Nagel abd3174dd8 Offload more filtering to the search API 2014-02-13 17:39:53 -05:00
Jack Nagel 3cce671702 Allow passing arbitrary qualifiers to issue search 2014-02-13 17:39:53 -05:00
Jack Nagel df3139a792 Implement equality for Dependencies collections 2014-02-13 16:31:12 -05:00
Jack Nagel ccec300b73 Eliminate unnecessary arrays and call to flatten 2014-02-13 15:39:13 -05:00
Jack Nagel d77a4b24b3 Delete unused method 2014-02-12 14:28:26 -05:00
Jack Nagel 490f7d0526 Pass the string instead of reconstructing it from a regexp 2014-02-12 13:59:18 -05:00
Jack Nagel 82a7415227 Let the API do more work for us 2014-02-12 12:17:32 -05:00
Jack Nagel 18aa10b399 Drop TODO that nobody has ever worked on 2014-02-12 12:13:02 -05:00
Jack Nagel b2b13ce035 Drop unnecessary type check, we never pass a Formula instance 2014-02-12 12:10:44 -05:00
Jack Nagel ea32e9e5d2 Return only open issues in GitHub.issues_for_formula 2014-02-12 12:10:41 -05:00
Mike McQuaid 52586bd2c8 osmium: add to blacklist.
References #12652.
2014-02-12 15:17:53 +00:00
Adam Vandenberg cc1b430c5b Revert "Recognize --head as an alias for --HEAD"
This reverts commit c32ab0a35a.

There are other hard-coded uses of HEAD, in build_options for instance.
These all need to be fixed before enabling this.
2014-02-11 21:25:26 -08:00
Mike McQuaid 07786ed383 python_dependency: only set PYTHONPATH for system. 2014-02-10 18:49:26 +00:00
Jack Nagel 3c98d7421a Update vendored OkJson 2014-02-10 13:17:16 -05:00
Misty De Meo c32ab0a35a Recognize --head as an alias for --HEAD
Homebrew currently recognizes "--head" during the install process, but
rather than actually fetch HEAD it just nags the user to use the
correct option.	Since we recognize the spelling anyway, this just
promotes the lowercase version to an official alias.

Closes #26555.
2014-02-09 15:44:49 -08:00
Jack Nagel 26d7b09d15 X11Dependency: style 2014-02-09 14:23:56 -05:00
Jack Nagel ce3ae1fd92 X11Dependency: return nil instead of raising in #<=>
Returning nil is in the contract of the Comparable module, and a future
version of Ruby will no longer hide this error.
2014-02-09 14:23:56 -05:00
Mike McQuaid d8076311bc bottle: fix --write messages. 2014-02-09 14:34:50 +00:00
Mike McQuaid 7c8f922afd bottle: make --write handle both quotes styles. 2014-02-09 14:34:50 +00:00
Jack Nagel 0e13b9ea36 Use GitHub wrapper for private tap check 2014-02-08 20:41:11 -05:00
Jack Nagel 849d6a0fb5 Pin GitHub module to v3 API 2014-02-08 20:41:11 -05:00
Jack Nagel 27402354d1 Switch to v3 search API 2014-02-08 20:41:11 -05:00
Jack Nagel 4ff62bd42f Drop unnecessary map + compact in search_tap 2014-02-08 17:53:08 -05:00
Jack Nagel 0cb0c280d5 Don't let issue search kill install process 2014-02-08 16:04:53 -05:00
Jack Nagel e742019114 Prevent repeated warnings when GitHub API rate limit is exceeded 2014-02-08 16:04:53 -05:00
Jack Nagel 7e5b15efc7 Preserve original backtrace when raising GitHub::Error 2014-02-08 16:04:53 -05:00