3156 Commits

Author SHA1 Message Date
Mike McQuaid
f567302ebf
deps_spec: check args. 2020-05-04 12:59:56 +01:00
Gautham G
66ac96acde ARGV: Depercate ARGV.flags_only and replace with Homebrew.args.flags_only 2020-05-03 13:55:51 +05:30
Mike McQuaid
b2571d42eb
Merge pull request #7484 from MikeMcQuaid/cleanup-sandbox
Cleanup Sandbox code
2020-05-02 14:16:09 +01:00
Mike McQuaid
40ec8e69cc
Cleanup Sandbox code
Remove unused code and methods.
2020-05-02 13:45:04 +01:00
Gautham G
38c24d134c ARGV: Deprecate ARGV.casks and replace with Homebrew.args.casks 2020-05-02 13:21:16 +05:30
Gautham G
f6abc6fe19 ARGV: Deprecate ARGV.formulae, replace with Homebrew.args.formulae 2020-05-01 22:50:59 +05:30
Mike McQuaid
e6dffdd006
Merge pull request #7458 from Bo98/uses_since
software_spec: add uses_from_macos since bound
2020-05-01 12:53:59 +01:00
Mike McQuaid
e8a29a2d72
Merge pull request #7440 from FTLam11/FTLam11-#7432-add-json-option-to-brew-cask-outdated
Add JSON support for brew cask outdated, fixes #7432
2020-04-29 11:40:22 +01:00
Bo Anderson
eb303dd654 software_spec: add uses_from_macos since bound 2020-04-28 16:45:32 +01:00
Claudia
c85df70757
Fix flaw in Cask test helper
This commit fixes a flaw in the Cask test helper, causing the broken `Cask::Config` test to actually fail.

The flaw occurred while patching the `Cask::Config::DEFAULT_DIRS` hash.
While the original hash uses strings as values, the patched one used
`Pathname` values, masking a broken `Cask::Config::from_json` test.

Now the broken test fails like it should.
2020-04-27 15:09:36 +02:00
Claudia
cad8be3278
Add broken test, revealing test helper flaw
This commit adds a broken test, which is meant to expose a flaw in the
constructor of `Cask::Config`.

That (broken) test still passes because there’s also a flaw in our
test helper code.

The helper flaw happens to neutralize the `Cask::Config` flaw.
2020-04-27 15:00:22 +02:00
Claudia
dd3267ece0
Add test for JSON-based cask config loader
Previously, the JSON-based cask config loader was untested.
This commit changes the interface to accept a string, making the loader
easier to test. The commit also adds a test.
2020-04-27 14:54:56 +02:00
Frank Lam
dabbfe3e3e
Fix linter offenses 2020-04-26 21:31:21 +08:00
Frank Lam
f2fa2c5d30
Add JSON support to brew cask outdated
* brew outdated already has JSON support, now users and tools can get
similar results with brew cask outdated --json
2020-04-26 21:13:19 +08:00
Claudia
374f788a3c
cask/config_spec: add failing test
We recently added a new global artifact and then updated a cask to
make use of that new artifact. This caused a number of `brew cask`
commands to fail for users who had the cask installed before the
artifact was added.

This commit adds test cases for that failure mode.

See also:
- https://github.com/Homebrew/brew/pull/7286#issuecomment-613376568
- https://discourse.brew.sh/t/cask-definition-is-invalid-invalid-mdimporter-stanza-key-not-found-mdimporterdir
2020-04-21 18:26:51 +02:00
Alexander Bayandin
bd24f5a45e bintray: fix package creation 2020-04-21 14:36:01 +01:00
Mike McQuaid
fb0fa419ab
cask/cmd/upgrade_spec: remove more flaky tests. 2020-04-20 16:45:44 +01:00
Mike McQuaid
c4fed07d34
Merge pull request #7401 from dawidd6/pr-upload
Add pr-upload command
2020-04-20 16:33:06 +01:00
Dawid Dziurla
3dd5a7465d
add pr-upload command 2020-04-20 13:37:05 +02:00
Mike McQuaid
cddc67b451
rubocops/uses_from_macos: update list.
Also, provide details on how to update this in future and split it into
two.

Fixes #7396
2020-04-20 10:36:42 +01:00
Mike McQuaid
75c74e4674
cask/cmd/upgrade_spec: remove flaky test. 2020-04-20 09:25:16 +01:00
Mike McQuaid
8eed72cd8b
Move file mode audit to RuboCop. 2020-04-18 15:44:24 +01:00
Mike McQuaid
8a0e6a1603
test/cask/cmd/upgrade_spec: remove flaky test.
This is the second flaky test removed in this file. Tempting to just
remove the whole file if there's more.
2020-04-18 14:37:10 +01:00
Mike McQuaid
5e2351cde6
dev-cmd/audit: add --skip-style option.
This will allow `brew style` and `brew audit` to be run separately
without providing duplicates.

Additionally, run RuboCop style rules when `--strict` isn't provided and
remove a confusing reference to `style`.
2020-04-16 08:24:38 +01:00
Bo Anderson
9a8a4cff9f
test/dev-cmd/style_spec: fix flaky test 2020-04-15 10:56:09 +01:00
Mike McQuaid
85e65f6d9c
Move some cmd to dev-cmd.
None of these made sense as end-user commands.
2020-04-14 14:29:38 +01:00
Jonathan Chang
7d63f0b506 github: improve tests 2020-04-14 13:41:35 +10:00
Mike McQuaid
d52e870b07
rubocop: remove NewFormulaAudit.
This is no longer used anywhere.
2020-04-13 16:01:26 +01:00
Mike McQuaid
ea77fce409
rubocops/lines: move strict cop. 2020-04-13 16:01:25 +01:00
Mike McQuaid
9b5a0767cb
rubocops/formula_desc: merge cops, slim whitelist. 2020-04-13 16:01:25 +01:00
Mike McQuaid
476a61f51c
rubocops/class: rename, move cops, readd strict. 2020-04-13 16:01:25 +01:00
Jonathan Chang
ac5ea023cf
Merge pull request #7344 from jonchang/pr-automerge
dev-cmd: add pr-automerge
2020-04-13 20:39:42 +10:00
Jonathan Chang
5a95fe14aa dev-cmd: add pr-automerge
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-04-13 20:14:40 +10:00
Mike McQuaid
cbb5fd7657
Merge pull request #7257 from iMichka/linuxdependson
formula: add on_macos and on_linux
2020-04-13 09:13:06 +01:00
Michka Popoff
c7927f5af5 formula: add linux and macos only function blocks 2020-04-12 23:51:41 +02:00
Mike McQuaid
6ea6db9026
dev-cmd/audit: test presence of formulae in lists. 2020-04-12 14:17:06 +01:00
Mike McQuaid
b75733f1bd
rubocops: downgrade strict cops (passing in core). 2020-04-12 14:17:06 +01:00
Mike McQuaid
56c02485e0
rubocops: test whitelists. 2020-04-12 14:17:05 +01:00
Markus Reiter
30c313b7b9 Refactor cask command parsing logic. 2020-04-11 01:29:44 +02:00
Markus Reiter
a6be0e62af Improve spec helper. 2020-04-10 19:39:43 +02:00
Mike McQuaid
bd082011c2
Merge pull request #7280 from issyl0/audit-uses-from-macos
audit: Check if `uses_from_macos` usage is correct
2020-04-07 12:47:30 +01:00
Mike McQuaid
33816131a8
Homebrew::EnvConfig: add tests. 2020-04-07 10:00:32 +01:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Dario Vladovic
d12784533b
Update options spec 2020-04-06 15:24:15 +02:00
Dario Vladovic
3a21ca8956
Implement mdimporter cask stanza 2020-04-06 15:24:14 +02:00
Issy Long
857393ccfb
Audit correct uses_from_macos usage with RuboCop
- This builds on @jonchang's work that started in #6265.
- We now use `uses_from_macos` to declare dependencies that are implicit
  on macOS because they ship with macOS, but they're needed on Linux. We
  have to be sure that the dependencies people specify as
  `uses_from_macos` are actually shipped with macOS. So, we maintain a
  safelist of those dependencies and check against it.
- Also add more legitimate `uses_from_macos` dependencies to the list.
- This is runnable with `brew audit --only-cops=FormulaAudit/UsesFromMacos`.
- It produces different number of failures on macOS vs. Linux, because
  apparently we've not synced Homebrew/linuxbrew-core upstream thoroughly
  enough yet.
- Originally this was designed as a `--strict` audit, but we flipped it
  to be a normal audit because - to quote Mike - this is "sufficiently
  robust" now.
2020-04-06 13:42:27 +01:00
Bob Wombat Hogg
1a32ba3d2b system_command_spec: Make part of bash error regex optional 2020-04-05 11:05:30 -04:00
Mike McQuaid
c0dca271ef
Merge pull request #7144 from spaceapegames/master
Add headers option to URLs in forumlas
2020-04-01 16:22:35 +01:00
Bo Anderson
4265540cc4 load_path: trim entries where possible to fix Ruby crashes 2020-04-01 11:53:54 +01:00
Mike McQuaid
6277263b3c
Merge pull request #7225 from bayandin/add-free-port
Library/Homebrew: add free_port test helper
2020-03-31 09:06:04 +01:00