446 Commits

Author SHA1 Message Date
Mike McQuaid
c101a82c5b
Revert "Fix SVN downloads of versioned formula by munging directory names" 2018-06-26 07:10:36 +01:00
Andrew Janke
b72c4e3248 Fix SVN downloads of versioned formula by munging directory names 2018-06-25 03:21:36 -04:00
Mike McQuaid
0bb3d63c56 download_strategy: fix bzr --HEAD downloads.
`bzr` needs `BZR_HOME` set to something that's writable in the sandbox
to be able to write log files.
2018-05-31 19:43:01 +01:00
Ray Hamel
1ee40e831a
Don't splat 2nd arg to ErrorDuringExecution::new 2018-04-17 19:09:54 -04:00
Mike McQuaid
af9ddfe899
Merge pull request #4035 from MikeMcQuaid/ruby-warnings
Fix HOMEBREW_RUBY_WARNINGS="-w"
2018-04-08 22:51:25 +01:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Ryan Greenberg
fe8939ddd0 brew: Add ScpDownloadStrategy 2018-04-05 18:57:34 -07:00
Mike McQuaid
46e6b33d1b
Merge pull request #3967 from amancevice/s3-scheme
DownloadStrategyDetector recognizes s3 URL scheme
2018-03-25 10:01:31 +01:00
Alexander Mancevice
a096284d03 DownloadStrategyDetector recognizes s3 URL scheme
DownloadStrategyDetector now detects URLs with the s3:// prefix, e.g.:
  s3://my-bucket/path/to/key/tarball.tar.gz
2018-03-24 17:34:51 -04:00
Ethan Edwards
06f7d7d696 Allow bottles to use any DownloadStrategy 2018-03-24 10:53:49 +00:00
Alexander Mancevice
9b457ec51e Upgraded use of AWS Ruby SDK for S3
When S3DownloadStrategy is detected in DownloadStrategyDetector an attempt
is made to install & require the aws-sdk-s3 gem.

The AWS S3 SDK is used to sign the URL and handed off to curl_download.
2018-03-22 11:22:07 -04:00
Mike McQuaid
83cca40fc9 RuboCop 0.53.0 manual fixes. 2018-03-08 14:10:02 +00:00
Kevin Abel
ca3fccaf2b
Make ext use bounded iterator 2018-02-12 14:22:10 -06:00
Kevin Abel
601af55b43
Add root dirname as a escape value too 2018-02-02 18:15:05 -06:00
Kevin Abel
0254605cd5
Handle reaching the top of a URL which searching for file ext
Should never reach this as most URL's will have a domain name that will
be caught as an extname.
2018-01-13 17:06:21 -06:00
Kevin Abel
dca8dc5bf5
Fix audit 2018-01-09 20:11:52 -06:00
Kevin Abel
06f2b50ee4
Fix cached download file extension for certain URL
PHP URLs have the downloadable file in the middle of the pathname. If no
extension is detected, continue up the pathname.
2018-01-09 19:56:54 -06:00
Steven Peters
913ff483f0 Use hgpath instead of "hg" to fix --HEAD hg builds
Fixes #3628.
With environment filtering, hg was no longer in the path,
so make sure to provide the path when calling hg commands.
last_commit was the source of the problem in #3628
but I fixed source_modified_time as well.
I didn't see any others with this problem.
2018-01-08 00:24:02 -08:00
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