Commit Graph

22 Commits

Author SHA1 Message Date
Roland Walker 744ab4aa39 add some detail when rescuing download errors 2014-06-11 16:28:46 -04:00
Roland Walker f71ed25ee0 rescue download failure; don't show traceback
instead, give a more specific error message.  Closes #4556.
2014-05-26 15:56:35 -04:00
Paul Hinze 9e2641b851 Merge pull request #2427 from rolandwalker/checksum_error_help
Give the user help on checksum errors
2014-05-04 18:27:20 -05:00
Pedro Silva e58f3f89ca add new CurlPostDownloadStrategy
- lib/cask/url.rb: initialize(): add new `:data` attribute to hold post parameters
- lib/cask/download.rb: perform(): dispatch to new class based on `:using => :post`
- lib/cask/download_strategy.rb: Cask::CurlPostDownloadStrategy:
  			extend curl_args with x-www-form-urlencoded data
- doc/CASK_LANGUAGE_REFERENCE.md: HTTP URLs: document new strategy
- test/cask/test_download_strategy.rb: Cask::CurlPostDownloadStrategy: test new strategy
2014-03-07 20:51:35 +01:00
Võ Anh Duy 33a97a1a5f CLI - Fetch
Add `fetch` command to cli like suggestion at the end of #2528
2014-02-26 00:44:22 +07:00
Roland Walker 297cd6382a Merge pull request #3058 from rolandwalker/exception_objects
raise exception objects
2014-02-25 12:30:30 -05:00
Roland Walker 4e920d4f19 Give the user help on checksum errors 2014-02-22 20:03:12 -05:00
Roland Walker 3623d13e85 `sha256 :no_check` as synonym for `no_checksum` 2014-02-22 19:47:43 -05:00
Roland Walker 113518e8cb make checksum-missing message match Cask semantics
for copy/paste
2014-02-19 18:48:21 -05:00
Roland Walker 2e2364e5e9 BUGFIX: Homebrew chg, 3 args for checksum mismatch
Homebrew changed underneath us, requiring 3 arguments to
`ChecksumMismatchError.new`.  This is causing total failure
on Travis, and probably a number of issues will be filed
until we merge and cut a bugfix release.
2014-02-19 11:03:07 -05:00
Roland Walker 82452b3181 Merge pull request #2822 from rolandwalker/svn_download_strategy
add Cask::SubversionDownloadStrategy
2014-02-14 13:27:13 -05:00
Roland Walker d0970948ce Merge pull request #2759 from rolandwalker/cleanup_cmd
add command `brew cask cleanup`
2014-02-11 06:25:21 -05:00
Lucas Garron 3c00e22dc1 Report SHA-256 hash (instead of SHA-1) if checksum is missing.
I accidentally missed this in #2719.
2014-02-09 04:23:00 -08:00
Roland Walker d6c8a6917d add command `brew cask cleanup`
plus new option --outdated
2014-02-08 14:40:53 -05:00
Roland Walker b55f1804f0 add Cask::SubversionDownloadStrategy
abstract out module `Cask::DownloadStrategy`, add some commentary
2014-02-08 13:30:21 -05:00
Roland Walker 9df14ceb4f rename class to `Cask::CurlDownloadStrategy`
To make room to use some of the other download strategies
classes provided by Homebrew, be explicit that we are currently
using only the curl class.
2014-02-05 10:30:58 -05:00
Roland Walker 216444849e Add copious debugging with --debug
- add new file "cask/utils.rb" analogous to "utils.rb" in Homebrew
- define odebug and odumpcask, analogs of ohai and friends, but
  which only give output when --debug is in effect
- move the debug setting from an instance variable in Cask::CLI
  to a method Cask.debug, defined in "lib/cask/options.rb", which
  was added in #2276. (Perhaps options.rb should be merged back
  into Cask::CLI).
- sprinkle odebug statements liberally throughout the codebase
- update tests
2014-01-28 10:15:43 -05:00
Paul Hinze f6f507b289 some refactoring around the new download strategy
- move the interface from top-level methods to hash arguments of URL to
   keep the cask DSL as skinny as possible
 - promote the Cask::Headers object up to a Cask::URL object that
   encapsulates all infornation about the URL
 - pull all knowledge about curl arguments into the DownloadStrategy,
   leaving URL to act as a value object to be queried for details
 - test at the DownloadStrategy level; setting up expected curl args
   and example casks
2013-12-15 13:18:47 -06:00
Jonah Ruiz 06be4b0d8e Add DownloadStrategy and Cask::Headers for custom :headers support
accepts a :user_agent argument and/or multiple :cookies
  headers :user_agent => 'Netscape/1.0', :cookies => { :cookey => "r00t" }

Also adds a standalone :fake_user_agent for a default UserAgent (Chrome)
  fake_user_agent
References #1175, #958
2013-12-12 21:29:12 -04:00
phinze def2ec4545 fix download to track with upstream api change 2013-09-24 12:54:32 -05:00
billwanjohi 47ed885fc0 require software_spec in download.rb
another lib looking for formula_support
2013-09-14 16:52:39 -05:00
Robert Curth ba52f6377e [#583] Auditing of cask download and checksums
closes #688
2013-07-07 09:06:02 -05:00