mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 06:16:47 -06:00
* "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.
15 lines
498 B
Ruby
15 lines
498 B
Ruby
class Cask::CLI::Cat < Cask::CLI::Base
|
|
def self.run(*args)
|
|
cask_tokens = cask_tokens_from(args)
|
|
raise CaskUnspecifiedError if cask_tokens.empty?
|
|
# only respects the first argument
|
|
cask_token = cask_tokens.first.sub(/\.rb$/i, '')
|
|
cask_path = Cask.path(cask_token)
|
|
raise CaskUnavailableError, cask_token.to_s unless cask_path.exist?
|
|
puts File.open(cask_path) { |f| f.read }
|
|
end
|
|
|
|
def self.help
|
|
"dump raw source of the given Cask to the standard output"
|
|
end
|
|
end
|