Commit Graph

717 Commits

Author SHA1 Message Date
Roland Walker 6fbf7dce5a fix depends_on :formula backend
closes #6158
2014-09-13 08:04:27 -04:00
Roland Walker dfcbd7154e docs, error msgs, tests for depends_on :formula
replacing depends_on_formula in DSL
2014-09-11 20:33:39 -04:00
ndr c0bc7b44a2 Merge pull request #6117 from rolandwalker/metadata_directories
Metadata directory support
2014-09-11 23:47:00 +02:00
Roland Walker 0574662679 metadata directory support
- incidentally adds defensive driving against null version
  in method `destination_path`
2014-09-11 11:17:52 -04:00
Roland Walker 719bb998ed cut v0.41.0 2014-09-11 10:08:43 -04:00
Roland Walker 65cda1257e new DSL form container :nested => <inner> 2014-09-11 09:26:40 -04:00
Roland Walker 5d77ef0203 Merge pull request #6121 from rolandwalker/doc_dsl_pkg
docs and error messages for new DSL stanza `pkg`
2014-09-10 17:35:20 -04:00
Roland Walker 01cd96b89a Merge pull request #6116 from rolandwalker/doubledash_mkdir
Add doubledash to mkdir command
2014-09-10 17:34:09 -04:00
Roland Walker ab4f52a781 docs and error messages for new DSL stanza `pkg`
transition from `install` to `pkg`
2014-09-10 10:54:06 -04:00
Roland Walker 3b7ce85381 bug: fix container :type => <type>
Copypasta error in #6068 means that container :type
never worked, because it looked for nonexistent container.formula
2014-09-10 09:52:26 -04:00
Roland Walker 0ad22a8990 Add doubledash to mkdir command 2014-09-10 08:17:35 -04:00
Roland Walker 92e15b4a91 cut v0.40.0 2014-09-08 10:28:31 -04:00
Roland Walker 891bff1946 Merge pull request #6071 from rolandwalker/license_ncsa
DSL add NCSA OSS license type
2014-09-08 10:09:45 -04:00
Roland Walker 11e5376090 add NCSA OSS license type
Used for example by LLVM.
2014-09-08 10:06:21 -04:00
Roland Walker b8523e2603 Merge pull request #6068 from rolandwalker/container_dsl
DSL: change container_type to extensible container
2014-09-08 10:04:28 -04:00
Roland Walker ca21928b93 DSL: change container_type to extensible container
Late addition to DSL 1.0 (oversight in the roadmap)

References: #4688
2014-09-08 09:01:46 -04:00
Roland Walker 07158e455b Revise gpg stanza order and parameters
References: #5971
2014-09-01 10:04:17 -04:00
Roland Walker 9711ff8672 re-org more files under lib/cask/dsl 2014-08-27 07:50:38 -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
Federico Bond 26275e2659 Merge pull request #5922 from federicobond/fix-info
Show correct GitHub file for casks with similar names
2014-08-26 13:07:10 -03: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 4724c32955 Reload QuickLook on plugin uninstall 2014-08-25 14:49:25 -03:00
Roland Walker 45a1b734d7 move tags.rb to dsl/tags.rb 2014-08-23 12:30:59 -04:00
Federico Bond 4fe1bd76d4 Add support for long format in list command 2014-08-20 18:07:39 -03:00
Federico Bond 1b1a7fde17 Merge pull request #5806 from federicobond/conditional-caveats
Avoid printing Caveats title when output is empty
2014-08-19 10:04:43 -03:00
Federico Bond ab4c5b13e5 Avoid printing Caveats title when output is empty
Closes #4878
2014-08-16 23:09:24 -03:00
Roland Walker 7c9c76c877 Merge pull request #5769 from federicobond/remove-decorator
Remove Cask::Decorator
2014-08-16 12:04:21 -04:00
Roland Walker 4e37017752 Merge pull request #5790 from federicobond/fix-cask-loading
Fix cask loading behavior
2014-08-15 17:06:19 -04:00
Federico Bond 950bc054bd Fix cask loading behavior. Refs #5769 2014-08-15 13:57:43 -03:00
Federico Bond ff0a5c10e3 Remove Cask::Decorator 2014-08-15 13:00:52 -03:00
Roland Walker 99e75bddfd cut v0.39.3 2014-08-13 07:47:41 -04:00
Roland Walker b58f2b2da2 Merge pull request #5754 from federicobond/fix-checklinks
Fix Error in checklinks
2014-08-12 16:53:56 -04:00
Federico Bond 2b2f60921c Fix Error in checklinks. Closes #5752 2014-08-12 17:05:00 -03:00
Roland Walker b65c4963ea cut v0.39.2 2014-08-12 08:17:12 -04:00
Roland Walker e86e94f6d3 cut v0.39.1 2014-08-12 07:36:38 -04:00
Federico Bond 19084bce63 Add uninstall_phase method to CaskroomOnly artifact 2014-08-11 23:07:36 -03:00
Federico Bond ef7190589c Merge pull request #5723 from federicobond/postflight-dsl
Add DSL for after_install and similar blocks
2014-08-11 22:07:36 -03:00
Federico Bond 3cb833c89e Add DSL for after_install and similar blocks 2014-08-11 21:41:06 -03:00
rochefort 5d61bb42a5 Implement list -1 2014-08-11 21:24:17 +09:00
Roland Walker 15e2f5586d Merge pull request #5622 from rolandwalker/xar_containers
add support for xar containers
2014-08-02 21:14:30 -04:00
Federico Bond 693e3b97fb Convert backtick commands to Cask::SystemCommand.run
Closes #4971
2014-08-02 16:43:30 -03:00
Roland Walker 99d001afa4 add support for xar containers
references: #5442
2014-08-02 14:51:51 -04:00
Roland Walker 04fd5c0494 rename seven_zip.rb to better match class name 2014-08-02 11:19:04 -04:00
Roland Walker baacc53d56 recast `containers` as `autodetect_containers`
and clarify which container types will not autodetect
2014-08-02 11:17:48 -04:00
Roland Walker aa0004d715 divide Cask::Container::Naked into explicit types
- Cask::Container::Pkg
- Cask::Container::Ttf
- Cask::Container::Otf

which are autodetected based on filetypes as with other
containers.  Cask::Container::Naked remains available
for explicit use in a container_type stanza.
2014-08-02 11:09:00 -04:00
Roland Walker f9d4fef45f use `const_get` in container.from_type
instead of iterating over container list
2014-08-02 11:05:30 -04:00
Roland Walker b84d605035 improve criteria `extension` method
casecmp was a bug as a substring could match
2014-08-02 11:03:20 -04:00
Roland Walker 3d343cb32d comment 2014-08-02 11:02:15 -04:00
Roland Walker caae9de479 Merge pull request #5596 from rolandwalker/permissions_before_rmtree
force permissions and delete ACLs if `rmtree` fails
2014-07-31 16:19:19 -04:00
Roland Walker 954de1332f Merge pull request #5598 from rolandwalker/allow_multiword_container_types
bug: `container_type :seven_zip` was ignored
2014-07-31 16:18:26 -04:00
Roland Walker f5063a2e8a Merge pull request #5599 from rolandwalker/generic_unar_container
refactor GenericUnar container class
2014-07-31 16:18:16 -04:00
Roland Walker c301b27043 force permissions and delete ACLs if rmtree fails
This logic is ugly as the installation directory will be left
in a mangled state if it fails partway through.  However, the
same is true when `rmtree` fails partway through, which this
code is intended to minimize.

References: #5504
2014-07-31 14:43:05 -04:00
Roland Walker cd18107db3 Merge pull request #5591 from rolandwalker/move_digest_require
move require 'digest' to where it is actually used
2014-07-31 14:35:45 -04:00
Roland Walker 04ea21e03c refactor GenericUnar container class
This is just a matter of semantics: renaming the abstract base
class `Cask::Container::UnarBase` so that it makes sense when
referring to it in a `container_type` stanza.
2014-07-31 11:18:50 -04:00
Roland Walker 9a20a564a4 bug: `container_type :seven_zip` was ignored
because interior capitalization was not done
2014-07-31 11:09:39 -04:00
Roland Walker 0c609fbfe6 cut v0.38.1 2014-07-31 09:24:45 -04:00
Roland Walker 14011ba507 move require 'digest' to where it is actually used 2014-07-31 09:17:47 -04:00
Roland Walker eaa1eef6b1 Merge pull request #5590 from rolandwalker/depends_on_via_cli
fix Formula dependencies by invoking Homebrew CLI
2014-07-31 09:17:39 -04:00
Roland Walker 42eea1f0bf fix Formula dependencies by invoking Homebrew CLI
According to the logic of #5080, we should move away from calling
Homebrew internals, in part because things break over time, as
happened here with the implementation of `depends_on_formula`
(shortly to become `depends_on :formula`).

This re-implements formula dependencies by invoking the Homebrew
CLI, which is the only stable API Homebrew guarantees.

Fixes #5475
Fixes #4010
2014-07-31 09:09:16 -04:00
Roland Walker 71c57b3569 bug: use install_phase in caskroom_only / qlplugin
Missed in #4865.  install method was renamed.
Bug exercised by Cask amazon_music.rb.
2014-07-30 13:11:57 -04:00
Roland Walker 465caffa0d Merge pull request #5569 from rolandwalker/dsl_conflicts_with
DSL: add `conflicts_with` stanza
2014-07-30 10:05:55 -04:00
Roland Walker 122cf34995 Merge pull request #5555 from rolandwalker/delete_bom_specials
Delete special files (eg symlinks) from pkg BOMs
2014-07-29 18:26:09 -04:00
Roland Walker 44f1a37546 DSL: add `conflicts_with` stanza
Forgotten in #4688, but should be considered part of Cask DSL 1.0.
A `depends_on` stanza is much less useful without the corresponding
`conflicts_with`.

References: #4896
2014-07-29 18:24:34 -04:00
Roland Walker 469bce88cc Merge pull request #5548 from rolandwalker/notify_pkg_install
Give users hint that pkg installs work differently
2014-07-29 09:15:48 -04:00
Roland Walker e795a56850 Delete special files (eg symlinks) from pkg BOMs
`pkgutil --only-files` plus `pkgutil --only-dirs` does not
cover all files in the BOM.

Closes #5491
2014-07-29 07:55:07 -04:00
Roland Walker cc95c18f07 Give users hint that pkg installs work differently
Users should not have to open the Cask file to figure out why one
cask installs differently than another.

Closes #5402.
2014-07-28 22:27:41 -04:00
Roland Walker 6c2b6686b1 add another special case for odd SourceForge URL
References: #5488
2014-07-28 18:02:55 -04:00
Roland Walker 30296d5ded cut v0.38.0 2014-07-28 15:13:12 -04:00
Roland Walker 573af3c8b7 Merge pull request #5540 from rolandwalker/amend_tags
Amend valid values for tags stanza
2014-07-28 14:46:29 -04:00
Roland Walker 3d9ea33ca0 Merge pull request #5365 from rolandwalker/remove_caskname_limitations
forward-compatibility to remove naming limitations on Casks
2014-07-28 14:18:19 -04:00
Roland Walker 583890a96e Merge pull request #5520 from rolandwalker/system_command_exit_status
Open.popen3 does not set `$?`
2014-07-28 14:16:23 -04:00
Roland Walker dcefd7ec09 Amend valid values for tags stanza
- remove font tags (per earlier discussion - they were left
  in by mistake)
- add tag `:name` for corner cases where the Cask name cannot
  adequately follow the product name.  Examples: non-English
  apps, App bundles which do not match publicized names.
2014-07-28 14:13:28 -04:00
Roland Walker f1cad8c7a2 Merge pull request #5517 from rolandwalker/pure_gzip_container
support pure gzip containers (not tar.gz)
2014-07-28 14:05:08 -04:00
Roland Walker 4713c79c89 Open.popen3 does not set $?, unless Ruby 1.8
This is possibly the cause of other glitches such as random
failures on Travis.

Ruby 1.8 popen3 does set global $? for the exit status, Ruby
1.9 and above does not.  For Ruby 2.0 users (Mavericks and
above with recent Homebrew), success or failure of the current
external command was determined by the exit status of some
previous command.

Closes caskroom/homebrew-fonts#186
2014-07-28 14:03:06 -04:00
Roland Walker 3e2eafb636 forward-compatibility to remove naming limitations
Currently, Casks names are constrained by the need to form
valid Ruby class names.  This change enables a new syntax,
in which the first line of a Cask will read like
```ruby
cask :v1 => 'my-app' do
```
where :v1 refers to the version of the DSL spec.
2014-07-28 13:36:44 -04:00
Roland Walker baba437ca1 Zip container does not need to `require 'tmpdir'` 2014-07-26 16:30:15 -04:00
Roland Walker 35e7997c35 support pure gzip containers (not tar.gz)
References: #5455
2014-07-26 15:58:49 -04:00
Roland Walker d9d3011c81 ignore non-XML hdiutil output preceding plists
unless `--debug` is in effect.  This reverts to previous
behavior WRT DMG licenses.  Trailing non-XML garbage will
still be emitted.
2014-07-14 14:15:51 -04:00
Roland Walker ecb66ac567 DSL: add `tags` stanza
only limited/defined keys are permitted
 - :vendor
 - :font_pitch
 - :font_serif
 - :font_weight
 - :font_slant

forward-compatibility: no associated functionality is
provided.  Intentionally left undocumented.

References: #4688
2014-07-02 18:54:13 -04:00
Roland Walker ea27fb8fc2 Merge pull request #4928 from rolandwalker/unininstall_trash_delete
DSL: add uninstall `:delete` and `:trash`
2014-07-02 18:31:04 -04:00
Roland Walker a8eb05867e add `install_script` artifact
name matches `uninstall :script`

References: #4688
2014-07-02 18:06:24 -04:00
Roland Walker 3807b888f7 read_script_arguments accepts defaults/overrides
as parameters.  Accept overridden keys when submitted by the
caller, but warn that they are ignored.
2014-06-28 15:30:48 -04:00
Roland Walker bb119655de harmonize error messages 2014-06-28 15:24:55 -04:00
Roland Walker bfc962595d generalize read_script_arguments
so that it can be called from multiple stanzas
2014-06-28 15:24:55 -04:00
Roland Walker ba797f043e move read_script_argument to Cask::Artifact::Base 2014-06-28 15:24:55 -04:00
Roland Walker 4c6e5e2b57 DSL add uninstall `:delete` and `:trash`
- `:delete` is intended to replace `:files`
- `:trash` is intended to move files to the OS X Trash
- `:trash` is only a stub — currently all three function identically

References: #4688
2014-06-28 14:51:38 -04:00
Roland Walker 743c0cf8f2 Merge pull request #4845 from rolandwalker/dsl_aliases
DSL: forward-compatible synonyms (WIP)
2014-06-28 14:37:42 -04:00
Roland Walker 2c06def3ba Merge pull request #4873 from rolandwalker/add_license_stanza
DSL: add `license` stanza
2014-06-28 10:32:22 -04:00
Roland Walker caeeaf2078 Merge pull request #4869 from rolandwalker/add_zap_stanza
DSL: add `zap` stanza
2014-06-28 10:30:25 -04:00
Roland Walker 99ba340a4d Merge pull request #4896 from rolandwalker/add_depends_on_stanza
DSL: add `depends_on` stanza
2014-06-28 10:19:18 -04:00
Roland Walker b2390ac3d8 Merge pull request #4848 from rolandwalker/add_gpg_stanza
DSL: add `gpg` stanza
2014-06-28 10:18:36 -04:00
Roland Walker 64313c7399 add `zap` stanza to DSL
The zap functionality here is in working form, but there is not a
corresponding `brew cask zap` command verb, which is to be supplied
in a separate PR.

Like other forward-compatible DSL extensions, it is intentionally
undocumented.

References: #4688
2014-06-28 10:16:54 -04:00
Roland Walker 0d01d35822 Merge pull request #4849 from rolandwalker/version_symbol_latest
DSL: allow `version :latest` (symbol not string)
2014-06-28 10:13:56 -04:00
Roland Walker cc7db15b5b Merge pull request #4847 from rolandwalker/extend_appcast_stanza
DSL: extend `appcast` stanza
2014-06-28 10:11:49 -04:00
Roland Walker 000487ba31 Merge pull request #4866 from rolandwalker/demote_caskroom_only
DSL: remove special properties of `caskroom_only` stanza
2014-06-28 10:11:37 -04:00
Roland Walker 52152016c2 Merge pull request #4865 from rolandwalker/allow_all_uninstall
DSL: allow all Casks to use `uninstall` stanzas
2014-06-28 10:09:19 -04:00
Roland Walker d2e302afbb Add `license` stanza to DSL
References: #4688.

For forward-compatibility; intentionally left undocumented.

The `license` stanza is not free-form.  There is a limited
set of valid symbols, of which the argument must be a member.
(The set will later be documented, and probably needs amendments.)

Version numbers and variants of licenses are intentionally
ommitted.  The use-case for `license` is filtering and listing
of Casks. We want to avoid becoming a detailed repository of
application descriptions: that information can be found at the
`homepage` URL.
2014-06-26 09:13:56 -04:00
Roland Walker 8db73ff333 cut v0.37.1 2014-06-25 20:48:31 -04:00
Roland Walker deb79403e5 Improve plist handling for `hdiutil` commands
- Raise `CaskError` instead of `Plist::ParseError` from module
- Improve error message when parse result is empty
- remove leading garbage text and emit it to stderr (seen in #5060)
- remove trailing garbage text and emit it to stderr (seen in #4819)

This has the incidental effect of emitting DMG licenses during
installation, which seems desirable as permanent functionality.

If not permanent, the warnings to STDERR should still be kept
temporarily to help get better bug reports on `hdiutil`.

A bug wrt DMG licenses must have been introduced in one of
#4892, #4887, #4889, #4900, #4975, #4978, or #4857.  Presumably,
the cause is that STDERR was previously silenced when running
`hdiutil`.  It would be cleaner (and more reliable) to redirect
STDERR and examine it separately, rather than clean up the
merged outputs.

closes #4819
closes #5060
2014-06-25 10:30:49 -04:00