Commit Graph

24 Commits

Author SHA1 Message Date
Radek Simko 6b3146aed6 binary_test (minitest) -> binary_spec (rspec) 2015-01-24 20:01:54 +00:00
Roland Walker 000e251638 add missing test coverage for `suite` artifact
refs: #7382
2014-11-18 10:01:06 -05:00
Roland Walker 1ddec7128d add uninstall :rmdir
per discussion at https://github.com/caskroom/homebrew-cask/pull/6174#discussion-diff-17516171
refs: #6174

This PR is large because of some test-suite refactoring.
2014-09-16 09:48:32 -04:00
Roland Walker 99d001afa4 add support for xar containers
references: #5442
2014-08-02 14:51:51 -04:00
Roland Walker a0785a0cfa create a somewhat better fake `pkg` for tests 2014-08-02 11:04:03 -04:00
Roland Walker 35e7997c35 support pure gzip containers (not tar.gz)
References: #5455
2014-07-26 15:58:49 -04:00
Roland Walker a8acf3de1a bugfix: preserve resource forks when unzipping
Use the unarchiving ability built into the `ditto` utility,
rather explicitly calling the `unzip` utility.  Fixes
caskroom/homebrew-fonts#90.
2014-03-11 08:46:38 -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
Stratos Moros 7136269198 implement `binary` artifact 2014-01-05 22:55:18 +02:00
phinze 06506c5643 add test that exercises tar container
refs #1083
2013-11-05 21:33:46 -06:00
phinze c03ada18ec support for nested containers
- this allows us to support casks for things like "dmg in zip" "zip in
   tar", etc, etc
 - a nested container can be any format that homebrew-cask supports
 - the existing container support is now referred to as a Cask's
   "primary container"
 - use the `nested_container` artifact type to indicate the relative
   path to a nested container that you wanted extracted
 - multiple layers of nesting should work with multiple nested_container
   directives (though this is untested as yet)
 - add SpeedDownload as the first cask to use this feature; refs #602
2013-10-19 16:20:00 -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
phinze 171456dc98 support for install/uninstall
accepts a single argument, which is a relative path to a pkg
inside the extracted Cask; homebrew-cask will attempt to install this
pkg after the Cask is extracted via `installer`

because of the many different ways uninstallers work, this
has several features:

 - `:script`: a script in the Cask which serves as an uninstaller (e.g.
   Vagrant, VirtualBox), uses `:args`, and `:input` keys to interact
   with said script
 - `:pkgutil`: a regexp which captures all package_ids installed by this
   cask; homebrew-cask will list all files installed under these ids and
   remove them
 - `:launchctl`: a list of bundle_ids for services that should be
   removed by homebrew-cask
 - `:files`: a fallback list of files to manually remove; helps when
   uninstallers miss something

refs #661
2013-07-21 22:01:38 -05:00
Paul Hinze 3991bd6839 a beta pkg installer
- the vagrant cask is our guinea pig
- works for me
- only basic testing at the moment
- i wanted to push something to get the gears turning on this

it turns out the concept is pretty simple. specify a list of pkgs to
install; borrow the patterns from linkables for that. then basically
just run "sudo installer"

refs #14
2013-05-11 23:01:59 -05:00
phinze 0de91ed257 exclude __MACOSX dir when unzipping
should take care of #222
2013-04-28 11:38:09 -05:00
phinze 259ed643f9 fix dmg plist parsing problem
should take care of #104

this was a subtle one - after i reorganized the requires, plist/parser
was getting double required, which broke plist parsing and hence dmg
installs
2012-11-21 16:12:45 -06:00
phinze ef25273d96 allow test suite to be run without internet 2012-11-21 15:51:03 -06:00