163 Commits

Author SHA1 Message Date
Markus Reiter
9649ef975c Only install default cask tap automatically on macOS. 2020-12-05 03:39:01 +01:00
Rylan Polster
80a46edee4 tap: add style_exceptions configuration 2020-11-30 18:18:49 -05:00
Jonathan Chang
a39344e7e3 tap: read_formula_list JSON file can be an array 2020-11-27 17:45:42 +11:00
Rylan Polster
ee47b863c4 move mapping from formula_lists to pypi_formula_mappings 2020-11-24 15:40:15 -05:00
Rylan Polster
51a1b7c9e1 move pypi list to tap formula_lists directory 2020-11-24 15:40:15 -05:00
Markus Reiter
0184e271d8 Fix RuboCop offenses. 2020-11-17 11:09:55 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Rylan Polster
59b1309900
Merge pull request #9039 from Rylan12/move-audit-allowlist-to-core
audit: migrate throttle list to Homebrew/core
2020-11-09 15:14:06 -05:00
Rylan Polster
4ae72e0bdf tap: add constants for json files 2020-11-09 08:39:56 -05:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Rylan Polster
2a941ec6b1 audit, tap: incorporate suggestions from code review 2020-11-05 16:14:09 -05:00
Rylan Polster
f33a4bff37 tap: no-op on invalid audit exception files
Also shift logic to directory-based organization instead of a single file with all lists
2020-11-04 23:43:22 -05:00
Rylan Polster
869941bccd audit: migrate throttle list to Homebrew/core 2020-11-03 13:06:33 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
2bdf3deb6f
Reduce shallow clone usage
GitHub has requested we request our usage of shallow clones. As a
result:

- do default to shallow clones on CI
- do not do --shallow-since when setting up new repositories in
  `brew update`
- do not support shallow clones of homebrew-core at all

We may consider in future unshallowing all clones unconditionally.
2020-10-09 09:57:04 +01:00
Mike McQuaid
f5ffd71266
tap: remove redundant exception.
Don't raise an exception only to catch it.
2020-09-30 16:43:47 +01:00
Markus Reiter
fc9a74dd28 Prevent tapping phinze/cask. 2020-09-28 20:54:56 +02:00
Markus Reiter
05a84c5a3f Explicitly specify block argument for each methods. 2020-09-19 02:03:56 +02:00
nandahkrishna
c1909e80b4
utils/tty: fix TTY handling for stderr 2020-09-17 04:18:13 +05:30
Mike McQuaid
8b97c27c21 brew style manual fixes 2020-09-01 14:26:45 +01:00
Markus Reiter
3118fedab9 Refactor and document Git. 2020-08-23 06:40:07 +02:00
Bo Anderson
e3372e2a14 Lazily require some heavy files 2020-08-20 02:05:17 +01:00
Markus Reiter
72ce3fabe2 Add cask-eid to list of deprecated taps. 2020-08-13 04:24:37 +02:00
Mike McQuaid
fb0a6338b1
Remove more tap pinning code.
This was deprecated and removed a while ago.
2020-08-06 12:24:10 +01:00
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