The `Hbc.outdated` boolean was in the way of my implementation of an
`outdated` scope for `brew cask outdated`, so I took the opportunity to:
* rename the flag internally to `cleanup_outdated`
* move the cleanup tests over to rspec and rework them to test in a
stubbed cleanroom environment
* refactor the implementation of cleanup to make it a bit more
testable - most importantly: inject the cache location and outdated
config dependencies instead of looking them up from constants
Note that there's no change to the user-facing interface, it's still
```
brew cask cleanup --outdated
```
Hbc is the namespace, Hbc::Cask is the object representing a Cask
One step on the path to reducing the surface area of the God-object
we've grown over the years. :)
and corresponding testing_env.rb.
* recast HOMEBREW_BREW_FILE as Hbc.homebrew_executable,
defined in Hbc::Locations
* recast HOMEBREW_REPOSITORY as Hbc.homebrew_repository
* recast HOMEBREW_PREFIX as Hbc.homebrew_prefix
* remove HOMEBREW_LIBRARY
* recast existing Hbc.tapspath as Hbc.homebrew_tapspath
to match new methods
fixes#8705
* convert existing Cask:: namespace to Hbc::
* move Homebrew-fork code under Hbc::
* move freestanding classes such as Tty and TopologicalHash under Hbc::
* recast HOMEBREW_CASK_ constants as HBC_
* modify our Homebrew Formula for backward compatibility
* devscripts and dev docs
This behavior was traditionally present, and is now recovered
by removing the audit test added in #4743. The doc is clarified
but did not require major change.
closes: #6356
refs: #8179
* "Canonical App Name" becomes "Simplified App Name"
* devscript `cask_namer` renamed to `generate_cask_token`
* doc file `CASK_NAMING_REFERENCE.md` renamed to `cask_token_reference.md`
* DSL uses `"#{token}"` for interpolation instead of `"#{title}"`
* documentation text
* backend code (variables, method, class names)
* error message text
* tests
* code comments
* Cask comments
* emphasize `tags :name`
* doc: use "vendor" consistently instead of "developer"
* doc: many man page argument descriptions were incorrect
* incidental clarifications
Many backend variables similar to `cask_name` or `cask` have
been standardized to `cask_token`, `token`, etc, resolving a long-
standing ambiguity in which variables named `cask` might contain
a Cask instance or a string token.
In many places the docs could be shortened from "Cask name" to
simply "token", which is desirable because we use the term "Cask"
in too many contexts.
* was already done, but inconsistently
* this style follows homebrew Formula
* covers user-facing messages, test titles, comments
* some related minor orthography is included, such
as the consistent spelling of our project name as
"homebrew-cask"
* grammar nits
Just getting started of course, but this piggy backs on Homebrew's
testing strategy to give us a platform for a fully featured test suite.
Neato!
And the tests provide value right away, as I added some better error
handling to `Cask.load`.
Big things ahead. Just you wait.