Commit graph

208 commits

Author SHA1 Message Date
Roland Walker
136d7fd6c1 read RbConfig in doctor.rb
instead of depending on Homebrew-defined constant.  This
is simpler now that we assume Ruby 2.0
2014-12-19 10:30:14 -05:00
Roland Walker
d76794c3a2 make render_load_path understand homebrew-fork
tweak doctor's warnings/annotations on `$LOAD_PATH` elements
2014-12-18 11:08:34 -05:00
Roland Walker
b1c3a4f600 doctor: ignore internal HOMEBREW_VERSION constant
Instead extract it from the brew CLI, and consider
removing it from our doctor output entirely.
2014-12-18 11:08:34 -05:00
Roland Walker
58c2f16633 doctor: ignore internal HOMEBREW_CELLAR constant
Instead extract it from the brew CLI, and consider
removing it from our doctor output entirely.
2014-12-18 11:08:34 -05:00
Roland Walker
df8835ab73 doctor: ignore internal HOMEBREW_REPOSITORY const
...constant. Instead extract it from the brew CLI, and consider
removing it from our doctor output entirely.
2014-12-18 11:08:34 -05:00
Roland Walker
68f1c782a6 port PrettyListing class from Homebrew-fork
and simplify it considerably
2014-12-17 07:33:06 -05:00
Roland Walker
ae133faf2f Merge pull request #8152 from rolandwalker/ruby_2_0_transition
remove docs and code relevant to Ruby 1.8 compatibility
2014-12-16 21:18:10 -05:00
Roland Walker
52c322dbb9 rm Homebrew internal method in Cask::CLI::Update
fixes #8153
2014-12-16 09:26:39 -05:00
Roland Walker
6c41fe493b remove docs and code relevant to Ruby 1.8 compat 2014-12-16 08:50:33 -05:00
Roland Walker
568a8229c3 mark license :unknown with explicit todo comment 2014-12-09 07:48:45 -05:00
Roland Walker
00217148ef enable installer artifact in _stanza verb
Since `installer` is a type of artifact, it must be listed
explicitly, though this repetition indicates poor design.
2014-12-08 10:39:15 -05:00
Roland Walker
f800db0383 Add name stanza for proper name
Documentation is in a separate PR so that authors don't start
using this feature before release.
2014-12-04 20:08:55 -05:00
Claudia
03a8efe128 Make CLI::Alfred and Source::PathBase work with Ruby 1.8 2014-12-02 17:01:01 +01:00
Roland Walker
a335d3b06d unify and recast "Cask name" & "title" as "token"
* "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.
2014-12-01 11:00:23 -05:00
Fabio Niephaus
62cbb3d7a6 get 'syncfolder' from Preferences. resolves #7216 2014-11-22 23:10:04 +01:00
Roland Walker
88b2e92015 DSL: add stanza stage_only (new caskroom_only)
`caskroom_only` was never documented.  Its original purpose was
obsoleted in #4865, and its use has been recently been reduced to
two Casks.

This PR
* continues the rationalization of naming by changing `caskroom_only`
  to `stage_only`. "stage" is the verb for "make a copy under the
  caskroom directory"
* documents `stage_only`
* adds tests for `stage_only`
* validates the argument to `stage_only`
* gives sensible output in `brew cask info` for `stage_only` Casks
* enforces that `stage_only` cannot coexist with any activatable
  artifacts

`caskroom_only` is still supported for backward compatibility,
but should be removed before 0.50.0.
2014-11-18 07:13:15 -05:00
Roland Walker
fbc9e35556 DSL remove support for after_install and friends
in favor of new-style `preflight`/`postflight` forms
2014-11-14 11:06:01 -05:00
Roland Walker
00747614f7 use new header form in create template 2014-11-13 11:45:06 -05:00
Roland Walker
09ecd1eb79 DSL: remove support install stanza
now replaced by `pkg`
2014-11-11 11:23:51 -05:00
Roland Walker
b837d6c552 remove support for link artifact
* `app`, `suite`, and `artifact no longer implemented as
  synonyms for `link`
* backward-compatible code/comments removed
* creates class `Cask::Artifact::Suite`
* updates `brew cask info` to show specific artifact type
* fixes stray "Generic artifact" messages
2014-10-29 10:53:49 -04:00
Roland Walker
839ccb98d4 recast _checklinks verb as _checkurl
remove stray doc item missed in #6966
2014-10-28 12:12:10 -04:00
Roland Walker
3f5551788c Merge pull request #6966 from rolandwalker/checklinks_internal
recast `checklinks` as internal command `_checklinks`
2014-10-25 06:44:36 -04:00
Roland Walker
431d00ebbb Merge pull request #6967 from rolandwalker/dump_tweak
improve error message in `brew cask _dump`
2014-10-24 21:40:48 -04:00
Roland Walker
66f2b722bb Merge pull request #6823 from ffleming/downgrade-error
Downgrade CaskAlreadyInstalledError to a warning
2014-10-24 11:40:23 -04:00
Roland Walker
6b69564066 improve error message in brew cask _dump 2014-10-24 09:51:23 -04:00
Roland Walker
2370400207 chg checklinks to internal command _checklinks
* `checklinks` is a very simple implementation useful only for development purposes
* it has no test coverage, only one line of documentation
* users regularly experiment with it and break it, especially
 `brew cask checklinks` with no arguments, which tests all Tapped Casks
2014-10-24 09:49:35 -04:00
Roland Walker
03350791c6 be more explicit about which errors are rescued 2014-10-23 11:57:47 -04:00
Roland Walker
cd63241558 use "staged" instead of "installed" for Caskroom
refs: #6783
2014-10-21 07:13:04 -04:00
Forrest Fleming
f3611f4383 Downgrade CaskAlreadyInstalledError to a warning
Automatic installs - like thoughtbot's laptop script - fail when we
use Homebrew's onoe method.  Using opoo (to warn) will let the
scripts complete successfully when they try to install packages that
have already been installed.

Test for downgrading AlreadyInstalledError to warning
2014-10-19 15:35:09 -07:00
Roland Walker
967aa22793 recast method destination_path as staged_path
* part of DSL 1.0 review
* `destination_path` was always a bit vague (it refers to
  Cask-specific, version-specific location under
  `/opt/homebrew-cask/Caskroom`)
* here renamed `staged_path` to match upcoming command verb
  `brew cask stage`
* rename also intended to reduce confusion when we implement
  copying as a configurable alternative to symlinking
* transitional `destination_path` methods to remain while
  Casks are converted (this was documented as a part of the
  DSL, and used by 39 Casks in main repo)
* unrelated variables containing "stage" recast for clarity
2014-10-18 12:23:36 -04:00
Roland Walker
4ec22f2b7a require Cask argument to brew cask _dump 2014-10-14 04:36:20 -04:00
Roland Walker
707db75505 standardize Cask (capitalized) when used as noun
* 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
2014-10-08 10:39:51 -04:00
Roland Walker
4f671ad177 Merge pull request #6491 from claui/issue-5997
User-friendly error messages for invalid options/arguments; fixes #5997
2014-10-06 11:15:59 -04:00
Claudia
0fe558b927 User-friendly error messages for invalid options/arguments; fixes #5997
- Show a more user-friendly error message when dealing with an option whose (mandatory) argument is missing.

- Likewise, we show a more user-friendly error message when a given option is ambiguous. Examples:
    - Given `-f`, the parser successfully expands to `--fontdir`.

    - Given `-c`, we fail to expand because the parser can’t tell if the user means `--caskroom` or rather `--colorpickerdir`. This exception now results in a nicer error message.

- Some commands now result in a consistent error message when a required cask name is missing.
This affects all stable commands which require one or more cask names as arguments, i. e. `cat`, `create`, `edit`, `fetch`, `info`, `install`, `uninstall`, and `zap`.

- Up to now, the commands `cat`, `create`, `edit`, and `info` used to treat any unknown option as a cask name. This commit changes that behaviour to make it consistent to the rest of the commands (like `fetch`, `install`, `uninstall`, and `zap`), who have silently discarded any unknown option in the past, and continue to do so.
2014-10-05 18:32:33 +02:00
Roland Walker
f86ea4c7a4 show staging directory (caskroom) in doctor
refs #6471
2014-10-04 08:24:21 -04:00
Roland Walker
f1604e4efb docs and create template for new license stanza
some :closed licenses in the code are left undocumented for
now, and should not be used.
2014-10-01 11:18:13 -04:00
Roland Walker
0e7be245be Return Cask::SystemCommand::Result object
from Cask::SystemCommand.run

* stderr and stdout are now separated, though both are available
* :print_stderr is made the default, closer to previous behavior
* exit status can be read from the result object
* plist parsing is more naturally handled in the result object.
  The :plist argument to the run method was removed.
* whitespace
2014-09-27 08:59:08 -04:00
Roland Walker
49e6e6eb10 refactor :stderr => :silence
replace with :print_stderr => false

The double test on options[:print_stderr] in system_command.rb
is intentional, and temporary.
2014-09-25 09:23:27 -04:00
Roland Walker
d156cbfcb2 add --force option for brew cask uninstall
also update some related docs for verbs `install` and `uninstall`
2014-09-16 10:59:44 -04:00
Roland Walker
5ae6e2f773 doc new app stanza and update tests to use it
Replacing `link` for almost all cases.

The `link` stanza can still appear in error messages, because
under the hood, `app` is still implemented as a pure synonym
for the `link` artifact.  That will change automatically when
we factor into separate artifacts.
2014-09-13 13:03:46 -04:00
Roland Walker
ce64b38723 Merge pull request #6155 from rolandwalker/add_zap_stanza
functionality and docs for zap stanza and verb
2014-09-13 12:55:57 -04:00
Roland Walker
0f664ca78a Fix brew cask alfred for Yosemite/Alfred 2.4
Closes #5820
References: #6059
2014-09-13 12:34:12 -04:00
Roland Walker
00921dd513 functionality and docs for zap stanza
* `zap` was previously supported as a noop for forward-compatibility
* Also adds restrictions against relative paths in `uninstall :files`
* Also documents safety conventions for `uninstall :files`
2014-09-13 10:21:17 -04:00
Roland Walker
31b778f702 Merge pull request #5923 from rolandwalker/internet_plugin_artifact
add support for internet_plugin artifact
2014-08-26 15:36:33 -04:00
Roland Walker
1b05d18a3b add support for internet_plugin artifact
closes #5909
2014-08-26 11:22:25 -04:00
Federico Bond
b6cc94a8a2 Show correct GitHub file for casks with similar names
Fixes #5915
2014-08-26 11:21:21 -03:00
Federico Bond
4fe1bd76d4 Add support for long format in list command 2014-08-20 18:07:39 -03:00
rochefort
5d61bb42a5 Implement list -1 2014-08-11 21:24:17 +09:00
Roland Walker
dffed9999a add internal command _stanza
to extract the compiled/interpolated values for a given stanza.
2014-06-21 16:23:53 -04:00
Roland Walker
ddb9322882 Merge pull request #5011 from rolandwalker/internal_command_dump
create "internal use" command verbs: _dump, _help
2014-06-21 10:46:14 -04:00