Commit graph

99 commits

Author SHA1 Message Date
Roland Walker
36cd9e4d72 accept and ignore trailing .rb on CL arguments
"Be conservative in what you do, be liberal in what you accept."
2014-02-25 18:24:58 -05:00
Roland Walker
fe90e266f5 Merge pull request #2705 from rolandwalker/search_exact
Divide search output into sections
2014-02-25 12:59:53 -05:00
Võ Anh Duy
33a97a1a5f CLI - Fetch
Add `fetch` command to cli like suggestion at the end of #2528
2014-02-26 00:44:22 +07:00
Roland Walker
45d72b8838 Merge pull request #3079 from rolandwalker/brew_cask_update
make `brew cask update` synonym for `brew update`
2014-02-24 19:08:02 -05:00
Roland Walker
6f6a07fc0f mass whitespace cleanup 2014-02-22 21:13:52 -05:00
Roland Walker
55e9cfc39d make brew cask update synonym for brew update
for convenience/typo
2014-02-21 10:23:16 -05:00
Roland Walker
d2b779e509 temporary hack: suppress searching the font tap
this is needed to reduce noise on searches until search
can be made more configurable
2014-02-19 09:21:30 -05:00
Roland Walker
6096cc8d57 fork abv method with better odd-filename defense
Fixes #2917.  New method is named `cabv`. The original `abv`
method is in Homebrew at `Library/Homebrew/extend/pathname.rb`
2014-02-17 11:13:39 -05:00
Roland Walker
b67b2c53f2 make clear that only Alfred 2.x is supported
fixes #2891
2014-02-14 19:39:45 -05:00
Roland Walker
48accc49c6 list/target refactor
This follows up #2532 and #2392 abstracting out some duplicated
code.  Still not perfect, but better.
2014-02-12 08:39:11 -05:00
Roland Walker
18a92caf57 Merge pull request #2392 from rolandwalker/list_managed_links
Show managed links in "brew cask list"
2014-02-12 08:11:44 -05:00
Roland Walker
d0970948ce Merge pull request #2759 from rolandwalker/cleanup_cmd
add command `brew cask cleanup`
2014-02-11 06:25:21 -05:00
Paul Hinze
753bc59dcb restrict visibility of Cask namespace in Formula
we had collision issues with homebrew's 'cask' formula (for the emacs
package manager project).

this keeps the in-project and in-formula visibility of the version
number via the old "namespaced global" strategy that keeps a `Cask`
constant out of view of the formula.
2014-02-09 14:14:07 -05:00
Roland Walker
8450a29a6a Show managed links in "brew cask list"
Fixes #2261
2014-02-08 16:26:23 -05:00
Roland Walker
d6c8a6917d add command brew cask cleanup
plus new option --outdated
2014-02-08 14:40:53 -05:00
Paul Hinze
1f5cc4e1e8 Merge pull request #2719 from lgarron/sha256
Change the template hash function to SHA-256.
2014-02-08 12:20:33 -06:00
Roland Walker
65292780aa exit with errorcode 1 when a list error occurs
Fixes #2817.  This is now more consistent with Homebrew's
`list`, though not completely, because Homebrew's `list`
refuses to give any output when there is an invalid Formula
argument.  Our `list` stumbles forward instead, giving such
output as is possible based on valid args, but still exiting
with error when invalid args are seen.
2014-02-08 10:03:26 -05:00
Lucas Garron
913f3e6f76 Change default hash to SHA-256. 2014-02-05 18:16:18 -08:00
Roland Walker
3a1c9484a3 Divide search output into sections
typically "Exact Match" and "Partial Matches"
2014-01-31 20:20:30 -05:00
Roland Walker
06395054d6 doubledash hygiene for external cmd: open 2014-01-31 13:05:09 -05:00
Roland Walker
28a84baf92 Merge pull request #2545 from rolandwalker/search_followups
search docs/test/fix tapname-search
2014-01-29 09:14:26 -08: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
36bd6f7554 Merge pull request #2576 from rolandwalker/project_homepage
`brew cask home` with no args opens project page
2014-01-28 06:30:15 -08:00
Roland Walker
73a7ea3cc2 Merge pull request #2593 from rolandwalker/doctor_arch
add architecture to `brew cask doctor`
2014-01-27 18:13:45 -08:00
Roland Walker
768b21eae8 always submit external commands in list form
For safety.
- This is a step toward reworking system_command.rb so that
invocations are done in list form on the back end, avoiding
surprises from quoting and shell metacharacters.
- There is one transitional hack here: the _quote method in
Cask::SystemCommand is modified to avoid double-quoting.  The
_quote method itself will go away in a future revision when
only list-forms are used.
- Casks using system are not touched. It seems natural to
address that when creating the DSL for after_install/before_install.
2014-01-24 20:58:03 -05:00
Roland Walker
eaadc663be add architecture to brew cask doctor 2014-01-24 10:58:07 -05:00
Paul Hinze
ce615d54b9 Merge pull request #2418 from rolandwalker/doctor_version
Numerous additions to "brew cask doctor"
2014-01-24 07:50:22 -08:00
Roland Walker
a5ce3cdbd8 search docs/test/fix tapname-search
This is the promised followup to #2496
- docs
- test
- bugfix: search string was being tested against fully-qualified
  Cask name including Tap, so "brew cask search phinze" would
  (confusingly) return all Casks.
2014-01-23 17:50:45 -05:00
Roland Walker
e42f0f8dc1 Merge pull request #2546 from rolandwalker/indenting
indent to two spaces
2014-01-23 14:45:16 -08:00
Roland Walker
19f4ce3cfb brew cask home with no args opens project page
- in duplication of similar functionality in Homebrew
- in celebration of proposed design by @ndr-qef
2014-01-23 17:17:33 -05:00
Roland Walker
7a0f9ef37f always use full path to external utilities
per #2029
2014-01-23 12:20:32 -05:00
Roland Walker
da520b82f0 Numerous additions to "brew cask doctor"
New versions, paths, environment variables, and tests.
Side effect: release version must be stored in two locations.
2014-01-22 15:20:05 -05:00
Roland Walker
9b54342e42 indent to two spaces
This patch contains only whitespace changes, plus a short
addition to CONTRIBUTING.md on the project-wide indent style
2014-01-22 13:08:34 -05:00
Roland Walker
619e4d7187 Merge pull request #2496 from rolandwalker/search_only_alpha
ignore non-alpha search chars; accept multi terms
2014-01-22 08:29:44 -08:00
Roland Walker
329c48298a caveats first-class in DSL, gets own mini-DSL
Make caveats a first-class member of the Cask DSL.  It no longer has to
be specified with "def caveats", but can be given as "caveats do ... end"
as with after_install blocks.

In addition, create a mini-DSL which can be used within caveats blocks,
providing standard messages when manual installers must be used,
reboot-required, etc.

Add alternate form: caveats can also accept a compile-time string for
simple cases.

This is 99% compatible with old Casks, as it still works by defining
a caveats method.  However, all Casks containing caveats are cleaned
up and adapted according to the new DSL.

Full docs in CONTRIBUTING.md.
2014-01-20 11:54:46 -05:00
Roland Walker
212dc25941 ignore non-alpha search chars; accept multi terms 2014-01-20 00:14:50 -05:00
Roland Walker
283160b1e7 search.rb cleanups
- whitespace
- variable names: in particular, "casks" is a poor name for a
  variable that does not hold instances of Cask
2014-01-20 00:02:12 -05:00
Võ Anh Duy
38688aa755 Improve cash search
Ignore all the hyphens in cask title and search term

make "brew cask search" ignore case like #2461

restore search by regular expression feature
2014-01-20 11:47:56 +07:00
Roland Walker
b58dd3e568 make "brew cask search" ignore case 2014-01-17 21:49:20 -05: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
Roland Walker
d120d3b1a8 add command "brew cask doctor"
pursuant to discussion in #2275
2014-01-06 11:50:17 -05: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
6fa34a8e3e Merge pull request #2051 from rolandwalker/uninstall_flags
flag handling consistent btw install/uninstall
2013-12-14 07:07:45 -08:00
Paul Hinze
0c6e97b8fd use absolute paths for all commands
closes #2029
2013-12-14 08:48:40 -06:00
Roland Walker
ce4b83984c flag handling consistent btw install/uninstall
This makes uninstall process flag arguments in the same manner
as install. Any argument with a leading dash is assumed to be a
flag, not a Cask.  Argument processing still needs work, unknown
flags and spelling errors are silently accepted.
2013-12-11 17:15:33 -05:00
Paul Hinze
d5b4c9d044 support --verbose flag for pkg installer
refs #1976
2013-12-08 10:36:17 -06: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
Shane Watson
0627d3a909 Use exit codes 2013-11-10 13:30:11 -08:00