120 Commits

Author SHA1 Message Date
Mike McQuaid
737b84b54b
brew style --fix fixes. 2018-11-02 17:29:23 +00:00
EricFromCanada
20167e5f1b Adjust comments to tidy API docs output. 2018-10-18 21:42:43 -04:00
Mike McQuaid
fe6b78a3f3
Use cache_store for descriptions
This makes use of both the existing interfaces and could use the
existing cache file but we'll create a new one and cleanup the old one
to avoid issues and use a more consistent name.
2018-10-13 08:22:52 -07:00
Emiel Wiedijk
0fcdc9ba07
Create method ruby_file?
Both formula_files and cask_files need to check whether a file is
a Ruby file. Also, use this method in formula_file? and cask_file?
2018-10-10 17:31:09 +02:00
Emiel Wiedijk
6ac30826d0
Remove redundant check in formula_files and cask_files
Formula_files consists of every non-recursive child of formula_dir,
for which formula_file? evaluates to true. formula_file? checks if the file
is a child of formula_dir, which it is by definition. It turns out that by
removing the check, the time used for 'brew search' decreased from 800 ms to
700 ms, noticably faster during tab completion. The same happens with
cask_files and cask_file?
2018-10-09 21:07:40 +02:00
Markus Reiter
5dd571adeb Replace #chuzzle with ActiveSupport’s #presence. 2018-10-07 23:10:56 +02:00
Markus Reiter
16618d0fc7 Use ActiveSupport’s #pluralize and #to_sentence. 2018-10-07 23:10:56 +02:00
Markus Reiter
c4d418e126 Use ActiveSupport’s #second. 2018-10-07 23:10:56 +02:00
Shaun Jackman
fdcdf7cb5c CoreTap.default_remote: Use Linuxbrew/core [Linux] 2018-10-02 15:44:30 -07:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Markus Reiter
3a0a9f9073 Add String#delete_prefix backport. 2018-09-16 20:07:34 +02:00
Markus Reiter
eca488a966 Add $LOAD_PATH for RuboCop cops. 2018-09-06 01:10:47 +02:00
Mike McQuaid
6db4b72200
tap: fix GitHub naming. 2018-09-04 09:58:58 +01:00
Mike McQuaid
3b91c5f1ae
Merge pull request #4797 from MikeMcQuaid/rubocop-tweaks
.rubocop: tweak rules.
2018-09-02 21:13:23 +01:00
Mike McQuaid
0aa9dce03c
Revert "Add $LOAD_PATH for RuboCop cops." 2018-09-02 20:49:25 +01:00
Mike McQuaid
80d75bc0d8
Homebrew/.rubocop: tweak rules.
Adjust the rules based on the current codebase. Remove various enable,
disables and default values that are unnecessary. Add more comments
explaining why. Make minor changes needed to enable a few more rules.
2018-09-02 20:15:09 +01:00
Markus Reiter
f6e7a3ed9d Fix style. 2018-08-29 01:44:47 +02:00
Markus Reiter
dfa5bfdf9d Add Tap#command_file? method. 2018-07-25 11:42:28 +02:00
Markus Reiter
c6c1eacc18 Rename enumeration to comma_and. 2018-07-01 18:48:28 +02:00
Markus Reiter
785750ee63 Add Tap#contents methods. 2018-07-01 18:48:28 +02:00
Markus Reiter
2aa7597e70 Show tapped casks. 2018-07-01 18:48:28 +02:00
Markus Reiter
12ab263784 Remove Hbc.default_tap. 2018-06-09 10:13:28 +02:00
Markus Reiter
50a43cf678 Reset repo_var in clear_cache. 2018-05-25 22:47:31 +02:00
Markus Reiter
54834ccbe3 Move repo_var method to Tap class. 2018-05-25 16:21:37 +02:00
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
Markus Reiter
94f2098c36 Only use HOMEBREW_TAP_PATH_REGEX once inside Tap class. 2018-03-29 22:05:02 +02:00
Mike McQuaid
70a9a67411 Don't use Linuxbrew/homebrew-core (yet, at least).
This can't be tapped on vanilla Homebrew/brew because things like e.g.
`GlibcRequirement` are missing. We will put this back when the Linuxbrew
to Homebrew migration is complete.
2018-03-16 19:30:18 +00:00
Mike McQuaid
c9f02aa3f7 tap: don’t tap deprecated taps.
These no longer have any files in them.
2018-01-28 19:07:01 +00:00
ilovezfs
17f80a44e6
Revert "Use Homebrew's gitconfig for various commands" 2018-01-15 07:30:56 +00:00
Mike McQuaid
228cbd81c9 Use Homebrew's gitconfig for various commands
Git is a transport and storage mechanism for us so we don't want to
allow arbitrary customisation of this due to user issues e.g. #3664
and #3561.

Fixes #3664.
2018-01-11 20:40:59 +00:00
Mike McQuaid
7a68b4a3f9 Refactor command handling code
Don’t rely on having external commands always present in the PATH in
order to find them. Instead, provide an accessory method to Tap so
they can be added and used when needed.

While we’re here, do some general refactoring and cleanup of the
command code in these places.
2017-11-05 15:37:57 +00:00
Shaun Jackman
f9d42659ea pull: Fix pull --bottle 1234
Fix the error:
Error: undefined method `casecmp' for nil:NilClass
2017-10-22 08:52:16 -07:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Mike McQuaid
3a606abaa1 Merge pull request #3229 from BenMusch/check-for-master-no-refactor
doctor: Check for branch of core tap (take 2)
2017-10-18 10:59:59 +01:00
Dominyk Tiller
e98d0fda86
tap: pass explicit sort to handle APFS 2017-10-14 06:14:30 +01:00
Markus Reiter
175ca909ee Clean up code style and remove .rubocop_todo.yml. 2017-10-08 16:10:37 +02:00
Ben Muschol
2d6bd04007 Merge branch 'master' into check-for-master-no-refactor 2017-09-27 16:36:10 -04:00
Ben Muschol
fe5c885da0 Implement changes 2017-09-27 16:32:13 -04:00
Mike McQuaid
cf5fdeef1d Rubocop: manual rule fixes. 2017-09-24 21:23:59 +01:00
Alyssa Ross
b6d36003b3
Always output when tapping core
Hiding all output makes it look like Homebrew is hanging while the tap
operation (which can take a long time!) is running.

Closes #3053.
2017-09-07 12:12:22 +01:00
Markus Reiter
c26c9204fa Merge pull request #2965 from reitermarkus/cask-tap
Detect `Tap` in `CaskLoader`.
2017-08-05 16:54:26 +02:00
Misty De Meo
1c3ece12b9 Tap.each: return an enumerable when no block given 2017-08-03 17:23:16 -07:00
Markus Reiter
6d6ce7cf0a Detect Tap in CaskLoader. 2017-07-30 14:22:05 +02:00
Mike McQuaid
cd7e3cd39d Merge pull request #2778 from jasonkarns/tap-full-name
refactor: DRY up redundant formulations of {#user}/homebrew-{#repo}
2017-06-19 15:46:48 +01:00
Jason Karns
c2899b6559
Tap learns to form its own full_name
full_name is formed from `{user}/homebrew-{repo}` and is always
lowercase.
2017-06-19 09:42:59 -04:00
Mike McQuaid
7a0aff1080 Autocorrect Rubocop Style/PerlBackrefs. 2017-06-10 20:23:20 +03:00
Mike McQuaid
3589e24df0 tap: fix env typo. 2017-04-25 13:40:40 +01:00
Mike McQuaid
228239af31 Allow forcing Homebrew GitHub organisation.
On Linux this defaults to Linuxbrew but in some cases (i.e. a Linux
machine performing uploads for Homebrew) we want to allow this to be
overridden back to the defaults.

Relies on a change incoming to `brew test-bot` to set this there.
2017-04-25 09:13:36 +01:00
Mike McQuaid
e04cb899ac tap: warn on tapping deprecated, official taps.
They don't contain any formulae so tapping them will add pointless
clutter.
2017-04-22 16:53:48 +01:00