2273 Commits

Author SHA1 Message Date
Mike McQuaid
733abc7e7d Merge pull request #2932 from GauthamGoli/audit_urls_rubocop_part_2
audit: Port audit_urls to rubocop and add corresponding tests Part 2
2017-07-25 15:46:23 +01:00
Mike McQuaid
f0ca3108f7 Merge pull request #2931 from JCount/version-devel-parsing-improvements
version: improve devel spec version parsing
2017-07-25 14:38:13 +01:00
Gautham Goli
2639b6c556 audit: Update Urls Cop with more rules of audit_urls and corresponding tests 2017-07-25 19:06:36 +05:30
Mike McQuaid
7041f7eb00 Merge pull request #2911 from GauthamGoli/audit_urls_rubocop_part_1
audit: Port audit_urls partially to rubocop and add corresponding tests
2017-07-25 13:46:19 +01:00
Markus Reiter
aa8eb21b8c Merge pull request #2861 from reitermarkus/cask-search-tty
Output plain list when running `brew cask search` without a TTY.
2017-07-24 00:04:43 +02:00
JCount
a5fff4547f verion_spec: add test coverage for devel spec version style
also expand coverage for improved dash version style
2017-07-22 19:31:36 -04:00
Gautham Goli
b7ddd271e1 audit: Port audit_urls partially to rubocop and add corresponding tests 2017-07-21 20:50:28 +05:30
Mike McQuaid
9747bc397a Merge pull request #2906 from GauthamGoli/new_formula_rubocop_fix
style: disable NewFormulaAudit cops' execution by default unless specified
2017-07-21 14:41:40 +01:00
Justin Baugh
dd334a8357 Add updated diagnostic test for build from source check. 2017-07-20 11:18:16 -04:00
Misty De Meo
f8300b2cb7 Merge pull request #2883 from mistydemeo/allow_passing_hash_to_system
Allow passing hash to system
2017-07-18 12:53:54 -07:00
Gautham Goli
086e540231 Add a rubocop config file to control cops' execution in audit and style 2017-07-18 20:23:03 +05:30
Misty De Meo
30adcab6cf
Add with_env helper to set temporary ENV vars 2017-07-15 17:39:55 -07:00
Gautham Goli
a8f1b02be9 audit: Port audit_options rules for new formulae to rubocop and add test 2017-07-15 17:35:10 +05:30
Gautham Goli
f3923f23ef audit: Port audit_options strict rules to rubocop and add tests 2017-07-14 21:43:16 +05:30
Mike McQuaid
fb310c57b1 sandbox: sandbox all taps by default.
We've been doing this in `brew test-bot`, for our CI and for
homebrew/core long enough that this is a reasonable default that
provides more protection to our users of non-homebrew/core taps.
2017-07-14 17:00:07 +01:00
Mike McQuaid
20db5470e3 Merge pull request #2879 from GauthamGoli/audit_option_rubocop_1
audit: Port audit_options non-strict rules to rubocop and add tests
2017-07-14 15:32:52 +01:00
Mike McQuaid
8b63214c2e integration_test: try tests on Gem load failure.
This should help with debugging `Gem::LoadError`s (e.g. for
https://github.com/Homebrew/homebrew-test-bot/pull/111).
2017-07-13 17:25:34 +01:00
Gautham Goli
222af82401 Read rubocop offenses as const from corresponding class in tests 2017-07-13 12:43:08 +05:30
Gautham Goli
b8adc1a8aa audit: Port audit_options non-strict rules to rubocop and add tests 2017-07-13 12:41:43 +05:30
Mike McQuaid
287ba7a6af Merge pull request #2872 from MikeMcQuaid/fix-high-sierra-tests
Fix `brew tests` on High Sierra.
2017-07-10 08:18:17 +01:00
Mike McQuaid
cabb7e898a integration_test: add simplecov libs when needed.
Don't add these unconditionally or with Bundler to speed things up a
bit. Also, to speed things up further cache these arguments so we don't
have to do the same generation every time.
2017-07-10 07:51:04 +01:00
Markus Reiter
4e26fdfcf6 Add test for non-TTY brew cask search. 2017-07-10 00:09:32 +02:00
Mike McQuaid
f1fa475c4f Merge pull request #2843 from GauthamGoli/audit_conflicts_rubocop
audit: Port audit_conflicts method to rubocop and add tests
2017-07-08 07:44:16 +01:00
Markus Reiter
dccdac55a8 Add helper for testing TTY output. 2017-07-08 00:57:08 +02:00
Markus Reiter
d29cb450f7 Output plain list when running brew cask search without a TTY. 2017-07-07 19:42:03 +02:00
Mike McQuaid
0b69ca85f7 spec_helper: add focus support.
When adding `, :focus` as a trailing argument to a `describe` or `it`
this allows you to only run that single test.
2017-07-07 16:34:29 +01:00
Gautham Goli
4ed34f91c2 audit: Port audit_conflicts method to rubocop and add tests 2017-07-07 20:46:57 +05:30
Mike McQuaid
cb3a47d9e2 Fix brew tests on High Sierra.
The `brew test` tests were failing as they were unable to include
`test/unit/assertions`. This is because it's a gem and we were setting
the `GEM_HOME` so system gems were being ignored.

While I was there and examining the `$LOAD_PATH`: reduce the number of
things we add there by using `Bundler.with_clean_env` and only adding
`HOMEBREW_LIBRARY_PATH` in the `$LOAD_PATH` if it isn't already there
(which it always is [and has to be] for integration tests).

This also seems to have the side effect of speeding up integration
tests from 1m26s to 1m8s on my machine.
2017-07-07 15:20:19 +01:00
Mike McQuaid
9f6762d958 language/node: general cleanup.
- Avoid using a temporary variable where not necessary
- Use fewer, better stubs in the tests to avoid warnings and better
  test the implemented functionality.
2017-07-07 15:11:41 +01:00
Markus Reiter
65b9e06082 Bump rubocop-cask version. 2017-07-05 20:51:51 +02:00
Markus Reiter
eb110e94f0 Merge pull request #2772 from reitermarkus/dmg-eula
Fix DMG mounting.
2017-07-02 02:04:07 +02:00
Markus Reiter
fd5e673d2d Merge pull request #2825 from reitermarkus/refactoring
Refactoring using `Forwardable` and `DelegateClass`.
2017-07-01 05:32:19 +02:00
JCount
0a5052141d Merge pull request #2827 from JCount/version-improve-url-only-version-parsing
version: improve url-only version parsing
2017-06-30 11:37:28 -04:00
JCount
d50312ae6b version_spec: add tests for char prefixed and w.x.y.z url-only styles 2017-06-30 10:53:24 -04:00
Mike McQuaid
bfe4eed034 Merge pull request #2826 from chrmoritz/languagenode
language/node: multiple improvements
2017-06-30 15:14:32 +01:00
Markus Reiter
29ffe15890 Merge pull request #2819 from reitermarkus/trash
🗑️ Use AppleScript instead of Swift for trashing.
2017-06-30 14:38:57 +02:00
Markus Reiter
6a1fa87191 Refactor Formula/Cask dependencies. 2017-06-30 02:20:50 +02:00
Christian Moritz
5e00c277ce partly revert log verbose npm pack output commit
to fix issues with shwoing npm debug output even on non-verbose install runs.
2017-06-30 00:55:34 +02:00
Christian Moritz
6baea2543a language/node: set cache config via argument
instead of writing a .npmrc file, which simplifies the code.
npm_cache_config is still preserved for backwarts compatiblility and
usage int he kibana@n formulas in core.
2017-06-29 20:29:25 +02:00
Christian Moritz
466fe9841a language/node: npm pack ignore prepublish scripts
This tells npm pack to don't run prepublish scripts at all.
I think this is the best default because:
* most modules don't have a prepublish script at all and aren't affected
  by this change
* most prepublish scripts are calling devDeps, which would fail in our
  case, because (dev)Deps aren't installed at npm pack time until #2820
  gets resolved
* we favor npm registry tarball for formula downloads, which are already
  prepublished, so we would in the best case needlessly run prepublish
  a second time and in the worst case it would fail (because a clean
  step is required before running prepublish a second time in a row)
* This change does the right thing for >99% of all the packages and
  would only affect packages with prepublish scripts downloaded from a
  non-npm registry tarball (like github tarballs) and with a prepublish
  script wich does no't require any devDep (unlike for cross platform)
2017-06-29 20:29:25 +02:00
Christian Moritz
fe39dbb78c language/node: log verbose npm pack output
This makes npm pack to log verbose debug output to the console to
simplify debugging npm pack failures.
Refs: https://github.com/Homebrew/brew/pull/2820#discussion_r123890729
Prevously Utils.popen_read swallowed all debug output.
2017-06-29 20:29:25 +02:00
Christian Moritz
02113e2714 language/node: build native addons from source
By telling node-pre-gyp and prebuild to don't pull prebuild binaries and
instead build them from source. This still may not work for some custom
third party scripts for pulling prebuild binaries.
2017-06-29 20:29:25 +02:00
Christian Moritz
7d8124f339 language/node: set npm loglevel to max -ddd
to match the loglevel used in npm_debug.log (previous --verbose loglevel
would match -dd)
2017-06-29 20:29:25 +02:00
ilovezfs
7013f9dee3 formula_desc_cop: allow formula name in desc
except at the very beginning, as the audit originally intended.

See https://github.com/Homebrew/legacy-homebrew/pull/45493.
2017-06-29 08:14:58 -07:00
Ed Flanagan ed@flanagan.xyz
700b5e2738 Add PreToken composite 2017-06-27 03:17:23 -07:00
Mike McQuaid
943c69f6a6 Merge pull request #2814 from mansimarkaur/java
[WIP] Added tests for language/java
2017-06-25 09:18:36 +01:00
Mike McQuaid
f4cdd7a051 Merge pull request #2790 from GauthamGoli/audit_legacy_patches_rubocop
audit: Port audit_legacy_patches method to rubocop and add tests
2017-06-25 08:54:59 +01:00
mansimarkaur
fac708da7a changes test names for class methods 2017-06-25 06:27:53 +05:30
mansimarkaur
1df9a475a8 Set java environment var to test overriding 2017-06-25 06:04:09 +05:30
Gautham Goli
2e82754776 audit: Port audit_legacy_patches method to rubocop and add tests 2017-06-24 17:06:26 +05:30