Commit graph

409 commits

Author SHA1 Message Date
Roland Walker
e5d4765135 Merge pull request #7933 from rolandwalker/comment_unknown_license
mark `license :unknown` with explicit todo comment
2014-12-10 08:42:18 -05:00
Roland Walker
b3836f581d recast info_plist as info_plist_file 2014-12-09 10:47:23 -05:00
Roland Walker
568a8229c3 mark license :unknown with explicit todo comment 2014-12-09 07:48:45 -05:00
Roland Walker
5036750355 Merge pull request #7854 from rolandwalker/accessibility_stanza
DSL: add `accessibility_access` stanza
2014-12-08 19:24:19 -05:00
Roland Walker
82826b2687 DSL: add accessibility_access stanza
* accepts a Boolean value
* replaces the never-documented `postflight` methods `enable_accessibility_access` /
 `disable_accessibility_access` (`remove_accessibility_access`)
* declarative: unlike the `postflight` approach, does not have to be
  invoked in two places
* de-document obsolete form `caveats` / `assistive_devices`
* bump Travis seed to avoid false test failures
2014-12-08 19:17:19 -05:00
Claudia
5db030e742 Add reason for skipping syntax tests
This might help debug issues like the failing Travis build in PR #7895.
2014-12-08 16:52:19 +01:00
Roland Walker
daaf5ad89b missing stubs
can't hurt
2014-12-08 10:32:18 -05:00
Roland Walker
2e71e5110d remove newlines from runtime bundle IDs
* create `staged_test.rb` for testing staged Casks
* test an actual staged Cask rather than mocking
2014-12-08 10:32:18 -05:00
Claudia
7f5dc211ba In SystemCommand, fix success? and exit_status
When invoking a `SystemCommand` with `:must_succeed => false`, the `SystemCommand::Result` class would mistake a `Process.Status` object for a `Fixnum`.

This commit fixes this by instantiating `Result` with the actual status code as a number.
2014-12-08 15:53:35 +01:00
Claudia
c3266d38ce Add failing tests for SystemCommand 2014-12-08 13:06:46 +01:00
Roland Walker
09bed7a53b Merge pull request #7845 from rolandwalker/depends_on_x11
DSL: add `depends_on :x11`, permit multiple `depends_on` stanzas
2014-12-08 05:40:45 -05:00
Roland Walker
5348260520 DSL: add depends_on :x11 2014-12-06 11:20:15 -05:00
Roland Walker
e581347939 allow multiple depends_on stanzas + refactor
also:
* disallow combining depends_on :macos comparison expressions
* ohai message when depends_on is present
* explicit accessors for :cask and :formula
* simplify some logic and flatten nested conditionals
* reflow incidental doc
2014-12-06 11:06:30 -05:00
Roland Walker
a870869f9a Merge pull request #7822 from rolandwalker/allow_leading_numbers
Remove constraint that Cask tokens cannot start with digits
2014-12-06 09:00:04 -05:00
Roland Walker
2a09a970cd Merge pull request #7819 from rolandwalker/depends_on_followup
followups on `depends_on` `:macos`/`:arch`
2014-12-06 07:55:13 -05:00
Roland Walker
f5bcbd00a5 Merge pull request #7805 from rolandwalker/add_name_stanza
Add `name` stanza for proper name
2014-12-06 05:28:30 -05:00
Roland Walker
cb5a40f787 remove constraint that tokens can't start w/ digit
Class names are now completely hidden from the user.  This
commit works by adding a prefix to all Cask class names, which
is considered to be an ugly transitional hack on the way to
representing individual Casks as instances.
2014-12-05 11:54:56 -05:00
Roland Walker
037ece852b followups on depends_on :macos/:arch
* always coerce `:macos` value to array; simplify code
 * remove warning comments about unset values
 * doc explicitly that requirements are covered as well as dependencies
 * doc that `depends_on` is not consulted until `install` time
 * in docs and code, say "release" instead of "version" for the :macos release
   * todo: provide our own variable styled "release" to use in Casks, instead of Homebrew's `MacOS.Version`
 * doc that symbols are preferred for `:macos` over strings in Casks (interally, all are converted to idential `Gem::Version` objects)
 * doc: remove `os_version_only` from `cask_language_deltas.md`
 * doc: improve internal links
 * doc: recast OS X release symbol list as table
 * doc: (incidental) regularize orthography of Formula and Cask
2014-12-05 09:55:47 -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
7f5e5124f6 DSL: depends_on :arch functionality/tests/doc
* fill in functionality for the `depends_on :arch` stub
* de-document `caveats` method `arch_only`
2014-12-04 14:29:27 -05:00
Roland Walker
c59a5fcb80 DSL: depends_on :macos functionality/tests/doc
* Fill in the functionality for the `depends_on :macos` stub
* de-document `caveats` method `os_version_only`
* clean up some related docs re: version strings
* add `depends_on_test.rb`
* clarify some related `depends_on :formula` doc, tests, and code
* formatting in test Casks
2014-12-02 12:04:27 -05:00
Roland Walker
9050f4d301 Merge pull request #7684 from rolandwalker/accessibility_review
Review and revise accessibility methods in postflight mini-DSL
2014-12-02 05:19:39 -05:00
Roland Walker
bff136da57 Merge pull request #7685 from rolandwalker/plist_postflight_review
review/revise plist methods in postflight mini-DSL
2014-12-02 05:19:12 -05:00
Roland Walker
6da1dd13bc Merge pull request #7673 from rolandwalker/name_to_token
unify and recast "Cask name" and "title" as "token"
2014-12-01 11:05:12 -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
Roland Walker
777949dd75 revise plist methods in postflight mini-DSL
* accept index argument to `info_plist` in case of multiple `app`
  artifacts, defaulting to first
* return `Pathname` object from `info_plist`
* use `@command.run` instead of `system_command` which is intended
  as an external interface
* quoting
2014-11-29 13:43:06 -05:00
Roland Walker
2ff2db48b6 revise accessibility methods in postflight miniDSL
* rename `remove_accessibility_access` to `disable_accessibility_access`
  to match corresponding method `enable_accessibility_access`
* move `TCC.db` and `.AccessibilityAPIEnabled` paths to `Cask::Locations`
* remove unneeded backslash from `TCC.db` path
* use full paths to `touch` and `sqlite3` utilities
* use `@command.run` instead of `system_command` which is intended as an
  external interface
* reverse conditional so enable/disable logic is consistent
* `sudo` is needed when creating `.AccessibilityAPIEnabled`
* instead of silent fail, warn that access cannot be safely disabled on
  Mountain Lion and earlier (it could, but might affect other apps)
* quoting/whitespace
2014-11-29 13:21:21 -05:00
Roland Walker
19ee3986c0 Refactor backend classes to match pre/postflight
From legacy forms "after_install", etc.
* abstract out `method_missing_message` to Cask::Utils
* provide `method_missing` coverage in pre/postflight blocks (fixes #7445)
* fix old-style rendering of Cask name as a classname in
  `method_missing` messages
2014-11-26 12:19:17 -05:00
Roland Walker
2448325062 consistency nit 2014-11-24 10:44:08 -05:00
Roland Walker
a5528c320f test header line name against filename 2014-11-24 10:43:58 -05:00
Roland Walker
4b3cec76b1 test for valid header line format 2014-11-24 10:43:37 -05:00
ndr
62c1ce5dfc Merge pull request #7530 from rolandwalker/enforce_min_dsl_version
enforce a valid minimum DSL version in headers
2014-11-23 11:14:58 +00:00
Roland Walker
e2a0214de6 enforce a valid minimum DSL version in headers 2014-11-22 20:08:25 -05:00
Fabio Niephaus
62cbb3d7a6 get 'syncfolder' from Preferences. resolves #7216 2014-11-22 23:10:04 +01:00
Roland Walker
80dd4caf8a Merge pull request #7450 from rolandwalker/remove_old_header_support
DSL Remove support for old-style header lines
2014-11-20 06:51:10 -05: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
e3df6a9923 fix old-style header line in test suite 2014-11-19 10:56:36 -05:00
Roland Walker
c15fdadb8f Merge pull request #7429 from rolandwalker/remove_container_type
DSL: remove support for `container_type`
2014-11-18 19:48:12 -05:00
Roland Walker
1f24c7e8f2 Merge pull request #7430 from rolandwalker/new_header_test_casks
remove old-style header line from test Casks
2014-11-18 19:48:05 -05:00
Roland Walker
000e251638 add missing test coverage for suite artifact
refs: #7382
2014-11-18 10:01:06 -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
e31264de00 DSL: remove support for container_type
obsoleted by new form `container :type`
2014-11-18 08:12:05 -05:00
ndr
a21dbc85aa Merge pull request #7365 from rolandwalker/add_stage_only
DSL: add stanza `stage_only` (new spelling of `caskroom_only`)
2014-11-18 12:27:54 +00: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
d2132ac520 DSL: remove support for depends_on_formula
obsoleted by `depends_on :formula`
2014-11-17 11:16:08 -05:00
Roland Walker
00747614f7 use new header form in create template 2014-11-13 11:45:06 -05:00
Federico Bond
da0412bd71 Remove unsupported -x option in launchctl command 2014-11-12 11:28:45 -05:00
Roland Walker
09ecd1eb79 DSL: remove support install stanza
now replaced by `pkg`
2014-11-11 11:23:51 -05:00
Federico Bond
75ee4ef812 Add key option to suppress_move_to_applications 2014-11-02 00:26:49 -03: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