Commit Graph
228 Commits
Author SHA1 Message Date
Jack Nagel 2c2aa4578e Use standard curl progress output in verbose mode
Closes #26818.
2014-02-18 16:03:52 -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
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 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
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 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
Jack Nagel 013482bf94 Raise only GitHub::Error from GitHub.open 2014-02-08 16:04:53 -05:00
Jack Nagel 0a7767b247 Parse JSON early in GitHub module 2014-02-08 16:04:53 -05:00
Mike McQuaid 6e5afe9705 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 #26032.
2014-01-20 17:58:50 -08:00
Misty De Meo 3e9e630783 Only search open pull requests, not closed
Refs #25962.
2014-01-16 13:04:15 -08:00
Jack Nagel c41fa02b2d Escape issue search string
Fixes #25779.
2014-01-10 17:32:15 -06:00
Mike McQuaid 3c86d2b8ff Update docs, comment mxcl/homebrew refs. 2013-12-14 18:18:35 +00:00
Adam Vandenberg 89e5585ee1 fix repo URL for brew search
Closes #25192.
2013-12-13 18:31:11 -08:00
Adam Vandenberg 8745782008 typo 2013-11-28 11:21:54 -08:00
David MacMahon f821514e93 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 fce53bc1f5 Avoid comparing MacOS.version to floats 2013-10-22 20:47:37 -05:00
Jack Nagel 3cba7d44c6 Rename MacOS to OS::Mac 2013-10-18 12:56:51 -05:00
Adam Vandenberg e9d8fcd03e move paths to utils 2013-09-17 06:44:25 -07:00
Dan Hughes 54a6cffe8c Use system path for more tools, for Linux compat.
Closes #22196.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-08-30 13:02:19 -07:00
Amos Wenger 13c2776795 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 #21921.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-19 13:35:44 -05:00
Jack Nagel 8508bdf985 Allow specifying a custom PATH for which method
Closes #21794.
2013-08-10 19:01:50 -05:00
Jack Nagel 26503dacdf Always load net/https before referencing related constants
I put this require inside the method body, because eager-loading
net/https is slow compared to the rest of Homebrew, and utils.rb is
loaded for each `brew` invocation.

It's probably worth breaking up global.rb a bit, to reduce the amount of
code we are loading unnecessarily, but hopefully also to make inter-file
dependencies a bit more obvious.

Fixes #21617.
2013-08-02 18:25:17 -05:00
Jack Nagel 2366174d6f GitHub API access may result in SSL errors
Closes #21216.
2013-07-15 10:57:55 -05:00
Jack Nagel 7c68757e99 Move inreplace off of Object
Closes #21163.
2013-07-12 16:23:06 -05:00
Jack Nagel 39520822cc Respect $VISUAL when picking an editor 2013-07-09 20:12:53 -05:00
Jack Nagel 62848dca6e Give advice when GitHub API requests fail
Refs #21023.
2013-07-05 11:14:52 -05:00
Jack Nagel 08c3fb0ed2 Better behavior for failed connections in brew search
Fixes #20868.
2013-07-01 17:00:08 -05:00
Jack Nagel be38b92d68 Don't use 'obj == nil' 2013-06-26 18:47:00 -05:00
Jack Nagel 79a69b9b46 Extract constant in GitHub module 2013-06-22 22:47:00 -05:00
Jack Nagel 49e06a4669 Extract method in Github module 2013-06-22 22:46:49 -05:00
Jack Nagel 93376954f5 Remove trailing whitespace 2013-06-22 22:46:39 -05:00
Jack Nagel 163067512b Add Utils::JSON to wrap the JSON implementation 2013-06-22 21:34:02 -05:00
Samuel John 0b50110107 Python 2.x and 3.x support
New `depends_on :python` Dependency.
New `depends_on :python3` Dependency.

To avoid having multiple formulae with endings -py2 and -py3,
we will handle support for different pythons (2.x vs. 3.x)
in the same formula.
Further brewed vs. external python will be transparently supported.

The formula also gets a new object `python`, which is false if
no Python is available or the user has disabled it. Otherwise
it is defined and provides several support methods:

python.site_packages # the site-packages in the formula's Cellar
python.global_site_packages
python.binary # the full path to the python binary
python.prefix
python.version
python.version.major
python.version.minor
python.xy # => e.g. "python2.7"
python.incdir # includes of python
python.libdir # the python dylib library
python.pkg_config_path # used internally by brew
python.from_osx?
python.framework?
python.universal?
python.pypy?
python.standard_caveats # Text to set PYTHONPATH for python.from_osx?
python.if3then3 # => "" for 2.x and to "3" for 3.x.

Further, to avoid code duplication, `python` takes an optional
block that is run twice if the formula defines depends_on
:python AND :python3.

python do
  system python, 'setup.py', "--prefix=#{prefix}"
end

Read more in the Homebrew wiki.
2013-06-03 17:29:43 +02:00
Jack Nagel 7ce40f75c5 Use implicit begin 2013-05-22 19:58:11 -05:00