129 Commits

Author SHA1 Message Date
Rylan Polster
34a1bc6618
Use SimulateSystem for ignore_missing_libraries 2022-07-23 03:09:29 +02:00
Rylan Polster
7255df1ec2
Only run to_hash_with_variations test on macOS 2022-07-21 17:33:19 +02:00
Rylan Polster
6c35317732
Add and update tests 2022-07-21 16:41:23 +02:00
apainintheneck
cb91f8b665 Add tests for retrieving formula based on dependents
Also, made sure to clear formula cache before
and after autoremoving packages.
2022-07-17 00:39:23 -07:00
apainintheneck
fe83500617 Moved autoremove logic into cleanup.rb and formula.rb
Cleanup.rb:
- Added #autoremove method
- #autoremove is called in clean when HOMEBREW_AUTOREMOVE is set

Formula.rb:
- Added #unused_formulae_with_no_dependents and helpers

Removed old autoremove.rb module.
2022-07-14 13:16:26 -07:00
Rylan Polster
5e5c78ebef
Fix tests and improve style 2022-07-11 04:03:37 -04:00
Rylan Polster
57417dd016
Add on_system :linux, macos: wrapper to OnSystem 2022-07-11 02:19:24 -04:00
Rylan Polster
5ec19adf58
Rename Override module to SimulateSystem 2022-06-28 15:35:20 -04:00
Rylan Polster
6ebd5174d6
Update tests for on_* methods in formulae and casks 2022-06-24 14:39:17 -04:00
Issy Long
cb2a09e65e
Fix (auto-correct) more RSpec/BeNil offenses
- The `RSpec/BeEq` auto-corrections made more `RSpec/BeNil` offenses, so another go of `brew style --only=RSpec/BeNil --fix\` is needed.
2022-03-01 00:36:37 +00:00
Issy Long
72e48024f0
Fix (auto-correct) RuboCop Rspec/BeEq offenses 2022-03-01 00:10:14 +00:00
Issy Long
6b76fd012a
Fix (auto-correct) RuboCop RSpec/BeNil offenses 2022-03-01 00:10:10 +00:00
Mike McQuaid
7ec6d41a1d
Revert "formula: remove OnOS." 2022-02-24 12:31:32 +00:00
Mike McQuaid
73951a01fc
formula: remove OnOS. 2022-02-22 10:19:09 +00:00
Carlo Cabrera
504dfa8494
Revert "remove on_os from formula"
This is causing `post_install` failures. Spotted in
Homebrew/homebrew-core#91763.

This reverts commit fc7462acd5ffb7cc393d2b56b989e96112ade896.
2021-12-21 20:43:57 +08:00
hyuraku
fc7462acd5 remove on_os from formula 2021-12-20 23:06:42 +09:00
Sean Molenaar
4cb8afeeef
service: add timer support for systemd 2021-11-30 11:05:11 +01:00
Bo Anderson
572c7cd179
formula: make each instance have separate spec references
This fixes SoftwareSpec#owner being mixed up if there are multiple formula references.
This in turn fixes --force-bottle not working in some scenarios like `brew reinstall`.
2021-10-26 15:03:33 +01:00
Bo Anderson
16afcff557
formula: fix error in Formula#specified_path with aliases 2021-09-22 02:08:18 +01:00
Sean Molenaar
869b0ea519
Formula: use opt_prefix for service helpers 2021-07-26 11:11:34 +02:00
Rylan Polster
aebaa7f8df
formula: only include sha256 for core formulae in bottle JSON 2021-06-05 12:31:55 -04:00
Rylan Polster
d60f549a48
info: add --bottle option for JSON bottle info 2021-06-05 12:27:24 -04:00
Rylan Polster
8b0f7e7ada
formula: add to_bottle_hash method 2021-06-03 12:59:42 -04:00
Connor Mann
0da4c4e3ce
Update tests 2021-05-29 13:16:27 -04:00
Rylan Polster
745d7ff813
formula: use only_if: in pour_bottle? 2021-05-20 11:24:08 -04:00
Carlo Cabrera
3c34c13056
formula: tweak preset pour_bottle? symbols
Let's rename `reason` to `requirement` so the preset symbol can just be
`:clt`. See Homebrew/homebrew-core#77509.
2021-05-19 02:21:59 +01:00
Rylan Polster
722a8eda3c
Fix tests 2021-05-18 01:55:06 -04:00
Rylan Polster
69e29a358b
Raise errors on invalid symbol/block combinations 2021-05-17 15:33:09 -04:00
Rylan Polster
fb3bfbb65c
Remove prefix option and add reason argument name 2021-05-17 10:55:46 -04:00
Rylan Polster
9e35b4de21
fix test 2021-05-15 14:51:11 -04:00
Rylan Polster
5e9fcafbd8
formula: add preset pour_bottle? symbols 2021-05-15 14:05:50 -04:00
Mike McQuaid
576ec2c9a3
Merge pull request #9517 from SMillerDev/plist_generator
formula: allow plists to be generated
2021-04-09 13:59:55 +01:00
Mike McQuaid
d73351251c
Deprecate, disable, delete code for next major/minor version.
Do the usual dance for bumping our major/minor version.
2021-04-09 09:30:36 +01:00
Bo Anderson
20d86c0185
Refactor some tag handling into a Utils::Bottles::Tag class 2021-04-08 17:23:57 +01:00
Sean Molenaar
b927ecfd85
Fix formulae method loading
Co-authored-by: nandahkrishna <me@nandahkrishna.com>
2021-04-08 10:16:57 +02:00
Sean Molenaar
4427fa283f
formula: allow plists to be generated 2021-04-08 10:16:57 +02:00
Bo Anderson
e49a338896
Implement caching for dependency expansion 2021-03-20 16:56:00 +00:00
Issy Long
e1ad07190e
rubocop: Fix RSpec/ContextWording offenses
- For some of these I changed `context` to `describe` as it fit better
  rather than contriving a "when", "with" or "without", or massively
  restructuring the tests.
2021-02-19 23:30:41 +00:00
Carlos Álvaro
ce7ab823ed
Replace test for checking formulae tap
As suggested by @Rylan12, integration tests are super slow.

Co-Authored-By: Rylan Polster <rslpolster@gmail.com>
2021-02-08 13:20:41 +01:00
Sam Ford
6c4041c026
Livecheck: Do not convert URL symbol to string 2021-01-13 09:35:54 -05:00
Mike McQuaid
87dd13aea6
Deprecate cask requirements.
This probably has to wait until 2.7.0 now and will require a bunch of
formula changes/deprecations but we should probably start moving in this
direction given we're not installing any of these on our CI any more.
2020-12-15 14:19:45 +00:00
Mike McQuaid
d496f5c121
Deprecations for Homebrew 2.6.0
Do the usual deprecate/disable dance for the Homebrew 2.6.0 release.

Not to be merged until the next release will definitely be 2.6.0.
2020-11-24 16:44:02 +00:00
Tie
afd7bb8889 make suggestions 2020-11-05 12:27:22 -05:00
Tie
b5427e5095 fix style issues 2020-11-04 18:53:03 -05:00
Tie
f95e1729a2 move logic from leaves to formula 2020-11-04 16:45:14 -05:00
Michka Popoff
8b85ef2e88 formula: add on_linux and on_macos blocks
for install and others
2020-11-03 22:54:07 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Seeker
f366280e18 formula: add any_installed_version 2020-09-01 09:45:54 -07:00
Seeker
5acdcd26d0 formula: rename installed_prefix to latest_installed_prefix 2020-09-01 09:32:32 -07:00
Mike McQuaid
22857b56b9
formula: deprecate devel blocks.
As we haven't released 2.3.1 I think we can get away with sneaking this
in. I'm also prepared to back this out if it's too widely used and
there's too much backlash.
2020-06-05 09:22:49 +01:00