139 Commits

Author SHA1 Message Date
Caleb Xu
a53c92bd7f Cache commands list for faster shell completions 2020-06-18 11:06:31 -04:00
Mike McQuaid
f94a38e4b1
tap-new: restrict new tap names.
Don't want to restrict this for all taps otherwise existing ones may
explode.

Fixes #7734
2020-06-12 11:42:40 +01:00
Mike McQuaid
5acb592779
tap: check for invalid fetched tap name.
Fixes #7732.
2020-06-12 09:12:39 +01:00
Jonathan Chang
2acb4771fe tap: permit creating shallow taps for CI 2020-04-09 18:46:47 +10:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
EricFromCanada
897f2bc225 tap-info: drop commands' brew(cask) naming requirement 2020-02-21 11:15:17 -05:00
EricFromCanada
bbdb72c5d5 tap-info: list cask tokens in JSON output 2020-02-21 11:14:52 -05:00
Emily Marigold Klassen
2c86e7e127 feat: expose casks in tap.to_hash for tap-info --json 2020-02-16 15:59:37 -08:00
Mike McQuaid
a915114ea7
tap: fix arguments.
- Use Ruby attribute arguments.
- Fix use of `full_clone` in `cmd/tap` to be on by default.
- Remove unnecessary argument in test.
2020-02-05 20:22:21 +00:00
Mike McQuaid
243e703700
tap: default to full clones.
This makes `Tap` consistent with what the installer is doing.

Generally shallow clones get slower and slower (and more and more
pointless) the more they are fetched so don't make sense for our
use-case.

Keep the option around anyway because it's useful for integration tests.
2020-02-02 16:36:37 +01:00
Mike McQuaid
2f39057243
Improve handling of *_GIT_REMOTE env vars
- Output a message whenever a non-default remote is set.
- Ensure that `CoreTap.instance.install` uses the right remote.
2020-01-13 09:43:02 +00:00
Issy Long
02524ba322
Remove --local from git config commands as it's the default
- The `--local` option doesn't exist in early versions of git (~1.7),
  but its behaviour is the default (saving in the current repo's .git
  directory).
- As it's the default across versions, we don't need to specify it
  everywhere.
- Reported in Linuxbrew/install issue 78.
2019-11-16 10:19:42 +00:00
Markus Reiter
bd666fbc79 Disable tapping of caskroom taps. 2019-10-02 23:30:45 +02:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
d1ea6f38d3
Fix mutable constants violations. 2019-04-19 21:46:20 +09:00
EricFromCanada
15c38a2d8b formatting fixes 2019-04-13 21:29:32 -04:00
Michka Popoff
45c61cdcdb pull: fix tap name for linuxbrew 2019-02-27 18:29:59 +01:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Shaun Jackman
d13a287954 Fix check_coretap_git_origin
check_coretap_git_origin was not working as intended.
Permit Linuxbrew/homebrew-core as a valid origin.
Factor out check_coretap_git_branch.
2019-01-25 14:01:10 -08:00
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