11087 Commits

Author SHA1 Message Date
Markus Reiter
783dbcc937 Use short-style lambdas. 2016-10-23 14:32:15 +02:00
Markus Reiter
ceec5a82c1 Use guard clauses. 2016-10-23 14:32:04 +02:00
Markus Reiter
9f513cc60c Remove redundant selfs. 2016-10-23 14:32:04 +02:00
Markus Reiter
ad8ae33c1f Fix spacing and indentation. 2016-10-23 14:32:04 +02:00
Markus Reiter
2b7e6c1dcb Don’t use %i literal. 2016-10-23 14:32:04 +02:00
Markus Reiter
ae7b944238 Align end with beginning of line where if/unless is. 2016-10-23 14:32:03 +02:00
Markus Reiter
8e9eae695a Use () as delimiters for %Q and %q literals. 2016-10-23 14:32:03 +02:00
Markus Reiter
1a0f8b8a02 Use slash-delimited regular expressions. 2016-10-23 14:32:03 +02:00
Markus Reiter
40b7e36746 Use 0-only prefix for octal numbers. 2016-10-23 14:13:16 +02:00
Markus Reiter
13e3272e37 Remove Cask’s RuboCop configuration. 2016-10-23 14:13:16 +02:00
Markus Reiter
364adff35c Bring spec_helper in line with test_helper. 2016-10-23 14:13:16 +02:00
Markus Reiter
e51accecfd Remove test_cask, fake_fetcher, and fake_response_for methods. 2016-10-23 14:13:16 +02:00
Markus Reiter
622cac47ae Use test/lib/config for tests. 2016-10-23 14:13:16 +02:00
Mike McQuaid
195bc6dbac Merge pull request #1351 from jawshooah/brew-man-refactoring
dev-cmd/man: use SOURCE_PATH instead of HOMEBREW_LIBRARY
2016-10-23 09:35:06 +01:00
Josh Hagins
1d8e59b31f dev-cmd/man: use SOURCE_PATH instead of HOMEBREW_LIBRARY
Don't Repeat Yourself.
2016-10-23 01:22:56 -04:00
Mike McQuaid
8019afb60a Merge pull request #1346 from MikeMcQuaid/more-rubocop-tweaks
More Rubocop tweaks.
2016-10-22 16:36:52 +01:00
Mike McQuaid
6c4042f593 More Rubocop tweaks.
- Don't enforce hash rockets on external commands.
- Enabled accidentally disabled ParenthesesAsGroupedExpression.
2016-10-22 15:55:13 +01:00
Mike McQuaid
c521ff4a94 Merge pull request #1345 from MikeMcQuaid/rubocop-style
Update Rubocop style.
2016-10-22 15:25:28 +01:00
Mike McQuaid
59a9f0a764 Merge pull request #1305 from apjanke/prune-build-deps-of-deps
install: prune build-only deps of deps
2016-10-22 14:32:48 +01:00
Mike McQuaid
4fb17c4753 Merge pull request #1331 from vladshablinsky/fix-outdated-group-by
cmd/outdated: group specs of same formula
2016-10-22 14:29:38 +01:00
Mike McQuaid
7f3507ee7d Merge pull request #1333 from vladshablinsky/compare-names-not-formulae
Compare names not formulae
2016-10-22 14:08:57 +01:00
Mike McQuaid
22182403c5 Merge pull request #1310 from MikeMcQuaid/changelog
Add `brew release-notes` developer command.
2016-10-22 13:40:05 +01:00
Mike McQuaid
1f963267b6 Update Rubocop style.
Another look at the current Rubocop rules and how they fit with our
existing and desired future style. Almost all of these changes were
automatic. Split some rules between formulae/brew where brew doesn't
have millions of cases that need fixed.
2016-10-22 13:32:46 +01:00
Mike McQuaid
0c661f5c90 Add brew release-notes developer command.
Outputs the merged pull requests on Homebrew/brew between two Git refs.
2016-10-22 12:10:48 +01:00
Josh Hagins
5b421b93c9 Merge pull request #1329 from jawshooah/cask/cleanup-tests
cask/test: DRY up tests and remove redundant helper
2016-10-20 14:56:11 -04:00
Andrew Janke
551ce2b5d2 Merge pull request #1308 from apjanke/info-with-formula-options
brew info: include options to dependencies in display
2016-10-20 10:35:05 -04:00
Markus Reiter
2b049006fa Merge pull request #1330 from reitermarkus/spec-helper
Refactor `spec_helper`.
2016-10-20 09:07:03 +02:00
Josh Hagins
fcd2f6b271 Merge pull request #1332 from jawshooah/cask/list-no-init
hbc/cli/list: don't require Caskroom to be initialized
2016-10-20 01:17:36 -04:00
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
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
Mike McQuaid
b9fe36abdc Merge pull request #1321 from wamatt/patch-1
brew.sh: tweak xcode hint to auto-accept license
2016-10-19 07:56:17 +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