163 Commits

Author SHA1 Message Date
Mike McQuaid
77c0d38c35
brew style --fix 2022-12-13 11:37:06 +00:00
Mike McQuaid
59f4b5226a
tests: test on Ubuntu 18.04. 2022-11-09 14:45:43 +00:00
Bo Anderson
4f4747cf98
Merge pull request #14014 from Bo98/ruby3-part2
Additional fixes for Ruby 3 compatibility
2022-10-20 16:17:01 +01:00
Mike McQuaid
bfd2263425
integration_test: fix Bundler deprecation.
Otherwise in some configurations some tests will fail.
2022-10-20 13:33:27 +01:00
Bo Anderson
eac32f0b20
Additional fixes for Ruby 3 compatibility 2022-10-18 01:54:59 +01:00
Bo Anderson
02164a35db
Use ORIGINAL_PATHS over envs; reject nil PATH 2022-06-17 19:47:57 +01:00
Bo Anderson
40bbdc659e
Fix some Style/FetchEnvVar offences 2022-06-17 19:47:57 +01:00
Mike McQuaid
0cda6a0657
Only use patchelf.rb
Remove support for using the `patchelf` formula for writing as it's been
off by default for a long time now.
2021-10-19 15:15:56 +01:00
Mike McQuaid
365e554f67
Revert "rubocops: allow uses_from_macos openssl@3" 2021-09-09 09:16:59 +01:00
Jonathan Chang
d85559876e
tests: skip formulae exist check for openssl* 2021-09-07 11:33:27 -07:00
Rylan Polster
27ba803bb5
Remove need for HOMEBREW_NO_DEV_CMD_MESSAGE 2021-07-20 11:47:31 -04:00
cnnrmnn
02993c5899 Update tests to stop passing full_clone 2021-05-06 10:11:21 -04:00
Mike McQuaid
6f071a06f8
Use JSON.pretty_generate
It's dramatically more human readable for very little difference in
space.
2021-04-09 15:44:37 +01:00
Nanda H Krishna
f648b071ad
dev-cmd/tap-new: use Utils::Git.setup_gpg! 2021-04-02 17:21:26 +05:30
Mike McQuaid
dc1fdc9f8d
Speedup brew --version.
Port `brew --version` to Bash to speed it up.

While we're here:
- remove (now) unused `Tap` Git methods
- use `--quiet` instead of `-q` to be more verbose

Benchmarks:
```
$ hyperfine --min-runs=3 --warmup=2 "git checkout origin/master; brew --version" "git checkout speedup_brew_version; brew --version"
Benchmark #1: git checkout origin/master; brew --version
  Time (mean ± σ):      2.083 s ±  0.004 s    [User: 396.8 ms, System: 597.2 ms]
  Range (min … max):    2.080 s …  2.088 s    3 runs

Benchmark #2: git checkout speedup_brew_version; brew --version
  Time (mean ± σ):     847.9 ms ±  35.2 ms    [User: 100.0 ms, System: 247.9 ms]
  Range (min … max):   824.1 ms … 888.3 ms    3 runs

Summary
  'git checkout speedup_brew_version; brew --version' ran
    2.46 ± 0.10 times faster than 'git checkout origin/master; brew --version'
```
2021-03-04 12:59:42 +00:00
Bo Anderson
a5b12a33c2
utils/gems: use Gem API rather than ENV to set paths 2021-02-27 16:23:28 +00:00
Bo Anderson
6cd1e5e384
Avoid passing around a massive $LOAD_PATH.
Portable Ruby crashes if the $LOAD_PATH gets too big.
2021-02-26 18:23:48 +00:00
Issy Long
83ead25229
rubocop: Disable RSpec/ContextWording for shared_context descs
- I couldn't figure out a way to start these with "when", "with" or
  "without" given where these are in cop descriptions. Three ignored
  things out of 150 problems is a good ratio though.
2021-02-19 23:31:17 +00:00
Seeker
2fc17772f7 bottle_spec: more cleanup 2020-12-25 13:10:10 -08:00
Michka Popoff
75491b7906 bottle --merge: add more write tests
In preparation for #9315
2020-12-23 10:34:16 +01:00
Seeker
cdb07d89ae integration_test: fix indentation for test formulae 2020-12-21 16:17:39 -08:00
Rylan Polster
f450bfbf5e style: migrate some lists back to Homebrew/brew 2020-12-02 20:56:07 -05:00
Rylan Polster
2256e547d9 Remove unneeded "formulae exist" test 2020-11-30 18:18:50 -05:00
Markus Reiter
da8d91bd05 Fix .simplecov exit status for integration tests. 2020-11-30 20:52:27 +01:00
Markus Reiter
5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01:00
Markus Reiter
d5b184d17a Add types for SystemCommand. 2020-11-23 05:48:43 +01:00
Markus Reiter
7c5d8a5288 Refactor FormulaInstaller. 2020-11-18 09:30:11 +01:00
Rylan Polster
50890ebd51 fix Lint/DuplicateBranch style 2020-11-16 02:02:52 +01:00
Jonathan Chang
215a84e328 rubocop: fix Style/DocumentDynamicEvalDefinition 2020-11-10 23:28:31 +11:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
5f005f67cf Refactor global Cask::Config. 2020-10-01 00:57:10 +02:00
Mike McQuaid
667c2b8804
Merge pull request #8382 from Bo98/startup-speedup
Lazily require some heavy files
2020-08-21 17:11:39 +01:00
Dawid Dziurla
c8c2e38bcb
Consistently use HOMEBREW_RUBY_WARNINGS when calling ruby
Adding this in `dev-cmd/ruby.rb` allows us to suppress warnings like:
```
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/language/python.rb:8: warning: Insecure world writable dir /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/scm in PATH, mode 040777
```
2020-08-20 14:59:58 +02:00
Bo Anderson
281632b64e test: ensure require "formula" isn't run on startup 2020-08-20 02:05:17 +01:00
Bo Anderson
e3372e2a14 Lazily require some heavy files 2020-08-20 02:05:17 +01:00
William Ma
a7b063efb5 named_args: Warn when cask with same name exists 2020-08-17 13:06:47 -04:00
William Ma
c8016f6c0a named args: add method tests 2020-08-14 14:10:55 -04:00
Markus Reiter
b48bc316e0 Use CLI::Parser for cask commands. 2020-08-13 05:15:15 +02:00
Markus Reiter
8a32954940 Move cask/all to just cask. 2020-08-09 01:34:07 +02:00
lionellloh
29622c35d1 tests: wrote up more tests for brew install 2020-07-07 21:34:49 +08:00
Mike McQuaid
0166211ffd
integration_test: don't error on missing bin. 2020-07-01 11:55:42 +01:00
Mike McQuaid
11cf77be17
formula_installer: prelude before fetch.
This ensures that dependencies are verified and tapped before they are
fetched. `FormulaInstaller#lock` has been moved into
`FormulaInstaller#install` to avoid locking until necessary.

While we're here, don't compute dependencies before fetching if we're
not going to use them.
2020-05-23 13:40:13 +01:00
Mike McQuaid
08a9f0e1c0
Use FormulaInstaller#fetch before #prelude. 2020-05-11 09:38:26 +01:00
Michelle Nguyen
2264c08cee
Fetch formula resources before unlinking during upgrade.
Fixes #6374.
2020-05-11 09:37:56 +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
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
56c02485e0
rubocops: test whitelists. 2020-04-12 14:17:05 +01:00
Dario Vladovic
3a21ca8956
Implement mdimporter cask stanza 2020-04-06 15:24:14 +02:00
Bo Anderson
4265540cc4 load_path: trim entries where possible to fix Ruby crashes 2020-04-01 11:53:54 +01:00
Mike McQuaid
bd076049a0
integration_test: only run on system Ruby.
There appear to be random, seemingly impossible to debug issues with
running integration tests on portable Ruby. Instead of confusing
contributors when these will be run on CI anyway: let's just skip them
by default (like we do with `--online` for online tests anyway).
2020-03-30 20:25:42 +01:00