Commit graph

1074 commits

Author SHA1 Message Date
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