6025 Commits

Author SHA1 Message Date
Caleb Xu
c6b98d0b8c
os/linux/ld: add functions for querying dynamic linker 2024-04-13 19:35:29 -04:00
Caleb Xu
4b0e950736
utils/path: add child_of? method 2024-04-13 19:35:29 -04:00
Mike McQuaid
c683e011b8
Merge pull request #17049 from trail-of-forks/ww/attestation
attestation: add initial attestation helpers, integrate into `brew install`
2024-04-12 15:52:51 +01:00
William Woodruff
1607d04ad2
test: add Bottle#filename test
Signed-off-by: William Woodruff <william@yossarian.net>
2024-04-12 10:41:55 -04:00
William Woodruff
faa00c8c79
handle backfilled attestation subjects correctly
Signed-off-by: William Woodruff <william@yossarian.net>
2024-04-11 16:44:57 -04:00
William Woodruff
e2b5d93198
more attestation coverage
Signed-off-by: William Woodruff <william@yossarian.net>
2024-04-11 13:39:13 -04:00
Issy Long
c72598d937
Test that EnvConfig::ENVS hash keys are alphabetical
- Spoiler: they aren't.
- As part of Volunteer Month at work I introduced `hharen` to contributing to
  Homebrew, `cd $(brew --repo)`, `brew tests`, `brew style`, etc.
- We started to write a RuboCop for this. But my current thinking is that this
  test might be sufficient since it might be easier to notice "oop, a test is
  failing and I've added a new envvar" and re-alphabetize it than to write a
  RuboCop linter for it to do the one-time autofix. Considering how little this
  gets changed?

Co-authored-by: Hana <hharen@github.com>
2024-04-11 17:58:08 +01:00
William Woodruff
480e48b75d
attestation_spec: simplify gh_executable test
Signed-off-by: William Woodruff <william@yossarian.net>
2024-04-10 18:02:56 -04:00
William Woodruff
990b7d77d6
attestation: fix a missing arg, add initial specs
Signed-off-by: William Woodruff <william@yossarian.net>
2024-04-10 17:57:01 -04:00
Mike McQuaid
1474806527
Add more HOMEBREW_FORBIDDEN_* configuration
We already had `HOMEBREW_FORBIDDEN_LICENSES` but this commit adds
`HOMEBREW_FORBIDDEN_CASKS`, `HOMEBREW_FORBIDDEN_FORMULAE` and
`HOMEBREW_FORBIDDEN_TAPS` for also forbidding those.

Relatedly, add `HOMEBREW_FORBIDDEN_OWNER` and
`HOMEBREW_FORBIDDEN_OWNER_CONTACT` to allow customising these
messages.

There were no existing tests for `HOMEBREW_FORBIDDEN_LICENSES` so have
added more tests for all of these checks.

Co-authored-by: Bo Anderson <mail@boanderson.me>
2024-04-08 16:38:32 +01:00
Douglas Eichelberger
8d1fa05530 Restrict AbstractCommand test to commands in repo 2024-04-04 09:48:17 -07:00
Kevin
044e48b816
Merge pull request #17012 from Homebrew/move-untap-module-into-cmd
cmd/untap: move module methods back into the cmd
2024-04-03 22:16:13 -07:00
apainintheneck
2d47193d22 cmd/untap: move module methods back into the cmd
The extra module was their to facilitate testing but now that
everything is properly namespaced and each command is an instance
we can just move the methods into the command. Since it's an
instance now we don't need to be as careful about caching either.
2024-04-03 22:06:19 -07:00
Douglas Eichelberger
f664433b5c Enable RSpec/DescribeClass 2024-04-03 09:12:47 -07:00
Douglas Eichelberger
8ebcadd1c9 Clean up args_parse tests 2024-04-02 12:19:14 -07:00
Douglas Eichelberger
3f856f6516 Port Homebrew::Cmd::Repository 2024-04-01 16:02:41 -07:00
Douglas Eichelberger
6a1d43337c Port Homebrew::Cmd::Prefix 2024-04-01 16:00:47 -07:00
Douglas Eichelberger
b56e0b733d Port Homebrew::Cmd::Env 2024-04-01 15:58:07 -07:00
Douglas Eichelberger
754151fcb8 Port Homebrew::Cmd::Cellar 2024-04-01 15:56:06 -07:00
Douglas Eichelberger
102051c35d Port Homebrew::Cmd::Caskroom 2024-04-01 15:54:03 -07:00
Douglas Eichelberger
7bbf0a3206 Port Homebrew::Cmd::Cache 2024-04-01 15:53:56 -07:00
Douglas Eichelberger
fdc95d02c8 Port Homebrew::Cmd::Uses 2024-04-01 12:01:37 -07:00
Douglas Eichelberger
1362890f2a Port Homebrew::Cmd::Upgrade 2024-04-01 11:58:35 -07:00
Douglas Eichelberger
d5add6565c Port Homebrew::Cmd::UpdateReport 2024-04-01 11:58:20 -07:00
Douglas Eichelberger
48f4adad33 Port Homebrew::Cmd::Untap 2024-04-01 11:50:25 -07:00
Douglas Eichelberger
f8caae06f7 Port Homebrew::Cmd::Unpin 2024-04-01 11:48:40 -07:00
Douglas Eichelberger
5ccb0b0567 Port Homebrew::Cmd::Unlink 2024-04-01 11:47:18 -07:00
Douglas Eichelberger
4cf9ef831a Port Homebrew::Cmd::Uninstall 2024-04-01 11:46:01 -07:00
Douglas Eichelberger
841cfd9fdc Port Homebrew::Cmd::Tap 2024-04-01 11:43:52 -07:00
Douglas Eichelberger
be42d46d49 Port Homebrew::Cmd::TapInfo 2024-04-01 10:15:28 -07:00
Douglas Eichelberger
5495ff1eea Port Homebrew::Cmd::Search 2024-04-01 10:12:52 -07:00
Douglas Eichelberger
d875c970e9 Port Homebrew::Cmd::Reinstall 2024-04-01 10:09:48 -07:00
Douglas Eichelberger
057f561d2c Port Homebrew::Cmd::Readall 2024-04-01 10:05:02 -07:00
Douglas Eichelberger
5ef070380c Port Homebrew::Cmd::RbenvSync 2024-04-01 10:04:06 -07:00
Douglas Eichelberger
6c260db277 Port Homebrew::Cmd::PyenvSync 2024-04-01 10:01:54 -07:00
Douglas Eichelberger
427b527335 Port Homebrew::Cmd::Postinstall 2024-04-01 09:59:47 -07:00
Douglas Eichelberger
31aa89aa7c Port Homebrew::Cmd::PostgresqlUpgradeDatabase 2024-04-01 09:48:23 -07:00
Douglas Eichelberger
c1b1c11a8c Port Homebrew::Cmd::Pin 2024-04-01 09:44:14 -07:00
Douglas Eichelberger
7725fc62d4 Port Homebrew::Cmd::Outdated 2024-04-01 09:42:31 -07:00
Douglas Eichelberger
57442ab67e Port Homebrew::Cmd::Options 2024-04-01 09:15:58 -07:00
Douglas Eichelberger
c5dfac1f2c Port Homebrew::Cmd::NodenvSync 2024-04-01 09:15:58 -07:00
Douglas Eichelberger
a43224cb4a Port Homebrew::Cmd::Missing 2024-04-01 09:15:58 -07:00
Douglas Eichelberger
0cb608a80c Port Homebrew::Cmd::Migrate 2024-04-01 09:15:58 -07:00
Douglas Eichelberger
59adde2069 Port Homebrew::Cmd::Log 2024-04-01 09:15:58 -07:00
Mike McQuaid
7e35ae25d5
cask/utils: quieten down when fixing permissions fails.
When fixing permissions fails, we should not print the error messages
from e.g. `chmod` unless we are in debug or verbose mode (because we
immediately retry taking ownership `sudo`).
2024-04-01 16:22:42 +01:00
Mike McQuaid
df2c914b42
Merge pull request #16989 from cho-m/livecheck-throttle-audit-updates
formula_auditor: check livecheck throttle
2024-04-01 13:55:50 +01:00
Mike McQuaid
1f41dff48f
Merge pull request #16971 from cho-m/language-types
language/*: enable `typed: strict`
2024-04-01 13:51:34 +01:00
Mike McQuaid
8a59266e92
Merge pull request #16988 from Homebrew/remove-unnecessary-cache-clearing-in-tests
tests: remove unnecessary cache clearing
2024-04-01 08:12:45 +01:00
Michael Cho
2d50ef1bc0
formula_auditor: check livecheck throttle
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-04-01 00:54:13 -04:00
apainintheneck
226239da4c tests: remove unnecessary cache clearing
This PR removes all remaining unnecessary cache clearing in tests
from the codebase since we now clear all cachable classes between
tests making this functionally unnecessary.

Original PR to automatically clear caches:
- https://github.com/Homebrew/brew/pull/16746

I also moved the `Utils::Analytics` module to use cachable so
that we don't have to clear caches specifically in tests anymore.
2024-03-31 18:38:03 -07:00