2459 Commits

Author SHA1 Message Date
L. E. Segovia
a2730c8618 Implement more of @reitermarkus's comments
- Include tests in context
- replace 'route' with 'path'
- more assorted fixes
2017-11-27 01:29:08 +00:00
Bob W. Hogg
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
Shaun Jackman
baa3d187d6 Add CVSRequirement and SubversionRequirement
Use these two requirements in DependencyCollector.
Remove the unused function MacOS::Xcode.provides_cvs?
2017-11-25 09:45:08 -08:00
L. E. Segovia
e0be066f8b Load Casks only once (and fix style issues) 2017-11-24 01:21:30 +00:00
L. E. Segovia
7ee98eb421 Implement more of @reitermarkus's comments
- Simplify outdated Casks checks
- Make use of RSpec's let(:) and .and syntax
2017-11-24 00:48:14 +00:00
Shaun Jackman
48ed28a154 Change the generic bottle tag to processor-system 2017-11-22 23:06:26 -08:00
L. E. Segovia
7ce4319012 Upgrade an outdated Cask just by name, no need for --greedy 2017-11-22 16:27:13 +00:00
Markus Reiter
236b017230
Merge pull request #3258 from Git-Jiro/improve_internal_stanza_command
improve 'brew cask _stanza' by checking for known stanzas
2017-11-20 21:41:48 +01:00
Mike McQuaid
9ebf338804 diagnostic: fix paths usage.
- Don't allow taking an argument. This doesn't work and never has as it
  caches the result regardless of the argument.
- Don't rely on the PATH to check for external commands.
2017-11-17 17:41:58 +00:00
L. E. Segovia
8ee6ac2613 Implement @reitermarkus's comments
- Split move into a move_back (and clarify when it is used)
- Remove unused flags
- Raise error if installed Caskfile not found
- Error out if an upgrade fails
- Remove some defensive programming checks
2017-11-16 10:40:32 -03:00
L. E. Segovia
36fe355159 Add tests for upgrade recovery 2017-11-13 08:46:08 -03:00
Mike McQuaid
5241d07474 environment filtering: pass through TRAVIS vars.
We use these internally so let's map them to `HOMEBREW_` variables.
2017-11-13 10:01:54 +00:00
Martin Schimandl
fea5350d52 Add line break to string 2017-11-10 20:16:38 +01:00
Martin Schimandl
2b261ad4a7 Refactor code to reduce characters per line 2017-11-10 20:16:38 +01:00
Martin Schimandl
db2c86204b internal_stanza.rb: Remove obsolete code. Improve detection of missing stanzas
internal_stanza_spec.rb: change do ... end blocks to { } blocks
2017-11-10 20:16:38 +01:00
Martin Schimandl
7f70080c94 Add another test to increase coverage. 2017-11-10 20:16:38 +01:00
Martin Schimandl
dfe4e7641a combine errors to a single if-statement. fix spec test 2017-11-10 20:16:38 +01:00
Martin Schimandl
99b7636008 Fix 'brew style' issues 2017-11-10 20:16:38 +01:00
Martin Schimandl
ff2239509d Change behaviour of 'cask _stanza' command. Add tests for 'cask _stanza' command 2017-11-10 20:16:38 +01:00
L. E. Segovia
72e673afae Fix reinstall/uninstall tests 2017-11-10 11:33:44 -03:00
Mike McQuaid
4d4722c97c Remove more uses of EOS.undent. 2017-11-10 14:22:39 +00:00
Mike McQuaid
219f9691ef
Merge pull request #3292 from claui/add-audit-test-cases
Add tests for `FormulaAuditor#audit_deps`
2017-11-10 13:34:56 +00:00
L. E. Segovia
522a229dbb Fix upgrade tests and some upgrade? leftovers 2017-11-08 08:33:33 -03:00
Mike McQuaid
b9d9e63743 spec_helper: fix etc leak.
Fix the `etc/bash_completion.d/_brew_services` leak from the new
bash completion in the Homebrew/homebrew-services tap.
2017-11-05 13:20:08 +00:00
Mike McQuaid
872bd4f703
Merge pull request #3395 from GauthamGoli/parameters-audit-regex-fix
lines_cop: Update regex patterns to prevent false positives
2017-11-03 17:48:09 +00:00
Mike McQuaid
c6f40d5864
Merge pull request #3385 from MikeMcQuaid/path-fixes-cleanup
Fix and cleanup some PATH usage.
2017-11-03 17:45:57 +00:00
Mike McQuaid
c843fd2f12 requirement: prepend rather than append PATH.
Otherwise this ends up behind e.g. `/usr/bin` so is pretty useless.
2017-11-03 14:50:17 +00:00
Markus Reiter
4eeac6f884
Merge pull request #3389 from amyspark/hacktoberfest-single-zap
Check that a single uninstall_* and zap stanza is defined
2017-11-03 13:23:08 +01:00
L. E. Segovia
c636be07f9 Separate do end into multiple lines 2017-10-31 09:54:30 -03:00
Dominyk Tiller
bff4762d36
text_cop_spec: update go get tests 2017-10-31 01:01:42 +00:00
L. E. Segovia
917c138eeb Add tests for uninstall_* and zap stanzas 2017-10-30 20:47:40 -03:00
Mike McQuaid
7a0fdc3d03
Merge pull request #3393 from MikeMcQuaid/with_env_tweaks
Tweak use of with_env
2017-10-30 08:17:06 +00:00
L. E. Segovia
55727b7895 Hack a first working version of upgrade 2017-10-29 17:34:53 -03:00
Gautham Goli
f648dd03ff lines_cop: Update regex patterns to prevent false positives 2017-10-29 23:40:04 +05:30
Isabell Long
640b1e9dcb formula_desc_cop: ensure no full stops at the end of desc
- This was a suggestion by Mike McQuaid in my `homebrew-core` audit
  description PR. Based on ilovezfs's incantation `grep -r -E 'desc
  ".*\."' *.rb`, some formulae descriptions do end in full stops. (My
  initial assessment of this failed to account for the fact that
  descriptions are strings and so end in `"`.)
- Add an autocorrect for this cop, too.
2017-10-29 15:19:31 +00:00
Mike McQuaid
ca189437e4 Tweak use of with_env
- Use it in more places where it saves code
- Allow using symbolic keys for a cleaner interface
- Use `HOMEBREW_GEM_*` instead of `GEM_OLD_*`
2017-10-29 14:44:43 +00:00
Mike McQuaid
8aa697363b test.flac: add flac fixture. 2017-10-27 09:33:37 +01:00
Markus Reiter
8821cdc492 Include FileUtils in spec_helper. 2017-10-24 19:39:40 +02:00
Markus Reiter
7e970216a3 Refactor and fix RuboCop specs. 2017-10-24 19:39:40 +02:00
Markus Reiter
fd29511bae Update to RuboCop 0.51. 2017-10-24 19:39:40 +02:00
Mike McQuaid
7f46dcfa35 Merge pull request #3313 from GauthamGoli/audit_line_rubocop_part_4_rebase_attempt_1
audit: Port line_problems to rubocop and add tests part 4
2017-10-24 10:36:31 +01:00
Shaun Jackman
f9d42659ea pull: Fix pull --bottle 1234
Fix the error:
Error: undefined method `casecmp' for nil:NilClass
2017-10-22 08:52:16 -07:00
Gautham Goli
7b2fab8ec5 Merge branch 'master' into audit_line_rubocop_part_4_rebase_attempt_1 2017-10-21 13:53:44 +05:30
Gautham Goli
ee35d65867 lines_cop: Refactor to multiple cops and fix style violations 2017-10-21 12:50:49 +05:30
Gautham Goli
bdc7eba4b3 Merge branch 'master' into audit_line_rubocop_part_4_rebase_attempt_1 2017-10-21 01:48:00 +05:30
Claudia
e0bb978cc9 Add tests for FormulaAuditor#audit_deps
These tests cover a few aspects of the `FormulaAuditor#audit_deps`
method. The main focus is the part where FormulaAuditor checks for
dependencies on formulas which are tagged `keg_only` with the
`:provided_by_macos` reason.

For this particular kind of `keg_only` formulas, we expect
`brew audit --new-formula` to fail with a problem message like:

> Dependency 'bc' may be unnecessary as it is provided by
> macOS; try to build this formula without it.

For more details, see the relevant discussion:

[1] https://github.com/Homebrew/homebrew-core/pull/14067#issuecomment-335046151

[2] https://github.com/Homebrew/brew/pull/3290#issuecomment-335052140
2017-10-20 14:08:22 +02:00
Markus Reiter
487bec9570 Move String#undent to compat. 2017-10-18 14:39:09 +02:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Mike McQuaid
1d40061c69 Merge pull request #3291 from JCount/lines-cop-fix-wine-universal-binary
lines_cop: add ENV.universal_binary audit exemption for wine
2017-10-18 10:32:34 +01:00
Shaun Jackman
230c87aff0 Rename MinimumMacOSRequirement to MacOSRequirement
Move MinimumMacOSRequirement to compat.
2017-10-17 16:16:44 -07:00