26 Commits
Author SHA1 Message Date
Bo Anderson a06d136d2c Move Sorbet gems into an optional group 2021-06-11 08:10:30 +01: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
Mike McQuaid 0f9bad0052 Fix bottle prefix and repository handling
We were previously only looking at the `cellar` value when pouring
bottles and ignoring the `prefix` and (implicit) `repository`.

Actually look at these values and set the defaults for each platform.

Also, when we're relocating to create or pour bottles when `prefix`
and `repository` are equal then skip relocating the `repository` and
always use references to the `prefix` instead.

Fixes #9453
2020-12-09 13:53:10 +00:00
Markus Reiter 24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Rylan PolsterandSeeker 90d9454d1e utils/spdx: add support for complex expressions
Co-authored-by: Seeker <meaningseeking@protonmail.com>
2020-08-19 12:47:58 -04:00
Mike McQuaid 56c02485e0 rubocops: test whitelists. 2020-04-12 14:17:05 +01: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
Mike McQuaid d64429a736 rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid 234e4aec96 Improve use of default_prefix? in tests. 2019-01-21 14:33:56 +00:00
Mike McQuaid 7615d3a812 Improve writable directory handling
Consolidate the handling of which directories need to exist and which
need to be writable. Additionally, add a fatal check for formula
installations to ensure that any directories that need to be writable
are so before attempting an installation.

Fixes #4626.
2018-09-06 18:38:43 +01:00
William Woodruff 367629d289 utils: Use JSON to marshal child errors
Replaces our serialization of child process
errors via Marshal with JSON, preventing
unintentional or malicious code execution outside
of the build sandbox.

Additionally, adds tests for the new behavior.
2018-09-04 11:03:32 -04:00
Markus Reiter 5841b992ac Refactor $LOAD_PATH. 2018-07-17 23:38:57 +02:00
Markus Reiter 98bc356a59 Use Pathname#/. 2018-07-04 02:26:36 +02:00
Markus Reiter 18e46b3ec2 Fix usage of HOMEBREW_LOAD_PATH. 2018-06-18 16:23:35 +02:00
Mike McQuaid 9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Mike McQuaid e03f07f302 Rubocop 0.53.0 automatic fixes. 2018-03-08 14:10:02 +00:00
Bob W. HoggandShaun Jackman 3cd869651b Add test fixtures for ELF executables
Add test/support/fixtures/elf/
and test/support/fixtures/tarballs/testball-0.1-linux.tbz
2017-11-26 08:37:57 -08:00
Mike McQuaid 57db2e539e Revert "Merge pull request #2597 from MikeMcQuaid/vendor-gems"
This reverts commit 3e4547f52e, reversing
changes made to 6edf9382bc.
2017-05-07 17:28:39 +01:00
Mike McQuaid e1bbab6ca6 Revert "Merge pull request #2603 from MikeMcQuaid/tweak-gem-vendoring"
This reverts commit 2372872974, reversing
changes made to 3e4547f52e.
2017-05-07 17:28:37 +01:00
Mike McQuaid 33f83be10e Tweak Gem vendoring.
If people have `HOMEBREW_RUBY_PATH` set then things explode in a rather
confusing fashion. Instead, run `bundle` for them with the arguments
that they'd want.

Also, move `macho` requires into the module itself; it's a pain having
to do everything for Bundler before requiring `pathname` which is a core
Ruby class.
2017-05-07 15:33:54 +01:00
Mike McQuaid ee253e465b Vendor all Homebrew's gems.
Homebrew's actually ended up using a fair few gems. While we want to
avoid Bundler at runtime (and this PR still does that, in fact uses
Bundler even less at runtime than it did before) writing our own version
to use at build-time seems redundant.
2017-05-07 13:52:57 +01:00
Markus Reiter e70d28cba1 Add test to check if rubocop-cask version is is outdated. 2017-02-12 23:06:35 +01:00
Markus Reiter cdcf362fc0 Add spec_helper. 2017-02-11 15:59:54 +01:00
Markus Reiter 7b9fd538fa Move integration_mocks to test/support/helper. 2016-11-16 23:52:38 +01:00
Markus Reiter 4db1317f38 Move all remaining fixtures to test/support/fixtures. 2016-11-16 23:52:38 +01:00