Commit Graph

1214 Commits

Author SHA1 Message Date
Josh Hagins 0aca2a124d Allow tokens passed to `brew cask style` to end with `.rb`
Fixes #19072
2016-02-20 00:00:04 -05:00
ilovezfs 70b35d7a5e Run Hbc.init only when needed
Creating directories should be deferred until needed.

Override the needs_init? method and return true if a command needs init.

Currently, only `brew cask install` needs init. Other read-write
operations should fail naturally if Hbc.init has never been run.
2016-02-10 07:11:55 -08:00
Josh Hagins 43b16bc0d7 Update rubocop and rubocop-cask dependencies 2016-02-05 22:09:50 -05:00
Josh Hagins 003bbb14ba Intercept --help flag, treat as help cmd 2016-01-17 22:09:49 -05:00
Josh Hagins 7c3c991444 Use pessimistic lower bound for RUBOCOP_CASK_VERSION 2016-01-17 21:46:01 -05:00
Josh Hagins b9b1a7f807 Add `style` subcommand to run RuboCop against args 2016-01-16 18:19:31 -05:00
Josh Hagins f9df5cf7f3 Add install_gem_setup_path! helper from Homebrew 2016-01-16 18:19:31 -05:00
Vítor Galvão 3876fce011 Merge pull request #17023 from caskroom/installer-unpack
installer.rb: clarify "not able to unpack" message
2016-01-15 14:14:35 +00:00
Vítor Galvão 32806fe45b installer.rb: clarify "not able to unpack" message 2016-01-14 12:54:46 +00:00
Vítor Galvão e22490b03e appcast: remove latest_version 2016-01-14 00:13:09 +00:00
Vítor Galvão 700a024c33 appcast.rb: appcast-sha256 to appcast-checkpoint 2016-01-13 19:26:39 +00:00
Vítor Galvão c1ac0e4656 audit: appcast-sha256 to appcast-checkpoint 2016-01-13 19:26:39 +00:00
Vítor Galvão b7e052d637 Merge pull request #16594 from vitorgalvao/java-caveat
Java caveat
2016-01-08 16:42:51 +00:00
Josh Hagins d90248a853 Merge pull request #16593 from jawshooah/quiet-cleanup-when-no-cache
Don't output cleanup size if no files removed
2016-01-08 11:19:02 -05:00
Vítor Galvão 537f378a2b core: more flexibity with depends_on_java 2016-01-08 15:05:47 +00:00
Josh Hagins 846ff35f5d Don't output cleanup size if no files removed 2016-01-08 09:38:02 -05:00
Vítor Galvão 820be31808 Merge pull request #16385 from vitorgalvao/java-caveat
Java caveat
2016-01-08 14:20:33 +00:00
Josh Hagins b390b68a97 Merge pull request #16399 from jawshooah/casks-as-instances
Load casks as instances of Hbc::Cask rather than subclasses
2016-01-08 07:31:39 -05:00
Josh Hagins 20cfa9d8c5 Tell the user how much disk space was freed after cleanup 2016-01-08 03:42:00 -05:00
Josh Hagins 8d9a65b49b It's Ruby, use OOP! 2016-01-08 03:41:54 -05:00
Josh Hagins d7e3e00175 Rename Cleanup#cleanup_outdated to outdated_only 2016-01-08 03:41:54 -05:00
Josh Hagins 2d70f2c784 Memoize casks in Scopes.all for speed 2016-01-07 23:45:40 -05:00
Josh Hagins 8ee120b1e6 Fix explanatory comment in Scopes.all_tokens 2016-01-07 23:45:16 -05:00
Josh Hagins 9f57c7ff9a Use keyword arguments in Hbc::Cask constructor 2016-01-06 10:33:03 -05:00
Josh Hagins ca8b390443 Replace `full_name` with `name`
Casks are no longer classes, so there's no conflict for `name` anymore
2016-01-06 10:33:03 -05:00
Josh Hagins 2edb8af7d4 Minor optimization to speed up recurring calls to Hbc.installed 2016-01-06 10:33:03 -05:00
Josh Hagins 99c96c0fc1 Fix tests broken by changing casks from classes to instances 2016-01-06 10:33:03 -05:00
Josh Hagins c1d5a2264e Load casks as instances of Hbc::Cask rather than subclasses 2016-01-06 10:31:59 -05:00
Vítor Galvão 1f56c6bc4f Merge pull request #16389 from Amorymeltzer/clarify-resources
Attempt clearer language for fetch and resources
2016-01-06 13:26:59 +00:00
Amory Meltzer cc589ca799 Attempt clearer language for fetch and resources 2016-01-05 10:44:53 -08:00
Vítor Galvão 58f74c4b2e core: added depends_on_java caveat 2016-01-05 15:11:56 +00:00
Josh Hagins 07c5266e54 Use all-caps TODO in generated comment for license :unknown 2016-01-05 01:37:51 -05:00
Josh Hagins e42966644c Add `brew untap phinze/cask` to UPDATE_CMD 2016-01-04 23:22:19 -05:00
Josh Hagins a23e270414 Use global var $stderr instead of constant STDERR 2016-01-04 18:15:28 -05:00
Josh Hagins 205ccc3c3a Print error messages to stderr 2016-01-04 18:15:19 -05:00
Josh Hagins 70022ba549 Add 'brew uninstall --force brew-cask' to Hbc::Utils::UPDATE_CMD 2016-01-04 17:40:51 -05:00
Josh Hagins 3058ed94ab Print error message with suggestions if header parse failed 2016-01-04 17:40:51 -05:00
Josh Hagins be1d76ddae Fix typo in UninstallBase#get_unix_pids 2016-01-03 16:29:09 -05:00
Josh Hagins 385701cac4 Reinstate :trash as a synonym for :delete (was a no-op) 2016-01-03 16:29:09 -05:00
Josh Hagins 606d0da394 Make uninstall_early_script delegate to uninstall_script 2016-01-03 16:29:09 -05:00
Vítor Galvão 0275e696d1 add before/after_comma/colon 2016-01-03 18:43:59 +00:00
Vítor Galvão 1ecd8b0585 remove before/after_slash 2016-01-03 18:41:09 +00:00
Josh Hagins 2a0d04235c Treat --version like a positional argument in subcommand 2016-01-02 16:02:02 -05:00
Josh Hagins 199eb6ae94 Merge branch 'master' into sourceforge-osdn 2015-12-31 13:19:15 -05:00
Josh Hagins 9a0153c550 Further refactor divider deletion and conversion method code 2015-12-31 13:01:22 -05:00
Josh Hagins 15b7d86d87 Refactor divider deletion and conversion method generator code 2015-12-31 12:58:29 -05:00
Josh Hagins 7cbe4262b3 Add Hbc::DSL::Version wrapper class 2015-12-31 12:06:16 -05:00
Josh Hagins 8612f74638 Minor refactoring of audit and audit_spec 2015-12-31 12:06:16 -05:00
Vítor Galvão 49fc58b76d audit: made check for bad url formats more generic 2015-12-31 15:28:29 +00:00
Vítor Galvão 59ce7b53a2 audit.rb: also check for bad osdn format 2015-12-31 14:22:09 +00:00