Commit Graph
221 Commits
Author SHA1 Message Date
Markus Reiter 24eff8f81a Pass args in SoftwareSpec instead of using global args. 2020-07-30 03:21:12 +02:00
Mike McQuaid 25db60ebbb Unify (mostly) Homebrew code style
Make the Homebrew/cask and Homebrew/homebrew-core style more closely
match the rest of Homebrew.

To accomplish this:
- Run `brew cask style` to ensure we don't break style there when
  making changes or upgrading RuboCop in Homebrew/brew.
- Fix the HomepageMatchesUrl cop to better handle weird input.
- Remove the now unneeded `.rubocop_shared.yml`
- Fix the cask fixtures with `brew cask style --fix`.
- Share more style between Homebrew/brew, casks and formulae.
2020-07-27 12:57:40 +01:00
lionellloh 29622c35d1 tests: wrote up more tests for brew install 2020-07-07 21:34:49 +08:00
Mike McQuaidandGitHub 4e10341277 Merge pull request #7752 from SMillerDev/cask/readall
Support casks in readall
2020-07-01 12:19:30 +01:00
Mike McQuaid 0166211ffd integration_test: don't error on missing bin. 2020-07-01 11:55:42 +01:00
Bo Anderson 04cebe30dc test/support/fixtures/bottles: add Big Sur fixtures 2020-06-24 16:31:48 +01:00
Adrian Ho 6044bb17ee Fix test cask macOS dependency
This should be updated when the minimum OS requirement changes.
2020-06-23 09:51:56 +08:00
Mike McQuaid b58fa4ebb1 Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.

Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`.
2020-06-10 10:06:46 +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 NguyenandMike McQuaid 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
ImgBotAppandAlexander Ronald Altman 06841497bb [ImgBot] Optimize images
/Library/Homebrew/test/support/fixtures/test.svg -- 0.26kb -> 0.25kb (1.52%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-02-16 14:17:57 -08:00
Mike McQuaid 6670ae6202 global: require rubygems for activesupport. 2019-11-06 10:36:40 +00:00
Markus ReiterandGitHub e6cfb4a3c2 Merge pull request #6629 from timsly/manpage-artifact
Add Manpage artifact
2019-10-24 13:48:52 +02:00
Tim Masliuchenko 22d821323c Feedbacks 2019-10-23 16:28:00 +03:00
Tim Masliuchenko 3ef5e06943 Add Manpage artifact 2019-10-22 15:21:49 +03:00
Cheng XU 163ef284d2 brew test: more fixes for ARM
On ARMv7, the arch name is armv7l instead of armv7. So update the bottle
file name accordingly.
2019-10-19 15:20:35 +08:00
Cheng XU f0e848b3e0 fixtures: add testball bottle for ARM
Also fix the absolute link used by testball_bottle-0.1.intel_macintosh.bottle.tar.gz
2019-10-18 15:30:24 +08:00
Issy Long 341ea60807 Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Mike McQuaid 8a8fc68264 Ruby 2.6.3 brew tests fixes 2019-10-08 17:39:31 +01:00
Markus Reiter 7f39d333bc Move assert_success to SystemCommand::Result. 2019-10-04 23:39:25 +02:00
Alec Clarke 45806f6a97 Include test casks in the cask style check.
Currently the tests casks found in "/Homebrew/test/support/fixtures/cask/Casks" and "/Homebrew/test/support/fixtures/third-party/Casks" aren't included in the paths checked when running "brew cask style".

This change includes these test cask paths in the checked paths, and also includes the auto style fixes made by running `brew cask style --fix`.
2019-09-23 08:50:24 -04:00
Alec Clarke af10d13381 Check blacklisted Casks when auditing.
In some cases, certain Casks shouldn't be resubmitted for specific reasons: difficult to maintain, developers maintain their own version, ...

To make sure these cases are restricted - we can add them to a blacklist and have the blacklist checked as part of the `brew cask audit` steps.
2019-09-17 06:29:46 -07:00
Markus Reiter 16d2f8264c Use MacOSRequirement for casks. 2019-08-21 06:57:21 +02:00
Mike McQuaid c4f72312ce Fixup brew style failures. 2019-04-30 09:19:18 +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 ef2e297d3b Disable RubyGems by default.
This speeds up all Ruby invocations where we don't need RubyGems by
around 10%. Where we do need RubyGems: include it manually.
2019-04-18 17:45:03 +09:00
Mike McQuaidandGitHub 1281c4a663 Merge pull request #5983 from zachauten/continue-upgrading-casks-after-failure
'brew cask upgrade' will continue upgrading casks after a failure
2019-04-14 10:01:32 +01:00
Zach Auten 41b5b788d5 'brew cask upgrade' will continue upgrading casks after a failure
'cask upgrade' command collects all exceptions thrown
from individual casks during the upgrade process. If
there were more than one cask that raised exceptions
during the upgrade process, a MultipleCaskErrors
exception will be thrown.

Issue #5203
2019-04-12 19:26:33 -04:00
Mike McQuaid 1e5cfcc028 Separate tap tests into separate, correct files. 2019-03-27 13:35:42 +00:00
Mike McQuaid 59d680a626 dev-cmd: only one integration test per command.
Integration tests are useful in detecting breakages but much slower so
let's only use one per command and install formula outside the
integration test framework (which is also slow).
2019-03-27 09:45:48 +00:00
Mike McQuaid e095da4d01 rubocop: enable Layout/EmptyLineAfterGuardClause. 2019-02-21 12:55:49 +00:00
Mike McQuaid d64429a736 rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Markus Reiter 78d4373543 Simplify DEFAULT_DIRS. 2019-02-15 10:09:14 +01:00
Markus Reiter fda6e0cab3 Split cask config into three tiers. 2019-02-15 10:09:14 +01:00
Markus Reiter 1e1ce1c471 Save config file for casks. 2019-02-15 10:09:14 +01:00
Mike McQuaid 1aa8ad09e2 Deprecate macOS versions below Mavericks
And remove all dead/unneeded code.
2019-01-27 12:27:47 +00:00
Mike McQuaidandGitHub f82f3ffe7c Merge pull request #5571 from MikeMcQuaid/supported-cleanup
Warn more on unsupported configurations
2019-01-21 15:38:49 +00:00
Mike McQuaid 234e4aec96 Improve use of default_prefix? in tests. 2019-01-21 14:33:56 +00:00
Mike McQuaid 5c7fbaf259 Update RuboCop RSpec rules
Create a new, seperate RuboCop file that uses our RSpec rule
configuration if a specified tap has a `spec` directory.

Also, while we're here, fix up the various rules so that we don't have
any outdated TODOs, disable some rules for good and fix `brew style`
for Homebrew/bundle.
2019-01-21 13:39:11 +00:00
Mike McQuaid 170c5493a4 Update deprecations
- Add some `odeprecated`
- Make some `odeprecated` now `odisabled`
- Remove `odisabled` code.
- Remove old update migrations
- Remove GCC 4.0 compiler
- Remove Tiger-only code
- Remove 32-bit-only code
- Remove use of LD64
- Remove GCC 4.3 - 4.8 support.
2019-01-08 19:13:46 +00:00
Claudia 5be80a78f6 Use Homebrew-controlled domain for Cask dummy URLs
In a number of Cask specs, the value of the `homepage` stanza is currently set
to https://example.com. As of 2018-11-28, the TLS certificate served by
example.com seems to be expired, possibly due to an oversight on ICANN’s side.

While the certificate is certainly going to be renewed soon, it would be
desirable for Homebrew’s test result to be less dependent on ICANN’s actions.
This commit changes the homepages of all test Casks to http://brew.sh, whose
domain and TLS certificate are both controlled by Homebrew.
2018-11-28 20:51:55 +01:00
Mike McQuaidandGitHub 2562d270b5 Merge pull request #5033 from amyspark/gitjiro-improved
Cask: complete Git-Jiro's HTTPS audit check
2018-11-24 11:43:09 +00:00