Commit Graph

7 Commits

Author SHA1 Message Date
Roland Walker 9797d2770f doc: improve Cask-source-resolution debug message 2014-06-03 10:39:18 -04:00
Roland Walker f24b4ba05a show resolved Cask source file or URI w/ --debug
references #4641
2014-06-03 10:38:49 -04:00
Roland Walker f8c9567a66 Don't prefer Cask files in the cwd
Fixes #4641.  Cask files in the cwd are still permitted, but
at the very lowest priority, below Tapped Cask names.
2014-06-03 10:33:19 -04: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
Roland Walker b88bf787e0 handle fully-qualified cask names, fixes #2235
form "<user>/<repo>/<cask>" may be used on cmdline, matching homebrew
- refactor Cask::Source::Tap into Cask::Source::Tapped, removing
  code, only handling unqualified cask names here now (ie no slash)
- create Cask::Source::TappedQualified, handling "<user>-<repo>/<cask>"
  form as before, and new form "<user>/<repo>/<cask>", for the case that
  the relevant tap already exists
- create Cask::Source::UntappedQualified, handling both command-line
  forms as above, but implicitly creating adding a new tap if it
  does not already exist
- add module Cask::QualifiedCaskName for utility functions on qualified
  Cask names
2014-01-04 07:14:35 -05:00
phinze 10db2d5d3c support non-ruby-backed casks
- brew cask list now displays casks without backing ruby files
- casks without a source are displayed as "caskname (!)"
- these casks can be uninstalled, with the caveat that it only removes
  their files from the caskroom (doesn't run pkg uninstall or anything,
  since there's no ruby file to define what to do)
2013-12-05 20:10:19 -06:00
phinze ca0dbf84a6 pull cask loading out into classes
- introduce Cask::Source to encapsulate different types of loading
   behind a consistent interface
 - mostly this is method-level reorg, kept refactoring of the internals
   of these methods to a minimum for this pass
 - this is preparatory cleanup for adding the ability to represent a
   cask without a backing ruby file
2013-11-16 13:40:51 -06:00