Commit graph

109 commits

Author SHA1 Message Date
Paul Hinze
5bbba24bf9 cli: [refactor] rename outdated option internally
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
```
2015-02-07 18:06:51 -06:00
Vítor Galvão
078f0b0300 removed alfred support 2015-01-13 17:49:32 +00:00
Vítor Galvão
529bd801e4 Removed support for widgets
Closes #2206.
2015-01-08 19:51:15 +00:00
Roland Walker
202d6019f8 Move all code under an Hbc:: namespace
* 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
2015-01-02 07:27:03 -05:00
Roland Walker
cc84f6ecd5 don't monkeypatch MacOS#release
* complete transition from MacOS#version to MacOS#release
  throughout backend code
* recast related constants and comments as "release" instead
  of "version", and "point release" instead of "full version"
2014-12-27 09:19:38 -05:00
Roland Walker
05d6afa2ac remove homebrew-fork Pathname#/ monkeypatch
in favor of ordinary Pathname#join.  This was already the rule
for our codebase except for some areas of the test suite.
2014-12-26 11:06:34 -05:00
Roland Walker
140613cbb5 update license comment in brew cask create 2014-12-20 10:35:28 -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
568a8229c3 mark license :unknown with explicit todo comment 2014-12-09 07:48:45 -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
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
5de05c72b2 avoid gitx in partial-match search tests
Some gitx Casks are being renamed.  Refs: #7436
2014-11-19 11:31:28 -05:00
Roland Walker
2692b5cd8d remove old-style header line from test Casks
This takes the form of a horrible hack: DSL version numbers may
end with "test", *eg* ":v1test". Such Casks are mapped to class
`TestCask` instead of class `Cask`.

The intention is that all of this logic will be removed when
Casks are migrated away from separate classes.

Tests driven by RSpec are still todo.
2014-11-18 09:09: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
4d46f26447 recast tests to refer to "app" instead of "link"
and "activate" instead of "link" as a verb, in messages,
test names, comments, variable names.

No functional change.
2014-10-29 10:49:58 -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
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
f3a3404648 use path_environment_variable for caveats test
instead of manual_installer
2014-10-14 11:34:25 -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
Claudia
baddaf5fd2 Rewrite tests to make them work with Ruby 1.8 2014-10-05 20:15:12 +02:00
Claudia
ec2fdc3f51 Add tests for #5997 2014-10-05 19:52:41 +02:00
Roland Walker
e3d009989f reformat test Casks to match layout conventions
in case a contributor uses a test Cask as a template
2014-10-03 17:57:05 -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
fe0a053dad Merge pull request #6208 from rolandwalker/uninstall_force
add `--force` option for `brew cask uninstall`
2014-09-16 19:33:17 -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
ca8417bf0e support brew cask --version per USAGE.md
closes #6178
2014-09-16 10:04:47 -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
Federico Bond
ab4c5b13e5 Avoid printing Caveats title when output is empty
Closes #4878
2014-08-16 23:09:24 -03:00
Federico Bond
39bddf20de Re-enable suggestion tests 2014-08-04 09:30:58 -03: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
Vladimír Kriška
71f3a0d968 Show file contents instead of commits 2014-06-21 01:19:07 +02:00
Roland Walker
de1858d905 conform all command verbs to a Class (not Module) 2014-06-20 15:06:29 -04:00
Roland Walker
f65d422b82 refactor brew cask cleanup
Divide into more tractable methods. No functional change.

Change apparent typo in test regular expression
2014-06-19 14:25:56 -04:00
Roland Walker
3cb729095d suggested (not enforced) order for Cask stanzas
References: #4914
2014-06-16 13:32:08 -04:00
Roland Walker
4f3ecb1cc3 Downgrade Cask install errors to warnings
Including the case where a Cask is already installed.
Always continue installing when multiple Casks are specified,
only raising an exception at the end of the command (if some
portion of the attempted install actions failed).  Never
exit with an error code if "already installed" was the only
problem seen during the run.

Also tweak error messages.

Fixes #1347, #2677, #4785

Required disabling two tests regarding suggestions on Cask
spelling errors.
2014-06-10 12:13:59 -04:00
Roland Walker
154eb2b12f prompt for HTTPS URLs in brew cask create 2014-06-07 14:36:35 -04:00
Roland Walker
25c7ee5962 Re-enable failing "search" test
This test used to selectively fail only on Travis.  The problem
was never isolated.  However, it was apparently recently fixed,
probably in #4042.
2014-05-08 16:05:35 -04:00
Roland Walker
e910467b39 update docs and messages for brew cask cat 2014-05-07 10:32:15 -04:00
Lincoln Lee
227ac512bc Add brew cask cat command mentioned in #4018 2014-05-05 22:46:28 +08:00
Paul Hinze
f54eaf7082 update all references to new caskroom org home
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!
2014-05-03 10:29:17 -05:00
Roland Walker
5bc2b62b25 Merge pull request #3667 from rolandwalker/artifacts_in_info
display artifact summary in `brew cask info`
2014-03-28 09:33:23 -04:00
Roland Walker
5c8640d6fe Merge pull request #2706 from rolandwalker/install_suggest
suggest replacements on "brew cask install" fail
2014-03-27 08:51:13 -04:00