Commit graph

21 commits

Author SHA1 Message Date
Roland Walker
e3f10f82b8 doc and tests for container :type
includes some minor tweaks/re-ordering in docs
2014-10-03 10:40:54 -04: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
3d343cb32d comment 2014-08-02 11:02:15 -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
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
35e7997c35 support pure gzip containers (not tar.gz)
References: #5455
2014-07-26 15:58:49 -04:00
Paul Hinze
c0f470cd55 Merge pull request #3011 from rolandwalker/force_container_type
ability to specify container type, not detect
2014-02-28 09:23:01 -06:00
Roland Walker
bf49dc9fa8 ability to specify container type, not detect
Fixes #2997.  Interface is optional DSL stanza `container_type`.
This should only be used in rare instances.  It is needed for the
case of a naked executable which should not be unpacked.
2014-02-25 16:39:12 -05:00
Roland Walker
c7e0e5b2e5 support Bzip2 containers
bzips of tarballs are already supported via `tar`.  This
adds support for a single file asset within a bzip2 container.
2014-02-25 16:36:36 -05:00
Roland Walker
9fa39c2681 add support for RAR containers
this will not pass Travis until #2744 is merged
2014-02-25 16:29:24 -05:00
Roland Walker
b90633d92a add support for Stuffit containers
This will not pass Travis until #2744 is merged
2014-02-25 12:54:49 -05:00
Roland Walker
a75a4840cf Add 7z container support
relevant Casks must use `depends_on_formula unar`
2014-02-25 12:32:37 -05:00
Victor Robertson
026ca0c6e1 Add support for Adobe Air app installations
Adobe Air applications take the form of a .air file that the Adobe Air
runtime then installs and creates a .app -- typically in
/Applications.  This patch provides a new container for those .air
files which the Adobe Air runtime installs to the Caskroom as well as
tests for Adobe Air app installations.

Presently, if homebrew-cask doesn't detect the Adobe Air runtime, it
will provide an informative error message and instructions to obtain
it via `brew cask install adobe-air`.  This is obviously not ideal and
the installation process for the runtime should be automated in the
future.
2014-02-17 11:36:01 -06:00
Roland Walker
36ce20a4ee support CAB archives 2014-02-03 18:37:20 -05:00
Roland Walker
216444849e Add copious debugging with --debug
- add new file "cask/utils.rb" analogous to "utils.rb" in Homebrew
- define odebug and odumpcask, analogs of ohai and friends, but
  which only give output when --debug is in effect
- move the debug setting from an instance variable in Cask::CLI
  to a method Cask.debug, defined in "lib/cask/options.rb", which
  was added in #2276. (Perhaps options.rb should be merged back
  into Cask::CLI).
- sprinkle odebug statements liberally throughout the codebase
- update tests
2014-01-28 10:15:43 -05:00
Paul Hinze
3c9423e8c6 naked pkg support + major container refactor
`Cask::Installer` was already much too complex, so I took this
opportunity to throw a `Cask::Container` abstraction around the
extraction part of the package install step.

It goes like this: a Cask's URL points to a Container of some sort. The
containers we currently support are: dmg, zip, tar, and (new) naked.
Naked refers to a raw file that just needs to be copied in place. This
currently just means a pkg file, but in the future it may expand.

A Container knows how to do two things: identify a path as being its
type (`Container.me?`) and extracting the contents of its container to
the proper destination for a Cask (`Container#extract`).

The first Cask we have that supports the naked pkg type is
`heroku-toolbelt`. (Thanks to @sheerun for the Cask definition.)

Other miscellania batched in with this refactor:

 - switched to an explicit require strategy rather than globbing
 - `Cask::Installer` is instantiated now to match its interface with
   other similar collaorators
 - simplified zip and tar identification to shorter strings rather than
   exact matches of full `file -Izb` output
 - `Cask::SystemCommand` gets explicit output redirection options
 - many rogue backticks replaced to properly use `SystemCommand`
 - fixed misnamed test file `link_checker_spec.rb`
 - remove some extraneous `after` clauses in tests; leaning more on
   `test/support/cleanup.rb` to uninstall for us
 - pkg uninstall `:files` gets a `-rf` to support removing dirs

refs #839 and #1043
2013-09-21 21:59:07 -05:00