90 Commits

Author SHA1 Message Date
Eli Young
8734848829 Support enabling auto-updates for non-GitHub taps 2018-04-24 11:10:48 -07:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Mike McQuaid
49038a2cd9 Remove mentions to official taps
There are none remaining. We don’t want PHP to get the deprecated
messages until all formulae have been deleted so that will be in a
later PR.
2018-03-31 13:42:33 +01:00
Markus Reiter
175ca909ee Clean up code style and remove .rubocop_todo.yml. 2017-10-08 16:10:37 +02:00
Mike McQuaid
ba3c46d24f More deprecations.
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
Joshua McKinney
25396d9c4d Install tap command completions and manpages
Taps can include completion scripts for external commands under
`completions/bash`, `completions/fish`, or `completions/zsh`. `brew tap`
will automatically install these into the correct directories during
install.
2017-02-26 15:40:52 -06: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
Mike McQuaid
d3ce497607 tap: default to full clones for developers. (#297)
You need a non-shallow clone to push branches upstream so if you often
tap and untap taps (e.g. `homebrew/boneyard`) then you need to remember
to manually `fetch -unshallow`.
2016-05-30 17:01:36 +01:00
Max Nordlund
fa1fd70a37 Add all the top level comments 2016-04-10 22:59:25 +02:00
ilovezfs
fad235d8e8 tap: support --full even if installed
Makes `tap` re-runnable and unshallows when requested with `--full`.
Tapping with a different URL raises an exception.

The homebrew/core tap cannot be untapped with `untap` so running
`brew tap --full homebrew/core` is now a built-in way to get a full
clone of this tap without resorting to workarounds.

Closes #17.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-04-05 07:25:27 -07:00
Xu Cheng
56cb3325a6 remove migrate_taps
We don't need to migrate the tapped formulae from symlink-based to
directory-based structure any more.

Instead, we add core tap install check for `brew update-report` which
will be invoked by `brew update`.
2016-04-02 21:51:36 +08:00
Xu Cheng
28f3dae8cd rename CoreFormulaRepository to CoreTap
Core tap will be separated from core code in the near future.
It makes sense to rename it to CoreTap.
2016-03-07 19:43:46 +08:00
Xu Cheng
eb6f970b90 tap: support --quieter flag
Closes Homebrew/homebrew#49551.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-26 18:42:36 +08:00
Xu Cheng
c318a9a03e tap: improve arguments resolution
* Use `ARGV.include?` instead of `ARGV.first ==`, so users can pass
  `-v`/`-d` before the function flags(i.e. `--list-pinned` etc)
* Restore the ability to call `brew tap --flags tap/name`.
2015-12-26 13:01:52 +08:00
Mike McQuaid
75ae0cfb3a tap: don't backtrace on invalid options.
Closes Homebrew/homebrew#47162.
2015-12-25 18:25:01 +00:00
Xu Cheng
0f84b976ba move CoreFormulaRepository into separate file
For users whose local brew is at around 2015-06-11 to 2015-08-06,
running `brew update` will emit following error:

  Error: uninitialized constant Formulary::CoreFormulaRepository

This is caused by the same bug described in Homebrew/homebrew#42553.

This commit workarounds this issue and restores `brew update` compatibility
for users mentioned above.

Also cleanup legacy `require "cmd/tap"`.
2015-12-19 22:05:30 +08:00
Mike McQuaid
d36d88edf2 Allow taps to link manpages.
A blocker for https://github.com/caskroom/homebrew-cask/pull/15381
being merged.

Closes Homebrew/homebrew#46795.
2015-12-09 09:09:26 +00:00
Xu Cheng
2c25303949 remove unnecessary tap_args
It's now handled by Tap.fetch
2015-12-09 16:56:59 +08:00
Xu Cheng
d7e95997ae tap: warn already tapped 2015-11-10 18:33:57 +08:00
Mike McQuaid
aab53e65a9 tap: don't error when already tapped. 2015-11-10 09:12:25 +00:00
Xu Cheng
e97610b916 add Tap#install and Tap#uninstall 2015-11-09 15:34:20 +08:00
Søren Brokær
ed42b2eb39 let the user know what exactly was already tapped
Closes Homebrew/homebrew#44843.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-10-13 14:03:42 +02:00
Xu Cheng
3b520cf195 cache taps
There are plenty of IO operations inside Tap object, and it will be more
when implementing formula alias reverse look up(e.g. list all of alias
names for a formula). So let's cache them.

Some benchmark:

$ time brew info $(brew ruby -e 'puts Formula.tap_names') > /dev/null
Before: 6.40s user 2.42s system 96% cpu 9.134 total
After: 4.75s user 0.77s system 97% cpu 5.637 total

Closes Homebrew/homebrew#44377.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-30 16:25:30 +08:00
Dan Martinez
8374374168 Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-09-08 15:23:37 +01:00
Xu Cheng
190902e98f tap: ensure git is installed
Closes Homebrew/homebrew#43463.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-02 15:24:53 +08:00
Xu Cheng
a5aba7f7d8 tap: rmdir when tap failed or interrupted
Fixes Homebrew/homebrew#43280.

Closes Homebrew/homebrew#43352.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-28 17:15:23 +08:00
Xu Cheng
d09d2690ca tap: add --list-pinned 2015-08-21 20:08:13 +08:00
Baptiste Fontaine
8ba0fb9fcf unnecessary calls to .select simplified
These are minor perf optimizations.

Closes Homebrew/homebrew#43028.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-18 00:18:22 +02:00
Baptiste Fontaine
3a733cad09 shell completion of official taps added to 'brew tap'
Closes Homebrew/homebrew#42421.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-03 23:37:00 +02: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
4101cef3c5 Tap: make remote a separate method to reduce initial overhead
Also make remote method only response to installed tap.
2015-06-14 21:28:36 +08:00
Xu Cheng
44383fecb8 (un)tap/update/readall: use Tap class 2015-06-11 15:28:29 +08:00
Xu Cheng
18bb32a04d tap: fix Homebrew/homebrew#40487 2015-06-08 22:13:50 +08:00
Peter Aronoff
965e2f50c3 brew tap: allow tapping non-GitHub repositories.
`brew tap` restricts users to GitHub and checks for private repos. I
created `brew any-tap` to support a wider variety of taps.

With very small changes (and no extra flags!), this change allows users
to use `brew tap` with GitHub as they always have or add one extra
argument and tap any repository of any type from anywhere.

    brew tap user/name              # Same as it ever was
    brew tap user/name URL          # Tap URL, whatever it happens to be

Closes Homebrew/homebrew#40326.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-06-05 21:54:12 +01:00
Xu Cheng
171c3dd2d9 tap/untap/update/prune: remove obsolete method, add migrate_taps 2015-05-27 13:53:40 +08:00
Xu Cheng
fa9371e58e tap: support fast clone
Closes Homebrew/homebrew#37592.
Closes Homebrew/homebrew#38268.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-05-08 15:48:51 +08:00
Mike McQuaid
63d8bcd314 tap: better match install format. 2015-04-09 09:00:18 +01:00
chdiza
5e854164a7 untap: Handle multiple arguments
Closes Homebrew/homebrew#36436.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-02-01 20:12:13 +01:00
Jack Nagel
50b900daf3 Don't warn about tap conflicts during pruning
Fixes Homebrew/homebrew#32710.
2014-09-27 12:17:22 -05:00
Jack Nagel
d6bceebeca Clarify "could not tap" warning
Closes Homebrew/homebrew#31451.
Closes Homebrew/homebrew#32223.
2014-09-19 18:22:48 -05:00
Jack Nagel
44254aa9cf Remove redundant "which git" guards
There is always a git executable on PATH due to the git wrapper in
Library/Contributions/cmd. The wrapper will notify the user if there is
not a real git installed.
2014-07-06 14:10:52 -05:00
Jack Nagel
2d83c08592 Make tap_ref match similar code in update 2014-07-06 13:12:01 -05:00
Jack Nagel
f8fb74ff76 Escape paths in regexps 2014-07-06 11:25:56 -05:00
Jack Nagel
f0e13ee97b Use multiple argument form of system 2014-06-20 18:37:24 -05:00
Jack Nagel
10a1952d2c Only "extend self" once on the Homebrew module 2014-06-19 13:10:36 -05:00
Jack Nagel
bf365fc23b Prefer Dir.glob when iterating over the result 2014-05-31 23:53:36 -05:00
Adam Vandenberg
8d44db6b40 pluralize formulae in tap/untap
Closes Homebrew/homebrew#28560.
2014-05-26 18:33:31 -07:00
Tsukasa OMOTO
d1f15e967b Taps: cleanup regexps around Taps
Closes Homebrew/homebrew#29139.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-05-14 11:12:51 -05:00
Jack Nagel
d8c15c8fbf The \w character class already includes underscore
Newer versions of Ruby issue a warning for repeated character classes.
2014-05-03 15:03:22 -05:00