global replace of:
'phinze/homebrew-cask' -> 'caskroom/homebrew-cask'
'phinze/cask' -> 'caskroom/cask'
'phinze/homebrew-testcasks' -> 'caskroom/homebrew-testcasks'
and various other specific places that needed updates
<3 the homebrew-cask community!
When user run `brew cask` it will list all commands out.
There is a blank help command call issues_url which caused by the newly
introduced constant from #2971
- 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
= New Concept: Cask::Artifact
An Artifact is a file in an extacted container for which homebrew-cask
should take some sort of action on install/uninstall.
== Current artifacts:
- App: link/unlink to ~/Applications
- Pkg: install/uninstall (with sudo)
- Prefpane: link/unlink to ~/Library/PreferencePanes
= New Feature: Preference Pane Handling
Specifying `prefpane 'MyApp.prefPane'` in a Cask causes it to be linked
on install to the correct location for it to show up in System
Preferences.
refs #69
= Removed Commands: linkapps/unlinkapps
These were old and mostly unused and don't really make much sense when
linking/unlinking happens automatically in the install process.
= Changed Behavior: stricter relative pathname requirement
With this refactor, we remove the fuzzy searching for a file in an
extracted container when that file was referenced from `link`
or `install`. There may be some casks that need to be updated due to
this change.
`Cask::Installer` was already much too complex, so I took this
opportunity to throw a `Cask::Container` abstraction around the
extraction part of the package install step.
It goes like this: a Cask's URL points to a Container of some sort. The
containers we currently support are: dmg, zip, tar, and (new) naked.
Naked refers to a raw file that just needs to be copied in place. This
currently just means a pkg file, but in the future it may expand.
A Container knows how to do two things: identify a path as being its
type (`Container.me?`) and extracting the contents of its container to
the proper destination for a Cask (`Container#extract`).
The first Cask we have that supports the naked pkg type is
`heroku-toolbelt`. (Thanks to @sheerun for the Cask definition.)
Other miscellania batched in with this refactor:
- switched to an explicit require strategy rather than globbing
- `Cask::Installer` is instantiated now to match its interface with
other similar collaorators
- simplified zip and tar identification to shorter strings rather than
exact matches of full `file -Izb` output
- `Cask::SystemCommand` gets explicit output redirection options
- many rogue backticks replaced to properly use `SystemCommand`
- fixed misnamed test file `link_checker_spec.rb`
- remove some extraneous `after` clauses in tests; leaning more on
`test/support/cleanup.rb` to uninstall for us
- pkg uninstall `:files` gets a `-rf` to support removing dirs
refs #839 and #1043
Install casks into HOMEBREW_PREFIX/"Caskroom" instead of the Cellar.
This prevents us from colliding with normal Homebrew Formulae.
NOTE: this will be a breaking change, with the following effects:
- all installed casks will no longer be reported as installed
- orphans all existing casks in the Cellar
- no automated facility for cleanup or migration of existing casks
refs #38, where we can discuss the implications of this before cutting a
new release
Options can be passed on the command-line and/or using
the HOMEBREW_CASK_OPTS environment variable (which has
lowest priority). There is a single --appdir=PATH option
right now, but this commit enables future awesomeness!
Other minor changes:
* `brew cask help` now returns the same thing as `brew cask`
instead of saying there was “no such command as help”.
* The HEREDOC block now uses Homebrew's #undent instead of the
customed-rolled #gsub version. Cleaner and more flexible.
* `Cask.set_appdir` has been renamed to `Cask.appdir=`. This
is more Rubyish, and of little consequence (the only place
it was previously used was in the tests).