9434 Commits

Author SHA1 Message Date
Martin Afanasjew
046b481806 --cellar: move help to documentation comment 2016-04-20 13:45:26 +02:00
Martin Afanasjew
bab823288f --cache: move help to documentation comment 2016-04-20 13:45:26 +02:00
Martin Afanasjew
d29d58b3fb man: put option-style commands after regular ones 2016-04-20 13:45:26 +02:00
Martin Afanasjew
d183ff8065 tests: fix Ruby 1.8 syntax warnings
In `Library/Homebrew/test/`:

test_integration_cmds.rb:431: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:502: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:507: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:585: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:709: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:710: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:711: warning: (...) interpreted as grouped expression
2016-04-20 01:42:14 +02:00
Martin Afanasjew
980001341d brew.rb: fix Ruby syntax warning
Library/brew.rb:108: warning: `*' interpreted as argument prefix
2016-04-20 01:38:00 +02:00
Xu Cheng
0949a6955a man: fix Ruby syntax warning
Library/Homebrew/cmd/man.rb:44: warning: assigned but unused variable - commands

Closes #116.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-19 22:44:38 +08:00
Xu Cheng
799d3aec15 test-bot: simplify the logic
Closes #115.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-19 16:29:29 +08:00
Xu Cheng
9a6d5a4fee add Tap#default_remote
* without `default_remote`, `CoreTap#install` won't be able to tell
  whether user has passed to custom remote to it.
* simplify some part of logics
2016-04-19 16:29:29 +08:00
Xu Cheng
71b6e0aa18 Tap#install: better TapRemoteMismatchError check
* remote check requires `git` installed.
* Do not perform check if user does not passing remote explicitly.

Fixes #108
2016-04-19 16:29:29 +08:00
Xu Cheng
9b79f45e94 Revert "man: fix Ruby syntax warning"
This reverts commit 2caf7b76bb3e09ffabf8c56d3934ba8190673fdc.
2016-04-19 15:25:44 +08:00
Xu Cheng
612f70fba1 linkage: fix Ruby syntax warning
Library/Homebrew/dev-cmd/linkage.rb:113: warning: shadowing outer local variable - label
2016-04-19 15:08:38 +08:00
Xu Cheng
2caf7b76bb man: fix Ruby syntax warning
Library/Homebrew/cmd/man.rb:44: warning: assigned but unused variable - commands
2016-04-19 15:08:34 +08:00
Xu Cheng
5d1e648194 test-bot: prevent infinite loop caused by unavailable formula.
Noted, `brew tap foo` will not fail if the tap is already installed.
2016-04-19 14:21:42 +08:00
Xu Cheng
684c44f356 linkage: load formula from rack
This is to avoid TapFormulaAmbiguityError.
We should load formula based on what we installed,
rather than just name.
2016-04-19 13:55:47 +08:00
Andrew Janke
da34fba151 test-bot: check all dependents for broken dylibs
Pulls 'brew linkage' in to main brew repo as a dev-cmd, and has test-bot
use it to detect dylib breakage, which usually means a revision bump is
needed. Checks all dependents, not just those with a 'test do' block
defined, since we can do this without formula support.

Closes #107.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-18 13:37:34 -04:00
Dominyk Tiller
c3c233dd80 test-bot: don't untap during cleanup_before 2016-04-18 17:54:41 +01:00
Misty De Meo
75f1e49027 CLT: special case detect_version pre-3.x
Fixes mistydemeo/tigerbrew#186.

Closes #110.

Signed-off-by: Misty De Meo <mistydemeo@github.com>
2016-04-18 09:52:46 -07:00
Misty De Meo
19fba42c69 Xcode: update version detection for 2.x 2016-04-18 09:52:46 -07:00
Misty De Meo
a1a81daffc XQuartz: detect Tiger's prefix 2016-04-18 09:52:46 -07:00
Misty De Meo
880ba0c952 XQuartz: add Tiger's version 2016-04-18 09:52:46 -07:00
Misty De Meo
eb9e68817d XQuartz: support Tiger's prefix 2016-04-18 09:52:46 -07:00
Dominyk Tiller
46cfc9826c test-bot: purge non-core taps at start/end of job (#109)
e70a3552d3 seems to have
exacerbated the problem where taps stick around and then `brew uses` gets executed
on a whole host of taps, which is currently breaking almost every PR for formulae
that would be used cross-tap, as well as causing lengthier CI builds.

Examples from the last week or so include sqlite, V8, protobuf, and so on. Whilst it
may be true that cross-tap formulae failing can show problems that need looking at,
a lot of the time the failures are unrelated to the build in question and just
leave contributors confused on what needs to be done, or why their PR is failing
for something that seems entirely unrelated.

You can see the taps failing to vanish locally by doing something like:

```
brew tap homebrew/fuse
brew tap homebrew/versions
cd $(brew --prefix) && git clean -ffdx --exclude=/Library/Taps/
brew tap
...
homebrew/core
homebrew/fuse
homebrew/versions
```

This is a very simple proposal to handle the problem, but there's no real reason
I couldn't write this functionality into untap itself and then we call that in
test-bot. Just didn't necessarily want to jump immediately to expanding the untap
command to solve what is more-or-less a CI problem.
2016-04-18 17:39:52 +01:00
Andrew Janke
acc9a7ca85 brew test, install, update-test: add --keep-tmp option
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.

Closes #66.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-18 12:23:08 -04:00
Mike McQuaid
0e8140b012 brew.sh: error out if no Ruby found.
This is a nicer error message than the `exec` failing at a later stage.
2016-04-18 15:16:43 +01:00
Martin Afanasjew
f15b631875 brew.rb: don't show help for 'brew <command> help'
Showing help makes sense for `brew help <command>`, but showing it for
`brew <command> help` is undesirable and prevents all commands from
accepting a named argument `help` (formula, tap, file name, etc.).

All other help flags are still detected before *and* after the command.

Closes #103.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-18 00:52:33 +02:00
Martin Afanasjew
c6536066dc ARGV: remove unused 'usage' method
Also remove related helper method `Homebrew.help_s`.
2016-04-18 00:52:32 +02:00
Martin Afanasjew
3503806e77 help: handle help output (move from 'brew.rb')
Keep the footprint of `brew.rb` small. Handle fetching/displaying an
appropriate help text (taking into account various external conditions)
in the `help` command.
2016-04-18 00:52:32 +02:00
Martin Afanasjew
144d86f733 tests: test FormulaClassUnavailableError
Closes #101.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-17 21:16:01 +02:00
Martin Afanasjew
94a627d7aa install: handle FormulaClassUnavailableError
Don't search for alternatives if formula was found, but has issues, as
this will create confusing output, particularly for contributors working
on a formula file.
2016-04-17 21:16:01 +02:00
Martin Afanasjew
c3076f0b69 formulary: use FormulaClassUnavailableError
Present a more helpful error message if a formula file was loaded, but
the class(es) therein didn't match the expected formula class name.
2016-04-17 21:16:01 +02:00
Martin Afanasjew
1ded40a744 exceptions: add FormulaClassUnavailableError 2016-04-17 21:16:01 +02:00
Martin Afanasjew
feb1e75b61 manpages: add editing instructions to ERB template
Closes #102.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-17 20:43:27 +02:00
Martin Afanasjew
3680c4667f man: replace split header/footer with ERB template 2016-04-17 20:43:27 +02:00
Martin Afanasjew
b4b53e5067 manpages: remove no longer needed 'brew.1.md'
Changes to the man page are made in `header.1.md`, `footer.1.md`, or the
documentation comment block in the respective command file. Remove old
Markdown file to reduce confusion, now that it is no longer needed (and
not even used by `brew man`).
2016-04-17 20:43:27 +02:00
Martin Afanasjew
d8e427577d man: pipe markup to 'ronn' to avoid temporary file 2016-04-17 20:43:27 +02:00
Martin Afanasjew
291ff3cc42 man: refactor and fix code style
Split monolithic method into more manageable chunks and fix code style.
2016-04-17 20:43:27 +02:00
Martin Afanasjew
8e42077a8e list: exclude zsh completions from unbrewed
Since edf000e4cd30c3626ccc28c52ed32f2d84a200dd `zsh` completions are in
`share/zsh/site-functions/_brew`, making this path a part of Homebrew.
Hide it from `brew list --unbrewed` to reduce confusion/noise.
2016-04-17 00:13:17 +02:00
Josh Hagins
0fe6acea3a tests: ensure desc prints short name only if there are conflicts
Fixes #70.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-04-16 16:15:08 +02:00
Cory Donnelly
bad28dc546 audit.rb: Base desc length check on short name
Currently, brew audit --strict includes the name of the tap when calculating the
length of a formula's description. This makes it difficult to pass the audit for
formulas in taps with lengthy names. In #47033 @jawshooah called out head-only
or devel-only taps specifically, but this is an issue elsewhere. For example:

homebrew/versions/elasticsearch20: Distributed search & analytics engine (72)

This commit updates audit.rb to use formula.name rather than formula.full_name.

Closes #47033 -- Audit shouldn't include tap name in description length
2016-04-16 16:14:15 +02:00
Josh Hagins
abff8a0cc8 desc: print short name unless multiple formulae have the same name 2016-04-16 16:14:15 +02:00
Xu Cheng
a8be17df57 test-bot: update for new deps/uses options
Closes #92.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-16 21:47:47 +08:00
Xu Cheng
df79659045 update manpage for deps/uses 2016-04-16 21:47:47 +08:00
Xu Cheng
7ba9eabc14 uses/deps: default to skip optional/build deps.
Also add options to include optional/build deps and an option
to skip recommended deps.

Closes Homebrew/legacy-homebrew#50066.
2016-04-16 21:47:47 +08:00
Chayoung You
e0264302c7 doc: remove outdated documentation for completion (#99)
By the commit edf000e4cd30c3626ccc28c52ed32f2d84a200dd, bash and zsh
completion scripts have been moved to `etc/bash_completion.d/brew` and
`share/zsh/site-functions/_brew`, respectively. Now completion will be
done automatically without any trick.
2016-04-16 21:12:28 +08:00
Mike McQuaid
f6d5ae2253 analytics: add more documentation, Linuxbrew ID. (#98) 2016-04-16 11:39:57 +01:00
Dominyk Tiller
b70e4341fe style: use rubocop 0.39
(#85)
2016-04-14 14:44:23 +01:00
Andrew Janke
36b2af2e0f superenv: fix formula prefix path to consider revisions
Old logic doesn't include revision. This fixes that, and passes the
whole formula prefix path to avoid duplicating the path-construction
logic.

Closes #80.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-13 10:41:01 -04:00
Andrew Janke
a8ed06ba74 superenv: allow paths under self's keg
Fixes build error in Homebrew/homebrew-core#100.

Closes #63.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-13 02:20:17 -04:00
Mike McQuaid
4e8c6e633c Document disabling of opt-in Homebrew analytics. (#79) 2016-04-12 12:17:56 +01:00
Xu Cheng
548be81b34 tap: various improvements (#77)
* make `read_or_set_private_config` private
* add doc
* add test
2016-04-12 18:51:43 +08:00