10755 Commits

Author SHA1 Message Date
Martin Afanasjew
4a7fc07430 shims/ant: fix style inconsistencies 2016-08-08 16:00:12 +02:00
Martin Afanasjew
3d862ef5e2 cmd/vendor-install.sh: fix style inconsistencies 2016-08-08 16:00:12 +02:00
Martin Afanasjew
1e9328c6e1 cmd/update.sh: fix style inconsistencies 2016-08-08 16:00:12 +02:00
Martin Afanasjew
79c49b3638 brew.sh: fix style inconsistencies 2016-08-08 16:00:12 +02:00
Mike McQuaid
850db4ebf4 search: fix repositories with formulae and casks.
e.g. Caskroom/homebrew-cask.

Thanks to UniqMartin for the fix.

Fixes #655.
2016-08-08 10:55:12 +01:00
Mike McQuaid
9d8c4e6279 tap: allow Homebrew developers to tap broken taps. 2016-08-08 10:55:02 +01:00
Mike McQuaid
3847db6026 formula_installer: better handle missing conflict.
Doesn't feel like a good reason to abort installation for users if the
formula author has specified a conflict that doesn't exist. Instead,
behave more like the `TapFormulaUnavailableError` but print a message
telling people to report to the formula authors.

Closes https://github.com/Homebrew/homebrew-versions/issues/1327
2016-08-08 10:54:48 +01:00
Mike McQuaid
c9fabf57a5 test_integration_cmds: non-OS X skip cask/services 2016-08-08 10:52:59 +01:00
Mike McQuaid
b7b89b9406 test/.rubocop.yml: fix check category. 2016-08-08 10:52:43 +01:00
Mike McQuaid
e011589635 Revert "test-bot: don't run cmd taps generic tests."
This reverts commit 24f7e671317dfe22f1d8e10426db2e9074674bc9.
2016-08-08 10:52:34 +01:00
Mike McQuaid
24f7e67131 test-bot: don't run cmd taps generic tests. 2016-08-08 10:06:46 +01:00
Andrea Kao
26fb38a739 tests: add cmd/test integration test 2016-08-08 08:50:30 +01:00
Steven Peters
a67c6f6ca2 bump-formula-pr: format documentation for --help. 2016-08-08 08:42:40 +01:00
Dominyk Tiller
92acdb5540
FAQ: fix-up cache path 2016-08-08 00:09:56 +01:00
Dominyk Tiller
e48a3a2642
audit: enforce include method placement
Closes #648.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-08-08 00:05:32 +01:00
Dominyk Tiller
11a1c495f7
audit: enforce conflicts_with placement 2016-08-08 00:05:19 +01:00
Uladzislau Shablinski
b8ce1fe1b2 Update upgrade/outdated documentation (#650) 2016-08-06 22:08:35 +08:00
Vlad Shablinsky
072e5df4ed
Cache outdated_versions for Formula
Closes #584.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-08-06 21:25:57 +08:00
Vlad Shablinsky
9754dbada8
Update upgrade/outdated methods for head versions
Introduce `--fetch-HEAD` option. Without this option upgrade and
outdated never fetch latest upstream commit to detect if HEAD is
outdated -- tabs are used instead. However, if option is passed,
we fetch commit from upstream, which is more time consuming,
but we can be sure that version is up-to-date or outdated.
2016-08-06 21:25:56 +08:00
Vlad Shablinsky
04cb161ddb
test_formula: add outdated_versions tests 2016-08-06 21:25:56 +08:00
Vlad Shablinsky
001bef0604
formula: detect outdated HEAD in outdated_versions 2016-08-06 21:25:56 +08:00
Vlad Shablinsky
a59bdc4a2a
formula: don't return outdated head in installed_prefix 2016-08-06 21:25:56 +08:00
Vlad Shablinsky
1b88c2912b
formula: add new HEAD methods
* add `latest_head_version` to return latest HEAD version installed
* add `latest_head_prefix` to return Pathname with latest HEAD version
* add `head_version_outdated?` to check if HEAD version is up-to-date
2016-08-06 21:25:56 +08:00
Vlad Shablinsky
00f37d6778
Apply and add new download strategy tests 2016-08-06 21:25:56 +08:00
Vlad Shablinsky
5ddee3502e
download_strategy: use short hash for mercurial 2016-08-06 21:25:56 +08:00
Vlad Shablinsky
09d21ad258
download_strategy: allow to suppress output 2016-08-06 21:25:56 +08:00
Vlad Shablinsky
1693ddbdcb
Introduce GitHubGitDownloadStrategy 2016-08-06 21:25:56 +08:00
Vlad Shablinsky
1114219384
Add tests for Tab versions 2016-08-06 21:25:56 +08:00
Vlad Shablinsky
42bc623a27
tab: allow to store versions 2016-08-06 21:25:56 +08:00
Uladzislau Shablinski
63c563f970 Fix update commit for non-HEAD kegs with head spec (#644)
If we try to call `Formulary.from_keg(f, :head)` on the keg that
is not HEAD-keg itself, we don't need to update commit of
returned formula and should use just HEAD version with nil commit.

Same is true for `ARGV.resolved_formulae`
2016-08-06 16:22:12 +08:00
Andrea Kao
8ec59253df tests: fix code style issues (#587) 2016-08-06 07:04:59 +02:00
Martin Afanasjew
d59f0f77a7 tests: fix fluctuations in test coverage (#647)
This basically started once our integration tests caused the overall
test time to raise above 10 minutes, causing some coverage data to be
dropped because SimpleCov believed it to be stale.
2016-08-06 04:24:18 +02:00
Martin Afanasjew
65203bbd1e test-bot: avoid duplicate coverage reports
When running on Travis CI, both the Linux and macOS build will send a
coverage report, causing them to be merged by Coveralls. This results
in inferior coverage due to the early stage of the Linux-specific tests
and is probably not what we want. Make sure we only send a report for
macOS (assuming we stick with a single macOS build in `.travis.yml`).
2016-08-06 01:52:28 +02:00
Mike McQuaid
66d564d885 update-report: tweak Cask migration output.
No longer output every cask under the list of changed formulae but
instead create a dedicated, unprinted report section for casks and then
iterate through that instead.
2016-08-05 16:34:56 +01:00
Mike McQuaid
3f505fe642 update-report: print developer exception backtraces. 2016-08-05 16:34:56 +01:00
Mike McQuaid
a9ab066654 Revert "Partially reverts 4338f35b848ad61462fc4f73e1365e6c002201a2"
This reverts commit b33b1af073979c8a699ed9688dba37fb7e74f0b5.
2016-08-05 15:28:20 +01:00
Xu Cheng
b33b1af073
Partially reverts 4338f35b848ad61462fc4f73e1365e6c002201a2 2016-08-05 22:16:19 +08:00
Xu Cheng
a8566c9848 various: eliminate the usage of any? (#638)
`any?` is not the opposite of `empty?`. Besides the case that
`[false, nil].any?` will return false, `any?`(O(n)) has much worse
performance than `empty?`(O(1)).
2016-08-05 22:01:32 +08:00
Andrea Kao
38209aadbf tests: add cmd/migrate integration test 2016-08-04 11:44:39 +01:00
Anastasia Sulyagina
4338f35b84 tap: add cask methods. 2016-08-04 11:37:37 +01:00
Martin Afanasjew
b77a695b7a python: tweak script linking in virtualenv (#613)
* python: tweak script linking in virtualenv

Instead of making the formula author use a slightly awkward block like

  venv.link_scripts(bin) { venv.pip_install buildpath }

avoid exposing this implementation detail and offer the more familiar:

  venv.pip_install buildpath, :link_scripts => bin

* Add non-block form and use instead of recursion

* Update 'pip_install' documentation

* Remove obsolete 'link_scripts'

* Add test for 'pip_install' with linking scripts

Also drop no longer relevant (and broken) `link_scripts` test, that
served as a template for the new test.

* Restore compatibility with Ruby 1.8.7

* Replace option hash with 'pip_install_and_link'

* Avoid confusing 'Object#tap' and fix silly bug

* Avoid side effects in mock object parameter check

* Simplify argument check (no need for a block)
2016-08-02 13:37:15 -07:00
Mike McQuaid
a6033529cf Revert "tap: add cask methods."
This reverts commit 05daa0574732a7884bd158b2c3e14bd0709367da.
2016-08-02 14:11:40 +01:00
AnastasiaSulyagina
05daa05747 tap: add cask methods.
Closes #562.
2016-08-02 13:44:19 +01:00
Mike McQuaid
0302a6bc7c audit: add --new-formula option.
Rather than nudge people to run `--strict` and then ignore some of the
results sometimes (e.g. GitHub repository notability) instead add a
dedicated `--new-formula` option that implies this is a one-time
advisory check.
2016-08-02 12:44:41 +01:00
Mike McQuaid
ebe8b8d328 update-report: use --overwrite to migrate Casks.
`--force` isn't quite what we want here as it'll just allow keg-only
linkage whereas we want to ensure we overwrite anything the Cask
installed.
2016-08-02 11:48:11 +01:00
AnastasiaSulyagina
be5484da8c update-report: allow Casks migration to formulae.
Closes #588.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-08-02 11:45:47 +01:00
Mike McQuaid
2bd5e0e5ad update-report: tweak cask migration text. 2016-08-02 11:45:32 +01:00
Andrea Kao
762e56db72 tests: update cmd/analytics integration test 2016-08-02 11:00:42 +01:00
Dominyk Tiller
604f4b6a07
keg_relocate: refactor path.find change for performance
Closes #616.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-08-02 03:50:50 +01:00
Dominyk Tiller
196a6946e1
keg_relocate: work around file bug
There's an old bug in `file` which means it can't read certain files under a
non-C locale. This has been fixed upstream for some time, but Apple hasn't
picked that fix up & even on OS X El Capitan the `file` is ancient.

This is currently causing a lot of false positives in our bottle code around
relocating things like manpages translated into non-English languages, because
currently the test does:

```
pn = "/usr/local/Cellar/vim/7.4.2109/share/man/fr/man1/vim.1"
Utils.popen_read("/usr/bin/file", "--brief", pn).include?("text")
```
Which returns `false`. But it isn't returning `false` because the actual result
is false, but because `file` panics & fails, which for us equals a `false`. The
actual output when accessed is:
```
pn = "/usr/local/Cellar/vim/7.4.2109/share/man/fr/man1/vim.1"
Utils.popen_read("/usr/bin/file", "--brief", pn)
"ERROR: line 22: regexec error 17, (illegal byte sequence)\n"
```
Forcing this check to be done under a "C" locale eliminates this particular false
positive for strings we can't relocate & consequently things such as NLS may
prove to be more portable in some formulae than is currently the case.

Using `vim` again for the example:
```
pn = "/usr/local/Cellar/vim/7.4.2109/share/man/fr/man1/vim.1"
Utils.popen_read("/usr/bin/file", "--brief", pn).include?("text")
true
```
This reduces the flagged strings from `vim` from 4 issues to 2, the remaining
two with the `vim` executable itself which "remembers" the full path to perl,
python, ruby, etc during build & vomits that information out when requested
by the user. Both the manpages flagged before this change are no longer flagged
as unrelocatable.

This won't entirely resolve the NLS problem because some things hardcode in
a locale path, which will be stored in the executable, but at the very least it
should reduce the number of false positives & may enable relocation where that
locale path hasn't been burnt in.
2016-08-02 03:50:49 +01:00