2000 Commits

Author SHA1 Message Date
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
Markus Reiter
f24fc42362 🔥 Remove test files after trashing. 2017-06-24 09:15:37 +02:00
Markus Reiter
a1f9032b95 🗑️ Use AppleScript instead of Swift for trashing. 2017-06-24 09:15:37 +02:00
mansimarkaur
67c48360fa Improved code quality 2017-06-24 02:34:10 +05:30
mansimarkaur
66d5baf3fe Removed extra space from include clause 2017-06-24 02:18:52 +05:30
mansimarkaur
690e841fca Added tests for language/java 2017-06-23 06:26:23 +05:30
mansimarkaur
bfd19f9170 Stubbed nil:NilClass 2017-06-23 03:40:03 +05:30
mansimarkaur
5fed1f5cbe Attempt to fix tests 2017-06-23 03:40:03 +05:30
mansimarkaur
69840e2a2f Avoided the prepend_path not existing method error 2017-06-23 03:40:03 +05:30
mansimarkaur
f225eaf4d9 Added test for non existent node formula and existent npmrc 2017-06-23 03:40:03 +05:30
mansimarkaur
837ffa209c stubbed the node formula 2017-06-23 03:40:03 +05:30
mansimarkaur
2cb678a6d5 Improved test quality 2017-06-23 03:40:03 +05:30
mansimarkaur
cf5db0e0df Fixed style errors 2017-06-23 03:40:03 +05:30
mansimarkaur
7cd5d143c3 Added tests for language/node.rb 2017-06-23 03:40:03 +05:30
Markus Reiter
17b2694b1d Merge pull request #2806 from reitermarkus/apfs
🔨  Fix sorting on APFS.
2017-06-20 20:32:37 +02:00
Markus Reiter
fc739bf82e Add trash util. 2017-06-20 15:53:33 +02:00
Markus Reiter
19cf6dcb3f 🔨 Fix sorting on APFS. 2017-06-20 15:44:54 +02:00
Gautham Goli
0e1c88e7ae Refactor Checksum cop to add autocorrect method 2017-06-16 19:45:16 +05:30
Gautham Goli
77da75e7d6 Simplify Checksum cop by auditing all checksums 2017-06-16 19:45:16 +05:30
Gautham Goli
4d7a983415 audit: Port audit_checksum method to rubocop and add tests 2017-06-16 19:45:16 +05:30
Markus Reiter
3fe32053a7 Merge pull request #2775 from reitermarkus/language
Fix `--language` option.
2017-06-14 14:26:44 +02:00
Markus Reiter
dcb85571ca Add test for --language option. 2017-06-14 13:54:12 +02:00
Markus Reiter
2f0aad5d88 Fix DMG mounting. 2017-06-13 23:57:23 +02:00
Markus Reiter
9c8f7138f3 Add casks method to iterate through arguments. 2017-06-13 19:45:29 +02:00