12095 Commits

Author SHA1 Message Date
Markus Reiter
4b804389e1 Add test for GitHub::search_code. 2017-04-25 12:29:01 +02:00
Markus Reiter
238cd5430f Add remote search to brew cask search. 2017-04-25 12:29:01 +02:00
Markus Reiter
2bda194bd9 Add GitHub::search_code method. 2017-04-25 12:29:01 +02:00
Mike McQuaid
a38133e5a1 Merge pull request #2545 from JCount/xcode-update-clt
xcode: update Sierra CLT version to 802.0.42
2017-04-25 11:18:12 +01:00
Mike McQuaid
228239af31 Allow forcing Homebrew GitHub organisation.
On Linux this defaults to Linuxbrew but in some cases (i.e. a Linux
machine performing uploads for Homebrew) we want to allow this to be
overridden back to the defaults.

Relies on a change incoming to `brew test-bot` to set this there.
2017-04-25 09:13:36 +01:00
JCount
4b90f5fdc8 xcode: update Sierra CLT version to 802.0.42 2017-04-24 17:32:10 -04:00
Mike McQuaid
b3c69aba87 search: use single HTTP call for tap searches.
Use GitHub's code search API to search using the filename based on the
search query. This means we only need a single HTTP call and no more
multithreading madness. This also means we're able to search everything
in the Homebrew and Caskroom organisation by default without having to
maintain a list of things to search (and not) in here.
2017-04-24 14:11:04 +01:00
Mike McQuaid
6b0afa3e9c Remove puts_hash, require pp
I wasn’t aware this existed when I created puts_hash so: may as well
remove it.
2017-04-24 11:45:32 +01:00
Mike McQuaid
ceb1629ad7 Merge pull request #2465 from GauthamGoli/audit_components_port_rubocop
audit: audit_components method to rubocops and tests
2017-04-24 10:06:41 +01:00
Mike McQuaid
cf01485318 Merge pull request #2534 from MikeMcQuaid/which_editor_args
utils: make which_editor handle editor args.
2017-04-24 10:02:45 +01:00
Mike McQuaid
5b14d731ba Merge pull request #2490 from retokromer/patch-1
add date-based versioning
2017-04-24 08:52:53 +01:00
Mike McQuaid
3e40059f8d utils: make which_editor handle editor args.
Handle cases like e.g. `EDITOR="subl -w"`.
2017-04-24 08:49:11 +01:00
Reto Kromer
3585dfd9bd remove inner group 2017-04-23 20:59:02 +02:00
Reto Kromer
17aa90a2c5 remove inner uncaptured group 2017-04-23 20:52:40 +02:00
Mike McQuaid
d5155256ce Fix audit version_scheme and revision checks.
Another attempt at fixing `brew audit` issues around detecting
`revision` and `version_scheme` changes correctly. First done in #1754
and #2086 (reverted in #2099 and #2100).

To ease future debugging a `ph` helper has been added to print a hash
and a series of RSpec tests to verify that the `revision`,
`version_scheme` and `version` formula version audits behave as
expected.

Fixes #1731.
2017-04-23 18:56:22 +01:00
Mike McQuaid
45a7730f61 Fix and remove various TODOs.
Fix those that can be done so without tearing Homebrew to pieces and
remove the comments for those that can never be done.
2017-04-23 15:10:18 +01:00
Mike McQuaid
e7e53b89fc global: set HOMEBREW_PATH if unset. 2017-04-23 11:40:53 +01:00
Mike McQuaid
11acadaa50 Merge pull request #2524 from MikeMcQuaid/more-env-filtering-fixes
Hide sensitive tokens from install/test/post.
2017-04-23 09:45:47 +01:00
Markus Reiter
cb17a80577 Merge pull request #2362 from joshka/install-uninstall-messages
Install uninstall messages
2017-04-23 02:40:52 +02:00
Mike McQuaid
64e2e6e862 super: re-add set_cpu_flags.
It's used by ENV.fortran.

Fixes https://github.com/Homebrew/brew/issues/2530
Fixes https://github.com/Homebrew/homebrew-science/issues/5485
2017-04-22 21:56:32 +01:00
Mike McQuaid
e8ef50d075 readall: fix tapping taps without aliases.
Fixes https://github.com/caskroom/homebrew-cask/issues/32840.
Fixes https://github.com/Homebrew/brew/issues/2529.
2017-04-22 21:43:45 +01:00
Markus Reiter
5bf0745ece Merge pull request #2514 from reitermarkus/refactor-cask-metadata
Refactor cask metadata directory methods.
2017-04-22 22:01:53 +02:00
Mike McQuaid
1ceb420bdd Merge pull request #2480 from MikeMcQuaid/no-tap-deprecate-taps
tap: warn on tapping deprecated, official taps.
2017-04-22 18:45:09 +01:00
Mike McQuaid
671de2acc6 Merge pull request #2528 from MikeMcQuaid/which_editor_fixes
utils: fix which_editor.
2017-04-22 18:44:37 +01:00
Mike McQuaid
a1b8d4179c Merge pull request #2108 from MikeMcQuaid/readall-shadowed-aliases
readall: check for shadowed aliases.
2017-04-22 18:24:22 +01:00
Mike McQuaid
a937ed0a20 Merge pull request #2522 from MikeMcQuaid/more-deprecations
More deprecations.
2017-04-22 17:47:39 +01:00
Mike McQuaid
688034d22a utils: fix which_editor.
Handle when there's no editor variable specified or it's specified but
empty.
2017-04-22 17:29:59 +01:00
Gautham Goli
413a7e5dae Port audit_components method to rubocops and add corresponding tests 2017-04-22 21:53:16 +05:30
Mike McQuaid
114e8c5537 Merge pull request #2515 from MikeMcQuaid/travis-cache-bundler
travis.yml: cache Bundler output.
2017-04-22 17:11:06 +01:00
Mike McQuaid
cd5924950e readall: check for shadowed aliases.
If an alias has the same name as a formula then weirdness will result
so ensure this causes `readall` to fail.
2017-04-22 17:08:36 +01:00
Mike McQuaid
5c82e0d552 Merge pull request #2526 from MikeMcQuaid/audit-gnu-mirror-flip
audit: flip GNU mirror preference.
2017-04-22 16:54:50 +01:00
Mike McQuaid
e04cb899ac tap: warn on tapping deprecated, official taps.
They don't contain any formulae so tapping them will add pointless
clutter.
2017-04-22 16:53:48 +01:00
Mike McQuaid
d02b4f321d Hide sensitive tokens from install/test/post.
Hide these tokens to avoid malicious subprocesses e.g. sending them
over the network. Also, support using these tokens with environment
filtering and clear `HOMEBREW_PATH` from subprocesses to stop them
sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s
PATH for e.g. `brew doctor` etc.
2017-04-22 16:31:19 +01:00
Mike McQuaid
ba3c46d24f More deprecations.
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
Mike McQuaid
62764485c7 travis.yml: cache Bundler output.
Travis needs some coaxing to find where we put it. This should improve
build reliability due to network issues.
2017-04-22 15:44:47 +01:00
Mike McQuaid
044bd974e4 Merge pull request #2484 from MikeMcQuaid/unversion-formula-tap-match
audit: lookup unversioned formulae with Formulary.
2017-04-22 15:04:21 +01:00
Mike McQuaid
206d6de845 Merge pull request #2521 from MikeMcQuaid/tests-reduce-noise
tests: reduce some noise.
2017-04-22 13:25:38 +01:00
Mike McQuaid
94ef7318ae audit: flip GNU mirror preference.
Now that both the primary and mirror URLs use HTTPS we can flip these
around so the primary URL is the primary URL and we don't have problems
with waiting for mirror propagation.
2017-04-22 13:10:03 +01:00
Mike McQuaid
185b1787c6 audit: lookup unversioned formulae with Formulary.
This means that if e.g. the unversioned formulae exists in another tap
this audit won't produce a false positive.
2017-04-22 13:00:38 +01:00
Mike McQuaid
a6df701fad tests: reduce some noise.
- Tweak the way offline skipping happens
- Skip more tests that break when offline
- Hide more stdout output from tests.
2017-04-22 12:49:14 +01:00
Mike McQuaid
10d70aa93a Merge pull request #2523 from MikeMcQuaid/remove_formula_installer_feature_flags
formula_installer: remove feature flags.
2017-04-22 12:47:02 +01:00
Mike McQuaid
268f2dbde2 Merge pull request #2476 from MikeMcQuaid/edit-env-filtering
Fix `brew edit` with environment filtering.
2017-04-22 12:41:42 +01:00
Markus Reiter
44232ab044 Merge pull request #2519 from reitermarkus/validate-container-type
Validate `container :type`.
2017-04-22 12:53:17 +02:00
Mike McQuaid
fdcffb25a9 Merge pull request #2482 from MikeMcQuaid/audit-dependency-options
audit: ensure default dependencies don't use options.
2017-04-22 11:07:16 +01:00
Mike McQuaid
e41f0bf8c8 formula_installer: remove feature flags.
We've been testing the recursive dependency check and allowing unlinked
dependencies in CI for a while with no adverse consequences so enable
them globally now for all users.
2017-04-21 18:27:44 +01:00
Mike McQuaid
69c7a20896 Fix brew edit with environment filtering.
For many people `brew edit` makes use of the `EDITOR` variable to pick a
sensible editor. With environment filtering enabled unless this editor
is found in the default system PATH it'll fall back to e.g. `vim`.

Instead, ensure that we export the original, pre-filtering `PATH` as
`HOMEBREW_PATH` and use that internally to locate the editor. In future
this same approach will likely be used for requirements to be able to
find tools, too, and for other variables which we want to expose to
Homebrew itself but not other build tools.

Note that `HOMEBREW_PATH` is the same as `PATH` when build filtering
hasn't been enabled.
2017-04-21 18:26:12 +01:00
Mike McQuaid
3011cbac34 audit: ensure dependencies don't use options.
Option dependencies are nasty as they cause unnecessary builds from
source.
2017-04-21 18:24:10 +01:00
Mike McQuaid
1775c32210 audit: new formulae should not require patches.
We may under some circumstances accept these anyway but it's better to
nudge people into the right behaviours on local `audit`s.
2017-04-21 18:23:55 +01:00
Markus Reiter
75ceed39e6 Merge pull request #2520 from reitermarkus/pkgutil-plist
Partly revert “Fix `uninstall :pkgutil` leaving empty `.app` directories.”.
2017-04-21 17:37:42 +02:00
Markus Reiter
80e09c8dec Partly revert “Fix uninstall :pkgutil leaving empty .app directories.”. 2017-04-21 16:46:39 +02:00