Commit graph

146 commits

Author SHA1 Message Date
Roland Walker
81744a038d bugfix: make uninstall :script accept a hash
The indentation in CONTRIBUTING.md implies that :script accepts a hash.
But that is not the case. Instead :script accesses the entire hash defined
by uninstall.  Unrelated install keys such as :quit leak through to
@command.run! when attempting to exec :script.  Result: contrary to docs,
:script cannot be combined with other uninstall keys.

This PR makes uninstall :script accept a hash.  When :args or :input are not
needed, :script can still accept a plain string, so many Casks require no
alteration.

In addition
- adds key :executable, required when using hash argument to :script
- keys to :script are validated and sanitized before being passed to
  @command.run!
- adds :quit to with-installable.rb test to protect against regression
  on leaky keys
2014-01-11 12:20:59 -05:00
Paul Hinze
fead909887 Merge pull request #2263 from rolandwalker/faster_uninstall
uninstall files in chunks of 500.
2014-01-10 11:09:06 -08:00
Paul Hinze
9135ff5730 Merge pull request #2258 from rolandwalker/hardlink_fonts
use hard links for fonts instead of symlinks
2014-01-10 11:06:17 -08:00
Paul Hinze
b850d78427 Merge pull request #2240 from linc01n/audit
Check no_checksum if version is latest in audit
2014-01-10 10:59:36 -08:00
Paul Hinze
9bd923fafa Merge pull request #2152 from Dillon-Benson/patch-2
shows that there are no casks matching a search term that did not result...
2014-01-10 10:58:45 -08:00
Stratos Moros
7136269198 implement binary artifact 2014-01-05 22:55:18 +02:00
Roland Walker
61a09e9af8 fix test cruft introduced by #2304 2014-01-04 13:16:16 -05:00
Roland Walker
4123b05efa use hard links for fonts instead of symlinks
per an issue reported by @jgarber623.  Recast for compatibility
with #2300.
2014-01-04 12:39:37 -05:00
Roland Walker
a4149be6ef refactor artifacts
- abstracts out common logic, much code removed
- fixes one bug/inconsistency: some artifacts failed to
  "return false" when the target exists in "preflight_checks".
- one trivial functional change: artifact type and quotation marks
  added in all user feedback (quotes needed b/c of pathnames
  containing spaces)
2014-01-03 17:08:09 -05:00
Roland Walker
cfee08ab9e uninstall files in chunks of 500.
This is intended to address #2122.
2013-12-31 19:47:31 -05:00
Lincoln Lee
70302a4420 Check no_checksum if version is latest
Added one more check in audit if version is latest and have sha1 it will
not pass.
2013-12-30 20:46:11 +08:00
Dillon Benson
12cc9d4006 remove colon and add quotes to search not found message 2013-12-19 12:14:50 -05:00
Dillon Benson
fdf43d7873 change search results message 2013-12-19 12:03:42 -05:00
Dillon Benson
10d0feef27 shows that there are no casks matching a search term that did not result in anything 2013-12-19 00:02:38 -05:00
Paul Hinze
e46b89c908 Merge pull request #2081 from leoj3n/services-support
[WIP] services support
2013-12-15 15:26:44 -06:00
Paul Hinze
57077feac2 fix build
extra command in uninstall stubs now that we're checking for kernel
extensions before unloaded
2013-12-15 15:11:23 -06:00
Paul Hinze
36b0d166df make method_missing message much more explicit 2013-12-15 14:16:22 -06:00
Paul Hinze
f6f507b289 some refactoring around the new download strategy
- move the interface from top-level methods to hash arguments of URL to
   keep the cask DSL as skinny as possible
 - promote the Cask::Headers object up to a Cask::URL object that
   encapsulates all infornation about the URL
 - pull all knowledge about curl arguments into the DownloadStrategy,
   leaving URL to act as a value object to be queried for details
 - test at the DownloadStrategy level; setting up expected curl args
   and example casks
2013-12-15 13:18:47 -06:00
Paul Hinze
24a53c4af7 Merge pull request #1944 from jonahoffline/add_headers_download_strategy
Add DownloadStrategy with custom :headers support
2013-12-14 09:13:58 -06:00
Paul Hinze
0c6e97b8fd use absolute paths for all commands
closes #2029
2013-12-14 08:48:40 -06:00
Paul Hinze
d318192854 change cleanup strategy; should speed up tests
the test cleanup was using an old strategy that loaded every cask to
search for ones that are installed. with the number of casks approaching
1000, this was adding ~0.5s __per test__.

switching to the newer strategy that bases off of files in a dir speeds
this up, which improves the build time drastically.
2013-12-14 08:45:54 -06:00
Paul Hinze
4bfc09ec02 Merge pull request #2066 from halo/master
Configurable Caskroom location, see #475
2013-12-14 06:00:31 -08:00
future
bb2e3ab187 Improved the name of a test 2013-12-14 09:51:46 +01:00
Joel Kuzmarski
7432affc59 services support 2013-12-13 18:13:19 -06:00
Paul Hinze
8870f7c1fc Merge pull request #2008 from kevinSuttle/colorpickers 2013-12-13 10:40:36 -06:00
Paul Hinze
57da787bb5 fix pkg tests 2013-12-13 09:30:21 -06:00
Kevin Suttle
6dff4a35db Add support for colorpicker type 2013-12-12 22:59:58 -05:00
Jonah Ruiz
06be4b0d8e Add DownloadStrategy and Cask::Headers for custom :headers support
accepts a :user_agent argument and/or multiple :cookies
  headers :user_agent => 'Netscape/1.0', :cookies => { :cookey => "r00t" }

Also adds a standalone :fake_user_agent for a default UserAgent (Chrome)
  fake_user_agent
References #1175, #958
2013-12-12 21:29:12 -04:00
future
738479174c Added test for custom --caskroom argument 2013-12-12 17:48:46 +01:00
Fernando Paredes
d9c77c65cb Add support for installing Widgets 2013-12-08 09:28:56 -08:00
Paul Hinze
79aa1b7275 allow casks to support arbitrary blocks
this allows us to experiment with behavior that we may not want to
promote to an official feature just yet.

i'm thinking about stuff like #544, and other things i can't foresee

we'll have to be careful to not let this get out of hand, but i think
it could be helpful for cask authors to be able to try and problem solve
locally.
2013-12-05 21:02:59 -06:00
Paul Hinze
f75c47e32f Merge pull request #1948 from phinze/non-ruby-backed-casks
support non-ruby-backed casks
2013-12-05 18:28:31 -08:00
Paul Hinze
5dba177bf1 Merge pull request #1860 from rolandwalker/fonts
add support for installing fonts
2013-12-05 18:27:02 -08:00
phinze
10db2d5d3c support non-ruby-backed casks
- brew cask list now displays casks without backing ruby files
- casks without a source are displayed as "caskname (!)"
- these casks can be uninstalled, with the caveat that it only removes
  their files from the caskroom (doesn't run pkg uninstall or anything,
  since there's no ruby file to define what to do)
2013-12-05 20:10:19 -06:00
Fernando Paredes
302f150670 Merge pull request #1882 from Peeja/quicklook-auto-init-qlplugindir
Create qlplugindir during init.
2013-12-01 09:54:14 -08:00
Pavel Sakun
680dbfd889 Intellij idea casks renamed to include full product name 2013-12-01 03:24:49 +03:00
Peter Jaros
fff4bb06ca Test qlplugindir auto-creation. 2013-11-29 12:01:11 -05:00
Roland Walker
5da6e642bf add support for installing fonts 2013-11-26 08:38:43 -05:00
Lucas Garron
ee30f839d2 QuickLook plugin support. 2013-11-14 20:26:07 -08:00
Shane Watson
0627d3a909 Use exit codes 2013-11-10 13:30:11 -08:00
phinze
1ba71a3554 remove empty app dirs from caskroom on uninstall
previously an install + uninstall would leave around an empty dir with
the app's name. now we clean that up.

refs #1461
2013-11-10 14:48:16 -06:00
Shane Watson
8ab01bc255 Guard against unspecified casks in CLI 2013-11-10 13:44:10 -06:00
Lincoln Lee
22ee53b1d3 Add caveats to info like homebrew 2013-11-09 18:45:50 +08:00
Paul Hinze
d929e6a779 Merge pull request #1504 from phinze/1436-latest-sourceforge-links
new preferred sourceforge url style
2013-11-05 20:25:31 -08:00
Paul Hinze
dea18ec540 Merge pull request #1501 from phinze/1083-test-tarballs
add test that exercises tar container
2013-11-05 20:09:59 -08:00
phinze
8feec1de14 new preferred sourceforge url style
- document sf link policy
 - change audit to accept old and new style links
 - need to keep old style links for projects where the 'latest' link
   does not point to something usable
 - link to official policy in audit warning message

refs #1436
2013-11-05 22:09:15 -06:00
phinze
06506c5643 add test that exercises tar container
refs #1083
2013-11-05 21:33:46 -06:00
Paul Hinze
abb842bb44 Merge pull request #1499 from phinze/1035-fix-ambiguious-cask-load
use exact matching when loading a cask
2013-11-05 19:22:41 -08:00
phinze
58ac54ed29 use exact matching when loading a cask
fixes issue where casks with names that were a strict prefix of other
casks would always shadow them.

refs #1035
2013-11-05 21:07:52 -06:00
Paul Hinze
8baff93b12 Merge pull request #1462 from phinze/smarter-plist-parser
more robust plist parsing, and better error handling
2013-11-03 12:54:03 -08:00