169 Commits

Author SHA1 Message Date
EricFromCanada
20167e5f1b Adjust comments to tidy API docs output. 2018-10-18 21:42:43 -04:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Markus Reiter
769d89dead Resolve formulae in brew cleanup. 2018-09-11 17:44:39 +02:00
Mike McQuaid
9cd637ac20
formulary: NameError makes formulae unreadable.
And `NoMethodError` is a type of `NameError`.
2018-09-03 15:40:07 +01:00
Mike McQuaid
80d75bc0d8
Homebrew/.rubocop: tweak rules.
Adjust the rules based on the current codebase. Remove various enable,
disables and default values that are unnecessary. Add more comments
explaining why. Make minor changes needed to enable a few more rules.
2018-09-02 20:15:09 +01:00
Markus Reiter
9ffc7dd465 Use Resource#downloader for BottleLoader. 2018-08-01 05:40:15 +02:00
Markus Reiter
3d27b2aa8d Explicitly pass version to download strategy. 2018-08-01 05:40:15 +02:00
Mike McQuaid
cab0090048 formulary: handle missing methods.
This makes formulae unreadable.

See https://discourse.brew.sh/t/error-in-mpfr-2-formula/2575.
2018-07-15 19:29:31 +01:00
Mike McQuaid
0990fbaac4 formulary: catch argument errors.
Reraise as a `FormulaUnreadableError` as these are formulae that have
mistakes that cannot be trivially repaired.

Fixes #4475.
Fixes #4476.
2018-07-15 17:03:50 +01:00
Mike McQuaid
5c6ef3d920 Disable more deprecations.
- Turn more old `odeprecated` into `odisabled`
- Remove more old `odisabled`
- Remove code for older Ruby versions
2018-07-14 16:00:50 +01:00
Markus Reiter
f8b8186fa7 Reorder downloader.cached_location assignment. 2018-07-05 11:54:32 +02:00
Andrew Janke
8b55cb5ecb Refactor commands to remove "require cmd/help" 2018-06-07 04:59:59 -04:00
Mike McQuaid
6b817f775f Formula: handle bad tap runtime dependencies.
Also add some better exceptions for the cases that `nil`s end up
getting passed around incorrectly.
2018-06-01 19:22:33 +01:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Ethan Edwards
06f7d7d696 Allow bottles to use any DownloadStrategy 2018-03-24 10:53:49 +00:00
Markus Reiter
23ec8e07d4 Use / to join path. 2017-10-24 19:39:40 +02:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Markus Reiter
175ca909ee Clean up code style and remove .rubocop_todo.yml. 2017-10-08 16:10:37 +02:00
Mike McQuaid
83e2049636 formulary: handle unreadable bottle formula.
This occurs for any formulae that use relative `require` to files that
are inside of e.g. a tap to use abstract formulae.
2017-10-04 10:14:06 +01:00
Shaun Jackman
3ed832d4f0 BottleLoader: Use the formula stored in the bottle 2017-09-28 12:29:23 -07:00
Mike McQuaid
ae8235c555 Revert "Raise an exception when double loading a formula" 2017-08-12 15:00:36 +01:00
Alyssa Ross
4760f4e803
Raise an exception when double loading a formula
(As proposed in #2673)
2017-08-11 22:40:08 +01:00
Markus Reiter
ae4bafdb36 Simplify CurlDownloadStrategy. 2017-08-08 18:10:13 +02:00
ilovezfs
986887b413 Revert "Refactor SVN and cURL download strategies." 2017-08-07 14:31:56 -07:00
Markus Reiter
dc5a2c1764 Simplify CurlDownloadStrategy. 2017-08-07 21:31:17 +02:00
Shaun Jackman
7dca9a13ee BottleLoader: Fix installing a bottle from an URL
The name of the formula is not extracted correctly
when the URL includes a hyphen.
2017-06-13 13:12:23 -07:00
Mike McQuaid
ed9942fbd1 Merge pull request #2769 from MikeMcQuaid/rubocop-no-perl-backrefs
rubocop: don’t allow Perl regex backrefs.
2017-06-12 16:47:28 +01:00
Mike McQuaid
021cef4b2b Autocorrect Rubocop Style/SpecialGlobalVars. 2017-06-12 09:11:42 +01:00
Mike McQuaid
7a0aff1080 Autocorrect Rubocop Style/PerlBackrefs. 2017-06-10 20:23:20 +03:00
Shaun Jackman
ffe1ee1636 Install a bottle from an URL 2017-05-01 10:58:26 -07:00
Mike McQuaid
1330b74416 install: don't search when formula is unreadable.
These formulae are detected as missing but exist in an unreadable form.

Fixes #2485
2017-04-18 08:43:39 +01:00
SHIBATA Hiroshi
b7ce111d00
formulary: Workaround for method missing for downcase on Pathname object. 2017-04-11 09:43:41 +09:00
Markus Reiter
86bec56bf8 Make Formulary a module. 2017-02-20 13:06:23 +01:00
Alyssa Ross
ade8128a18 formulary: handle ScriptError in formula
I added a new `FormulaUnreadableError` subclass of
`FormulaUnavailableError` so existing `rescue`s of
`FormulaUnavailableError` handle this as well.

The new subclass will output the name of the formula with the error
(because this isn't always obvious from the original exception message)
followed by the original error message.

Fixes #1927.
2017-02-01 18:34:20 +00:00
Mike McQuaid
d8adae0f92 formulary: read from formula in opt prefix.
We want to prefer the newer/versioned formulae when possible but this
is preferable to a random cached formula or, worse, no formula.

This means `brew info foo` will never complain that `foo` is a missing
formula.
2017-01-09 21:42:09 +00:00
Mike McQuaid
c3a2bf34a2 tap_migrations: support renaming to/from casks.
Allow `tap_migrations` entries to have a `user/repo/formula` or
`user/repo/cask` format for migration of formulae to/from casks.
2016-12-29 13:37:28 +00:00
Mike McQuaid
85f62afae6 Merge pull request #1733 from vladshablinsky/rb_in_name
Don't drop .rb suffix for formula names
2016-12-29 12:32:12 +00:00
Uladzislau Shablinski
d091537636 Don't drop .rb suffix for formula names
Fixes #1718
2016-12-26 20:16:04 +03:00
Uladzislau Shablinski
478e4f112c formulary: call tap not formula
Fixes #1668
2016-12-14 05:07:54 +03:00
Mike McQuaid
d085a47124 Merge pull request #1646 from MikeMcQuaid/report-deprecations-to-tap
Tell people to report URL/tap deprecations to the tap.
2016-12-11 12:17:49 +00:00
Mike McQuaid
598c5e36f9 Tell people to report URL/tap deprecations to the tap.
Rather than Homebrew/brew or Homebrew/homebrew-core.
2016-12-10 13:04:14 +00:00
Mike McQuaid
8e2f0ccdc3 formulary: remap deprecated options from keg.
When reading a building a formula from a keg (rather than e.g. from
name) then the deprecation options were not remapped correctly as they
are only done in `Tab.for_formula` and not `Tab.for_keg`. Ensure that
after we’ve created the formula that the `used_options` are remapped
correctly.
2016-12-09 17:59:08 +00:00
Mike McQuaid
b32fafa82c formulary: don't warn on old formula name from keg/rack.
If there’s an old installation of e.g. `apple-gcc42` from when it was
part of `homebrew/core` then the tab will say it was from the
`homebrew/core` tap and then we’ll complain at the user (see #1459 for
an example). Instead, we only want to complain when the user actually
types in `homebrew/core/apple-gcc42` into a `brew` command.

Closes #1459.
2016-11-11 16:42:29 +00:00
Mike McQuaid
133bad9a97 formulary: migrate fully-scoped formulae names.
e.g. allow `brew install some/tap/formula` to look that formula up in
another tap if it has been migrated.

Also, add a deprecation message to point people towards the correct
naming.
2016-11-02 14:47:24 -04:00
Markus Reiter
6c6a4c9fa7 RuboCop: Style/AccessorMethodName 2016-09-24 19:28:26 +02:00
Markus Reiter
58e36c7319 Fix Style/GuardClause. 2016-09-24 12:24:35 +02:00
Markus Reiter
fe2d51e0b9 Fix Style/IfUnlessModifier. 2016-09-23 15:30:07 +02:00
Mike McQuaid
3ffb9a2f7c Fix another brew style from #971. 2016-09-19 16:28:28 +01:00
Mike McQuaid
c9d9e54de6 Fix brew style from #971. 2016-09-19 16:04:32 +01:00
Alyssa Ross
2a683f2569 upgrade, outdated: follow alias changes 2016-09-18 19:58:09 +01:00