11461 Commits

Author SHA1 Message Date
Josh Hagins
fab6cc5b07 cask/test: remove compliance_test 2016-10-19 22:15:18 -04:00
Josh Hagins
cba0d069cc cask/test: DRY up tests and remove redundant helper 2016-10-19 22:15:18 -04:00
Josh Hagins
3bc2c2d087 hbc/cli/list: don't print empty line if nothing to list 2016-10-19 22:15:03 -04:00
Josh Hagins
32f2231cdf hbc/cli/list: don't require Caskroom to be initialized 2016-10-19 22:15:03 -04:00
Josh Hagins
f79cb2ba30 Merge pull request #1325 from vin047/numbered-usernames
fix 'cask info' for external repos with numbers
2016-10-19 20:44:55 -04:00
Uladzislau Shablinski
4ec43d02f5 test_formula: fix tests
New name and old name must have different names
2016-10-20 03:09:28 +03:00
Uladzislau Shablinski
0ae1785703 formula: use names for formula comparison
* Causes a bug in Formula#installed_alias_target_changed? when
  Formula#superseds_an_installed_formula? returns true because
  Formula#old_installed_formulae includes f for some Formula f.

* Causes a bug when foo@2.4 with alias foo has HEAD or devel version and
  we try to `brew upgrade foo --devel|--HEAD` from stable. The upgrade fails
  while since we installing formula to the same prefix it's alredy installed.
  The reason for that is that we use
  `formula_to_install = outdated.map(&:latest_formula)` in cmd/upgrade
  before calling upgrade_formula on foo.

  ```ruby
  def latest_formula
  installed_alias_target_changed? ? current_installed_alias_target : self
  end
  ```

  Formula#installed_alias_target_changed? compares formulae using
  Formula#==, which is wrong for this case, thus Formula#latest_formula doesn't
  return self and returns Formula#current_installed_alias_target with spec
  foo was initially installed instead of devel or HEAD, causing the error.
2016-10-20 03:09:23 +03:00
Uladzislau Shablinski
e3f3cb11a6 cmd/outdated: group specs of same formulae
Suppose you have devel and stable versions of `foo` installed.
Their versions should be grouped together regardless their specs.

Output before the change:
  foo (2.4), foo (3.28-01) < 5.1

Output after the change:
  foo (2.4, 3.28-01) < 5.1
2016-10-20 01:08:28 +03:00
Markus Reiter
95c93263e6 Refactor spec_helper. 2016-10-20 00:01:39 +02:00
Markus Reiter
f04a1b59aa Require spec_helper globally. 2016-10-19 22:27:14 +02:00
Markus Reiter
fb29a31c72 Merge pull request #1320 from reitermarkus/which-lsar
Also use `which` to find `lsar` in PATH.
2016-10-19 22:01:06 +02:00
Yoshimasa Niwa
60c4328a17 Use Ruby 2.x style for named arguments. 2016-10-19 11:14:30 -07:00
Josh Hagins
de5cadc447 Merge pull request #1328 from jawshooah/cask/fix-tests
Unset HOMEBREW_DEVELOPER in cask tests likely to raise deprecation errors
2016-10-19 14:08:27 -04:00
Josh Hagins
c18441e81b Merge pull request #1315 from jawshooah/cask/load-only-rb
hbc/locations: arg is file only if absolute or .rb file
2016-10-19 12:36:42 -04:00
Josh Hagins
eebf535bee dsl_test: unset HOMEBREW_DEVELOPER to avoid deprecation errors 2016-10-19 12:35:47 -04:00
Josh Hagins
fef8f143e8 compliance_test: unset HOMEBREW_DEVELOPER to avoid deprecation errors 2016-10-19 12:35:47 -04:00
Josh Hagins
e8b6aa4ed1 cask/spec: replace with_env_var with with_environment 2016-10-19 12:35:47 -04:00
Josh Hagins
fba00f2bbf testing_env: extract with_environment to helper module 2016-10-19 12:35:46 -04:00
Markus Reiter
1e92f997c1 Also use which to find lsar in PATH. 2016-10-19 18:20:34 +02:00
Vinoth Ramiah
154237ba8e fix 'cask info' for external repos with numbers
fixes 2 issues: error when username has a number, correct url for repos not on github
2016-10-19 14:59:57 +01:00
Matt Tagg
db6681f2ef brew.sh: tweak xcode hint to auto-accept license
Small improvement to the xcode license hint. Reduces friction by allowing user to accept the license in a single step. 
Reference: http://apple.stackexchange.com/questions/175069/how-to-accept-xcode-license
2016-10-18 18:40:57 -07:00
Josh Hagins
d08f61a704 Merge pull request #1317 from reitermarkus/refactor-rubocop-cask
Refactor `brew cask style` not to require `.rubocop.yml`.
2016-10-18 19:22:12 -04:00
Josh Hagins
b4fc4acc09 hbc/locations: arg is file only if absolute or .rb file
Handle the case when an argument passed to `brew cask` is both the name
of a Cask and a non-Cask file in the current working directory.

Fixes https://github.com/caskroom/homebrew-cask/issues/25611.
2016-10-18 19:19:33 -04:00
Markus Reiter
6e1c132f99 Remove Cask’s which method. 2016-10-18 17:22:08 +02:00
Markus Reiter
8d83516577 Look for container extraction programs in PATH. 2016-10-18 17:17:19 +02:00
Markus Reiter
9f76e2bbe3 Merge pull request #1318 from reitermarkus/refactor-cask-tests
Set `HOMEBREW_NO_EMOJI` and `HOMEBREW_CASK_OPTS` in `cask-tests`.
2016-10-18 17:01:55 +02:00
Markus Reiter
143c3ac5c8 Force the use of rubocop-cask’s default configuration. 2016-10-18 16:40:25 +02:00
Markus Reiter
3a22aff1b6 Refactor brew cask style not to require .rubocop.yml. 2016-10-18 16:39:08 +02:00
Markus Reiter
a92dc724b0 Set HOMEBREW_NO_EMOJI and HOMEBREW_CASK_OPTS in cask-tests. 2016-10-18 16:24:30 +02:00
Naren
5f2929788c following to follow 2016-10-18 09:52:55 -04:00
Naren
6ac54f297f remove empty line and concatenate newline to e.message in cli.rb 2016-10-18 09:52:55 -04:00
Naren
29d81fc647 updating DSL test 2016-10-18 09:52:55 -04:00
Naren
8e9720c5b9 updated cmd to point to prebug steps url 2016-10-18 09:52:55 -04:00
Mike McQuaid
2da012d84d Merge pull request #1311 from MikeMcQuaid/audit-no-trailing-whitespace
audit: don't complain about trailing whitespace.
2016-10-18 08:38:39 +01:00
Mike McQuaid
56ae868cf1 audit: don't complain about trailing whitespace.
This is handled by `brew style` now.
2016-10-18 08:11:02 +01:00
Josh Hagins
1fd7d52505 Merge pull request #1291 from Homebrew/cask/bump-rubocop-cask
hbc/cli/style: bump RUBOCOP_CASK_VERSION
2016-10-17 23:56:02 -04:00
Josh Hagins
e9863a71f6 hbc/cli/style: bump RUBOCOP_CASK_VERSION 2016-10-17 16:43:24 -04:00
Andrew Janke
05a027423a brew info: include options to dependencies in display 2016-10-17 04:55:13 -04:00
Andrew Janke
802402ee34 install: prune build-only deps of deps
This avoids needlessly installing build-time dependencies of dependencies
which are not themselves being built from source.
2016-10-17 04:45:49 -04:00
Andrew Janke
e72f1139ad Formatter: identifier: only reset color, not full styling 2016-10-17 00:45:37 -04:00
Tim D. Smith
de880f1e87 Merge pull request #1298 from tdsmith/no-no-bad-unicode
Don't choke on invalid UTF-8 in `file` output
2016-10-16 09:47:02 -07:00
Mike McQuaid
be2e6df948 scm/git: more old OS X versions tweaks.
- unset IFS to fix version parsing on older Bashes
- reuse existing HOMEBREW_MACOS_VERSION if it’s available
- set rather than unset popup_stub
2016-10-16 16:11:41 +01:00
Mike McQuaid
2a18378a03 Merge pull request #1303 from MikeMcQuaid/old-osx-git-shim
shims/scm/git: fix on old OS X versions.
2016-10-16 15:45:18 +01:00
Mike McQuaid
7292ad1f1a shims/scm/git: fix on old OS X versions.
On older versions of OS X (i.e. pre-Mavericks) `xcode-select` is not
required to be set when using the CLT. Fix this behaviour so `brew
update` doesn't tell everyone on that configuration to `brew install
git`.
2016-10-16 14:14:23 +01:00
ilovezfs
a53eca8cde dependency_collector: need xz dep on <= macOS 10.8
Mountain Lion: http://opensource.apple.com/source/libarchive/libarchive-25.1/config.h
  `/* #undef HAVE_LIBLZMA */`

Mavericks: http://opensource.apple.com/source/libarchive/libarchive-29/config.h
  `#define HAVE_LIBLZMA 1`
2016-10-16 05:48:37 -07:00
Tim D. Smith
22a64aa6c6 Explain why info could be nil 2016-10-15 23:52:55 -07:00
Tim D. Smith
371cd0dd3e Don't choke on invalid UTF-8 in file output
Sometimes `file` output contains data from the file under examination,
which may include binary data that does not represent valid UTF-8
codepoints. String#split dies if it doesn't understand the encoding, so
tell Ruby to treat `file` output as a bytestring.
2016-10-15 21:21:08 -07:00
Yoshimasa Niwa
5d606dd0a2 Use SystemCommand.run instead of custom wrapper.
There is an existing `SystemCommand.run` that executes command with
`sudo`.  Use that instead of yet another custom wrapper.
2016-10-15 15:19:30 -07:00
Mike McQuaid
7ac90613fd Merge pull request #1290 from maxnordlund/patch-1
Fix wrong ordering on when clauses in audit.rb
2016-10-15 17:52:54 +01:00
Max Nordlund
c7fde5ddc9 Fix when clause ordering. 2016-10-15 18:31:06 +02:00