Shaun Jackman
ce85e3b3b5
Remove with_system_path
...
The method with_system_path is no longer needed,
since environment filtering uses a default PATH.
2017-12-12 09:27:06 -08:00
Markus Reiter
9bee9ca575
Use “squiggly” heredocs.
2017-10-18 14:39:09 +02:00
Markus Reiter
175ca909ee
Clean up code style and remove .rubocop_todo.yml
.
2017-10-08 16:10:37 +02:00
Markus Reiter
1f66c9c9e0
Let curl_download
handle HTTP 416 error.
2017-09-10 07:23:18 +02:00
Camden Narzt
c53af2952e
Fix curl --user flag being broken in dc5a2c17
2017-08-21 19:22:16 -06:00
Markus Reiter
ae4bafdb36
Simplify CurlDownloadStrategy.
2017-08-08 18:10:13 +02:00
ilovezfs
986887b413
Revert "Refactor SVN and cURL download strategies."
2017-08-07 14:31:56 -07:00
Markus Reiter
dc5a2c1764
Simplify CurlDownloadStrategy.
2017-08-07 21:31:17 +02:00
Markus Reiter
3b4ee58c49
Refactor using Forwardable
and DelegateClass
.
2017-06-28 09:25:31 +02:00
Mike McQuaid
ed9942fbd1
Merge pull request #2769 from MikeMcQuaid/rubocop-no-perl-backrefs
...
rubocop: don’t allow Perl regex backrefs.
2017-06-12 16:47:28 +01:00
Mike McQuaid
021cef4b2b
Autocorrect Rubocop Style/SpecialGlobalVars.
2017-06-12 09:11:42 +01:00
Mike McQuaid
7a0aff1080
Autocorrect Rubocop Style/PerlBackrefs.
2017-06-10 20:23:20 +03:00
Markus Reiter
2d6ae61314
Re-revert "Fix operator spacing."
2017-06-02 19:22:05 +02:00
ilovezfs
197392b56d
Revert "Fix operator spacing."
2017-06-01 04:06:40 -07:00
Markus Reiter
d34ba7395b
Fix operator spacing.
2017-05-31 19:53:41 +02:00
Mike McQuaid
8205e61e64
More environment filtering tweaks
...
- only document HOMEBREW_* variables in the manpage (although still
read from all the original environment variables).
- resort manpage environment variables in alphabetical order
- check the original path for trailing slashes
2017-05-13 11:42:01 +01:00
John Hawkinson
72ca28fe56
downloads_strategy: docstring typo Gtthub -> Github
2017-03-06 11:05:49 -05:00
Masayuki Morita
12b9cb7f4c
Fix rubocop style warning of download_strategy
2017-01-08 18:29:20 +09:00
Masayuki Morita
560d5bdd71
Validate a token when initializing GitHubPrivateRepositoryDownloadStrategy
2017-01-08 18:06:57 +09:00
Masayuki Morita
335be35acf
Generalize GitHubReleaseDownloadStrategy in order to support archive URL
2017-01-08 16:44:54 +09:00
Masayuki Morita
a4330f458a
Use util/github insted of open-uri in GitHubReleaseDownloadStrategy
2017-01-03 15:12:53 +09:00
Masayuki Morita
248beb9bf6
Move error messages in GitHubReleaseDownloadStrategy to raise argument
2017-01-03 14:36:08 +09:00
Masayuki Morita
b9cc52db45
New feature: GitHubReleaseDownloadStrategy
...
GitHubReleaseDownloadStrategy downloads tarballs from GitHub Release assets.
To use it, add ":using => GitHubReleaseDownloadStrategy" to the URL section
of your formula. This download strategy uses GitHub access tokens (in the
environment variables GITHUB_TOKEN) to sign the request.
This strategy is suitable for corporate use just like S3DownloadStrategy,
because it lets you use a private GttHub repository for internal distribution.
It works with public one, but in that case simply use CurlDownloadStrategy.
2017-01-02 15:56:55 +09:00
Uladzislau Shablinski
7b24d1d2d1
download_strategy: keep commit short if possible
2016-12-03 04:42:04 +03:00
William Woodruff
d07b9ed7f2
Replace Utils::JSON with corelib JSON calls.
2016-11-20 20:06:25 -05:00
Mandar Gokhale
0e15ffff62
Correct a few typos
...
...and update man pages where applicable
2016-11-03 12:09:44 +00:00
Mike McQuaid
b1a16deb19
Use BSD tar's libarchive LZMA support if available
...
Avoid using an unnecessary `xz` dependency when it's not needed.
2016-10-15 13:10:37 +01:00
Zhiming Wang
f28e5106c2
download_strategy: silence unzip and unrar
...
We silenced tar in 5e3a26b. It makes sense to make unzip and unrar
output comparably succinct.
2016-09-27 18:26:04 -04:00
Zhiming Wang
5e3a26bfe0
download_strategy: never verbosely untar
...
The verbose mode of tar is too pointlessly verbose.
2016-09-24 19:53:43 -04:00
Markus Reiter
6c6a4c9fa7
RuboCop: Style/AccessorMethodName
2016-09-24 19:28:26 +02:00
Markus Reiter
58e36c7319
Fix Style/GuardClause.
2016-09-24 12:24:35 +02:00
Markus Reiter
e851c9bf6c
Style/Alias: Prefer alias
.
2016-09-23 18:19:53 +02:00
Markus Reiter
0b473ebba9
Fix Style/PredicateName.
2016-09-23 15:30:06 +02:00
Markus Reiter
42efb44e7d
Fix Lint/EndAlignment.
2016-09-23 15:30:06 +02:00
Markus Reiter
52ff988530
Fix RuboCop CaseEquality.
2016-09-23 15:30:06 +02:00
Mike McQuaid
1bdbb0f462
Improve rescue nesting.
2016-09-17 17:01:04 +01:00
Mike McQuaid
3982950e61
rubocop --auto-correct all hash-rocket usage.
2016-09-17 16:14:13 +01:00
Mike McQuaid
6693915399
rubocop --auto-correct all remaining files.
...
But remove some manual `.freeze`s on constants that shouldn't be
constants.
2016-09-17 16:14:13 +01:00
Vlad Shablinsky
b7a17ba345
download_strategy: check if commit nil
2016-08-19 12:32:20 +02: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
2e916110e4
Use HeadVersion for install/reinstall
2016-07-16 20:39:13 +08:00
Xu Cheng
28861ac92d
CurlDownloadStrategy#_fetch: fix unintended variable modification
2016-07-14 13:14:49 +08:00
Xu Cheng
ed9bb449d1
CurlDownloadStrategy#_fetch: do not alter variable @url
( #504 )
...
In case of download failure and retry, altering `@url` can cause side
effect like repeatedly applying `HOMEBREW_ARTIFACT_DOMAIN`.
2016-07-13 20:56:12 +08:00
jainish shah
48a1e1b47f
Add HOMEBREW_ARTIFACT_DOMAIN option.
...
If set, this environment variable instructs Homebrew to use the given URL as a
download mirror (e.g. an Artifactory instance) for bottles and binaries.
Closes #387 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-07-13 11:45:15 +01:00
Martin Afanasjew
32f7e738ec
download_strategy: ensure fixed commit hash length
...
The length of the commit hash returned for `--short` can vary depending
on user configuration. Make sure this works independently of what might
have been configured via a user's `.gitconfig`. This also fixes the
failing `GitDownloadStrategyTests#test_last_commit` test for such users.
2016-07-07 02:14:31 +02:00
Vlad Shablinsky
45b3bfd11a
download_strategy: use short hash for git last_commit
...
Closes #460 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-06 16:19:49 +08:00
Vlad Shablinsky
2f5f352baa
VCSDownloadStrategy: add last_commit method
...
Implement:
* VCSDownloadStrategy#last_commit
Use last modified file timestamp
* SubversionDownloadStrategy#last_commit
Use `svn info --show-item revision`
* GitDownloadStrategy#last_commit
Use `git rev-parse HEAD`
* MercurialDownloadStrategy#last_commit
Use `hg parent --template {node}`
* BazaarDownloadStrategy#last_commit
Use `bazaar revno`
* FossilDownloadStrategy#last_commit
Use `fossil info tip`
2016-07-06 16:19:49 +08:00
Camden Narzt
29713e61eb
download_strategy: fix detect_from_symbol method ( #446 )
...
strategy is an undefined variable
2016-07-04 01:58:44 -04:00