Jack Nagel
2daabe9863
Fix uninitialized constant error in GitHub.open
...
The error handling depends on side effects of `require "net/https"`,
so it should be wrapped in an explicit begin block.
cf. Homebrew/homebrew#30407 .
2014-06-24 21:01:04 -05:00
Shaun Jackman
ae3e567daa
Linuxbrew: Use xdg-open
...
Closes Homebrew/homebrew#29817 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-06-12 13:11:05 -05:00
Jack Nagel
84cd9cc28f
"exit $?" raises TypeError on Ruby 2.0
2014-06-10 11:33:17 -05:00
James Wald
98e5bd8198
Find vim on the path
...
If vim is on the path, it will be used instead of `/usr/bin/vim`.
Closes Homebrew/homebrew#29885 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-06-05 23:56:52 -05:00
Adam Vandenberg
8d44db6b40
pluralize formulae in tap/untap
...
Closes Homebrew/homebrew#28560 .
2014-05-26 18:33:31 -07:00
Jack Nagel
c8c85b4ac4
Always call Process.wait with an argument
2014-03-29 17:47:42 -05:00
Jack Nagel
809c804499
Make sure we wait for the correct child
...
Fixes Homebrew/homebrew#27962 .
2014-03-29 02:24:01 -05:00
Adam Vandenberg
6a13c9e434
which is supposed to return a pathname
2014-03-16 16:05:15 -07:00
Adam Vandenberg
844e94526e
return found path directly in which
2014-03-16 11:52:11 -07:00
kynnjo
5f8e78150e
utils.rb:which: bug fix
...
Closes Homebrew/homebrew#27524 .
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-03-16 11:49:35 -07:00
Mike McQuaid
c789f907eb
utils: return empty issues array when no API.
2014-03-13 10:05:20 +00:00
April Arcus
3ddbcd9670
utils: replace bright green with ANSI bold+green.
...
There are two ways of outputting bright ANSI colors to the terminal - the ANSI codes 30-37 plus a bold code (most terminals render bold text with brighter colors, by convention), or the widely supported aixterm codes 90-97.
Although the aixterm codes are more precise (disambiguating bold font from bright color), the ANSI bold+green enables compatibility with the popular [Solarized](https://github.com/altercation/solarized ) color theme, which reassigns the "bright green" codepoint to a shade of gray.
Closes Homebrew/homebrew#27125 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-03-03 12:34:31 +00:00
Adam Vandenberg
88565ac3d4
move scons helper to fileutils
2014-02-28 07:20:52 -08:00
Adam Vandenberg
9055c1e361
add scons helper
2014-02-25 20:29:08 -08:00
Jack Nagel
8d4d56c8db
Use standard curl progress output in verbose mode
...
Closes Homebrew/homebrew#26818 .
2014-02-18 16:03:52 -05:00
Jack Nagel
ea7415237c
Add helpful error message for authentication failures
2014-02-16 23:19:09 -05:00
Jack Nagel
3cbb49930c
Move error text and helper into error class
2014-02-16 23:19:09 -05:00
Jack Nagel
24cbb4fd2e
Add a more useful message when ratelimit is exceeded
2014-02-16 23:11:17 -05:00
Jack Nagel
f7cda3cdb6
Make GitHub::Error a RuntimeError to suppress backtrace
2014-02-16 22:24:33 -05:00
Jack Nagel
6fd0125ad9
Handle GitHub API authentication failures
2014-02-16 22:24:33 -05:00
Jack Nagel
1d5ab3195c
Extract error handling from GitHub.open
2014-02-16 22:24:33 -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
fed468c780
Always print top-level issue URL
2014-02-13 23:22:43 -05:00
Jack Nagel
6dec9f6058
Delete comment that isn't relevant to this code anymore
2014-02-13 17:42:37 -05:00
Jack Nagel
f7ef4964a7
Offload more filtering to the search API
2014-02-13 17:39:53 -05:00
Jack Nagel
f5ceae9f94
Allow passing arbitrary qualifiers to issue search
2014-02-13 17:39:53 -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
0a3794776e
Let the API do more work for us
2014-02-12 12:17:32 -05:00
Jack Nagel
33f344bdd4
Drop TODO that nobody has ever worked on
2014-02-12 12:13:02 -05:00
Jack Nagel
ff209c7b9c
Drop unnecessary type check, we never pass a Formula instance
2014-02-12 12:10:44 -05:00
Jack Nagel
f66eeec960
Return only open issues in GitHub.issues_for_formula
2014-02-12 12:10:41 -05:00
Jack Nagel
25c4e336f4
Use GitHub wrapper for private tap check
2014-02-08 20:41:11 -05:00
Jack Nagel
3b818a19f9
Pin GitHub module to v3 API
2014-02-08 20:41:11 -05:00
Jack Nagel
e57894e0d8
Switch to v3 search API
2014-02-08 20:41:11 -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
ee893fdd88
Preserve original backtrace when raising GitHub::Error
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
Mike McQuaid
a65f649cf5
utils: improve issue searching.
...
* issues_matching now returns an array
* prints issues titles and URLs
* find_pull_requests shows closed PRs if no matching PRs are open
Closes Homebrew/homebrew#26032 .
2014-01-20 17:58:50 -08:00
Misty De Meo
a506053b98
Only search open pull requests, not closed
...
Refs Homebrew/homebrew#25962 .
2014-01-16 13:04:15 -08:00
Jack Nagel
0d42601872
Escape issue search string
...
Fixes Homebrew/homebrew#25779 .
2014-01-10 17:32:15 -06:00
Mike McQuaid
4c2e7b1659
Update docs, comment mxcl/homebrew refs.
2013-12-14 18:18:35 +00:00
Adam Vandenberg
856266432d
fix repo URL for brew search
...
Closes Homebrew/homebrew#25192 .
2013-12-13 18:31:11 -08:00
Adam Vandenberg
f2568ac637
typo
2013-11-28 11:21:54 -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
Jack Nagel
df824a22a7
Avoid comparing MacOS.version to floats
2013-10-22 20:47:37 -05:00
Jack Nagel
805472946b
Rename MacOS to OS::Mac
2013-10-18 12:56:51 -05:00
Adam Vandenberg
a126946a9b
move paths to utils
2013-09-17 06:44:25 -07:00
Dan Hughes
51d1a8e3c5
Use system path for more tools, for Linux compat.
...
Closes Homebrew/homebrew#22196 .
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-08-30 13:02:19 -07:00
Amos Wenger
52ace99f14
Use File::PATH_SEPARATOR globally instead of ':'
...
On Unix, the path separator is ':', whereas on Windows,
it is ';'. This is the first of a series of patch to bring
macbrew's and winbrew's codebases closer together.
The main places the magic constant ':' was being used were:
- the $PATH environment variable
- CMAKE-related environment variables
- pkg-config related environment variables
Closes Homebrew/homebrew#21921 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-19 13:35:44 -05:00