Jack Nagel
7bdaa7ffe1
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
a7b515e503
Use a more accurate method name and drop unhelpful block
2014-02-13 23:22:43 -05:00
Jack Nagel
345457b33e
Pass the string instead of reconstructing it from a regexp
2014-02-12 13:59:18 -05:00
Jack Nagel
d01c671d74
Drop unnecessary map + compact in search_tap
2014-02-08 17:53:08 -05:00
Jack Nagel
7d4709d9d6
Prevent repeated warnings when GitHub API rate limit is exceeded
2014-02-08 16:04:53 -05:00
Jack Nagel
2e3871c076
Raise only GitHub::Error from GitHub.open
2014-02-08 16:04:53 -05:00
Jack Nagel
4d6df3e3bc
Parse JSON early in GitHub module
2014-02-08 16:04:53 -05:00
Jack Nagel
f7e1244e6d
Don't mutate argument in search_tap
2014-02-08 16:04:52 -05:00
Mike McQuaid
30e409adfd
search: handle tap not found and suggest update.
...
Closes Homebrew/homebrew#25706 .
Closes Homebrew/homebrew#25682 .
2014-01-09 17:20:54 +00:00
Mike McQuaid
5b95710254
homebrew-python has moved to Homebrew org.
2013-12-28 12:14:38 +00:00
Adam Vandenberg
f37e84d766
retire homebrew/x11
...
Closes Homebrew/homebrew#24405 .
2013-11-17 12:20:28 -08:00
David MacMahon
a999ddc002
Add HOMEBREW_NO_GITHUB_API env var.
...
This patch allows users to "opt out" of using the GitHub API altogether
by setting the HOMEBREW_NO_GITHUB_API environment variable. The
value of the environment variable does not matter (it can even be
empty!).
For Bash/ZSH: export HOMEBREW_NO_GITHUB_API=1
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-10-25 21:12:28 +01:00
Mike McQuaid
98b28f5ac3
Different regex for user/tap/formula and user/tap.
...
Closes Homebrew/homebrew#23430 .
2013-10-22 11:58:40 +01:00
Mike McQuaid
077f09e4ea
global: unify tap regex.
...
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-10-21 18:53:24 +01:00
Samuel John
9b755e5ad2
brew search <user>/<repo> [substring]
...
For example `brew search homebrew/science` to get a list of all formulae
from that tap, even if not yet tapped.
`brew search <user>/<repo>/<substr>` or
`brew search <user>/<repo> <substr>` to grep for `<substr>`
inside of the tap `<user>/<repo>`.
2013-09-03 11:52:34 +02:00
Adam Vandenberg
31348c34ae
add ubuntu package search
2013-08-14 22:14:35 -07:00
Adam Vandenberg
bcaa823538
Add fedora to brew search
2013-08-09 09:32:51 -07:00
Adam Vandenberg
5600713bbb
Add opensuse package search
2013-08-05 15:05:02 -07:00
Adam Vandenberg
1540b3aadd
Search marcqualie/nginx
...
Closes Homebrew/homebrew#21678 .
2013-08-05 13:32:23 -07:00
Adam Vandenberg
583dd38b08
Add homebrew-binary to search
2013-08-03 10:27:45 -07:00
Jack Nagel
366cb87aec
search: silence JSON decode errors
...
Closes Homebrew/homebrew#21506 .
Closes Homebrew/homebrew#21508 .
2013-07-28 15:38:46 -05:00
Jack Nagel
6b299c4207
Clarify behavior of brew search
without an argument
...
As documented in the man page, when given no arguments, `brew search`
will list all formulae. This is different than giving an *empty*
argument.
2013-07-15 10:59:00 -05:00
Jack Nagel
59fdcfd4d0
Better behavior for failed connections in brew search
...
Fixes Homebrew/homebrew#20868 .
2013-07-01 17:00:08 -05:00
Jack Nagel
083b3c84d0
Add Utils::JSON to wrap the JSON implementation
2013-06-22 21:34:02 -05:00
Jack Nagel
630aa27c56
Rename variables for clarity
2013-06-12 14:48:17 -05:00
Jack Nagel
5482092bd0
Extract search_taps method
2013-06-12 14:48:17 -05:00
Jack Nagel
e0fba99699
Pull tap list into a constant
2013-06-12 14:48:17 -05:00
Jack Nagel
c30f00c37c
Remove use of global variable
2013-06-12 14:48:17 -05:00
Jack Nagel
d1a1a3b031
Rename method
2013-06-12 14:48:16 -05:00
Jack Nagel
1d1c292bcb
Extract query construction
2013-06-12 14:48:16 -05:00
Jack Nagel
90768d03d2
Use inspect instead of escaping quotes
2013-06-12 14:48:16 -05:00
Jack Nagel
13a2ceef5c
Move require out of method
2013-06-12 12:23:45 -05:00
Adam Vandenberg
0e7d47332c
Add brew search --debian <f>
2013-05-27 17:32:27 -07:00
Daniel Lee Harple
471502bc06
Remove unnecessary rescue-all exception handling
...
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-05-22 19:53:05 -05:00
Daniel Lee Harple
0fa5c47d7f
Check GitHub API rate limit instead of silently failing
...
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-05-22 19:53:04 -05:00
Daniel Lee Harple
222f96d37b
Pass a User-Agent when fetching data from the GitHub API
...
See <http://developer.github.com/v3/#user-agent-required >.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-05-22 19:53:01 -05:00
Adam Vandenberg
b85bf58007
search homebrew-x11
2013-02-10 11:15:20 -08:00
Mike McQuaid
36497f2a5d
brew-search: search homebrew/apache tap.
2013-01-30 22:15:37 -08:00
Samuel John
04d22a88b1
brew search looks in samueljohn/python, too.
...
Closes Homebrew/homebrew#17267 .
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-01-23 19:53:46 -08:00
Adam Vandenberg
05eb740766
Add Homebrew-completions to search
2013-01-23 19:53:06 -08:00
Jack Nagel
9362a7c897
Respect BROWSER environment variable
2012-12-27 23:41:44 -06:00
Adam Vandenberg
31d70b5c33
Fix the name because adamv doesn't know what he's doing.
2012-09-01 19:01:56 -07:00
Adam Vandenberg
788b556a3e
bless alanthing/homebrew-apachemod
...
Add external tap to default search path, and recommend it for packaging
Apache Modules.
2012-09-01 18:51:39 -07:00
hazz
60bdb16a7c
Run each search_tap in a separate thread to speed things up.
...
Closes Homebrew/homebrew#14066 .
Signed-off-by: Max Howell <mxcl@me.com>
2012-08-09 11:58:58 -04:00
Max Howell
d5f2cdd31c
Deprecate adamv/alt from brew search
...
Add brew/science.
2012-07-30 13:24:53 -04:00
Max Howell
5d3c65f68e
Use GitHub API 3 in brew search
2012-04-05 13:06:36 -04:00
Max Howell
05c140e2e4
Search Homebrew/games
2012-03-25 11:06:28 +01:00
Max Howell
17bdfb1d38
Don't query online for plain brew search
2012-03-20 16:03:27 +00:00
Max Howell
059727a9e8
Downcase when checking if no tap search needed
2012-03-18 02:03:19 +00:00
Max Howell
aeb9440b90
Special case "Homebrew" in brew-search
...
Again, "Homebrew" is changed to "homebrew" before rendering to the user.
2012-03-18 01:51:36 +00:00