Commit Graph

351 Commits

Author SHA1 Message Date
Vítor Galvão 0d4e59c4aa removed tags from tests 2015-12-24 17:01:28 +00:00
Josh Hagins fbfa795683 Use shared examples to DRY up *flight tests 2015-12-21 19:39:23 -05:00
adityadalal924 47261a4b1d remove appcast :format stanza 2015-12-20 11:15:27 -05:00
Vítor Galvão 26153073f2 cat_test.rb: fix syntax inconsistencies 2015-12-20 00:57:32 +00:00
Josh Hagins f25b6babcd Merge pull request #15913 from jawshooah/remove-dsl-versions
Remove DSL versions from all casks
2015-12-17 20:46:23 -05:00
Vítor Galvão e9a18e907f dsl_test.rb: make issues url point to reporting-bugs instructions 2015-12-18 01:31:57 +00:00
Josh Hagins 852275c8d5 Remove DSL versions in test casks 2015-12-17 20:08:25 -05:00
Josh Hagins 25f7cfee04 Remove DSL versions in docs and scripts
Closes #15912.
2015-12-17 19:57:15 -05:00
Josh Hagins 81b91434dc Do not require a DSL version in cask header
Following up on #15782. Casks can now be created with no DSL version in
the header. For example:

  cask 'no-dsl-version' do
    version :latest
    ...
  end

Casks with a DSL version in the header are still valid, but the DSL
version will be ignored.
2015-12-17 14:56:08 -05:00
Josh Hagins 64d142af6e Add test for zap :login_item 2015-12-11 23:55:04 -05:00
Josh Hagins 5fa16a51a0 Uninstall login items with uninstall :login_item 2015-12-11 23:47:46 -05:00
Josh Hagins c65720470c Remove extra space in update command
I assume this is the more commonly used form. I've never seen anyone space out
their semicolons like `foo ; bar`.
2015-12-10 11:19:38 -05:00
Vítor Galvão 5e79596ef7 long update command now uses ';' instead of '&&' 2015-12-09 17:18:46 -05:00
Mike McQuaid fdb4577be8 brew-cask: move to using tap cmd directory.
This provides a few benefits:

- faster `brew cask` execution times as another Ruby process is not
  needed. Cask can instead be loaded in-process with Homebrew. This
  will also make it easier to use some of Homebrew's core code and
  ease moving code from Cask into Homebrew core.
- Users do not need to `brew upgrade` Cask any more: it's done
  automatically on any `brew update` or `git pull` of the Cask tap.
2015-12-09 19:32:49 +00:00
Josh Hagins 32364632be Include Hbc::Staged module in Hbc::DSL::Preflight 2015-09-05 13:41:46 -04:00
Josh Hagins c0ed120631 Expand tilde in uninstall :delete 2015-08-02 20:25:15 -04:00
Josh Hagins 4921567379 Add specs for Staged module helpers to uninstall_preflight_test 2015-08-02 01:41:29 -04:00
Josh Hagins 4e12c8a84c Reorder postflight specs
Put specs for methods inherited from the Staged module before those
specific to Postflight.
2015-08-02 01:40:27 -04:00
Josh Hagins c38110bcec Teach set_permissions and set_ownership to accept multiple paths 2015-08-02 00:54:11 -04:00
Josh Hagins 0acbe2ac46 Add specs for DSL::Postflight#{set_permissions,set_ownership} 2015-08-01 23:43:54 -04:00
Roland Walker 5eec0916c4 attempt to clean up launchctl plists on uninstall
separate `launchctl unload` and comment that this command was
intended for unloading jobs by pathname rather than bundle ID.
Leave that undocumented for now as it is untested.
2015-07-26 16:52:05 -04:00
Andrew Kitchen 8e7a958b6f Allows accessibility entry to be updated if previously installed 2015-06-07 09:18:36 -07:00
Paul Hinze b1d621503d internal: spec-ify SystemComand tests 2015-02-08 09:17:23 -06:00
Roland Walker add0279512 Merge pull request #9478 from caskroom/rename-cleanup-cli-option
cli: [refactor] rename outdated option internally
2015-02-07 19:12:13 -05:00
Paul Hinze 5bbba24bf9 cli: [refactor] rename outdated option internally
The `Hbc.outdated` boolean was in the way of my implementation of an
`outdated` scope for `brew cask outdated`, so I took the opportunity to:

 * rename the flag internally to `cleanup_outdated`
 * move the cleanup tests over to rspec and rework them to test in a
   stubbed cleanroom environment
 * refactor the implementation of cleanup to make it a bit more
   testable - most importantly: inject the cache location and outdated
   config dependencies instead of looking them up from constants

Note that there's no change to the user-facing interface, it's still

```
brew cask cleanup --outdated
```
2015-02-07 18:06:51 -06:00
Paul Hinze 63d748e14c core: [refactor] separate Hbc::Cask from Hbc
Hbc is the namespace, Hbc::Cask is the object representing a Cask

One step on the path to reducing the surface area of the God-object
we've grown over the years. :)
2015-02-07 16:37:32 -06:00
Radek Simko 6b3146aed6 binary_test (minitest) -> binary_spec (rspec) 2015-01-24 20:01:54 +00:00
Vítor Galvão 078f0b0300 removed alfred support 2015-01-13 17:49:32 +00:00
ndr d5722ee079 Merge pull request #8751 from vitorgalvao/remove-widget-support
Remove support for widgets
2015-01-11 12:29:00 +00:00
Vítor Galvão 529bd801e4 Removed support for widgets
Closes #2206.
2015-01-08 19:51:15 +00:00
Roland Walker b40b0c99e1 strip constants from homebrew-fork global.rb
and corresponding testing_env.rb.
* recast HOMEBREW_BREW_FILE as Hbc.homebrew_executable,
  defined in Hbc::Locations
* recast HOMEBREW_REPOSITORY as Hbc.homebrew_repository
* recast HOMEBREW_PREFIX as Hbc.homebrew_prefix
* remove HOMEBREW_LIBRARY
* recast existing Hbc.tapspath as Hbc.homebrew_tapspath
  to match new methods

fixes #8705
2015-01-07 09:09:53 -05:00
Roland Walker 202d6019f8 Move all code under an Hbc:: namespace
* convert existing Cask:: namespace to Hbc::
* move Homebrew-fork code under Hbc::
* move freestanding classes such as Tty and TopologicalHash under Hbc::
* recast HOMEBREW_CASK_ constants as HBC_
* modify our Homebrew Formula for backward compatibility
* devscripts and dev docs
2015-01-02 07:27:03 -05:00
Roland Walker 43ab87b480 Merge pull request #8539 from rolandwalker/incorporate_homebrew_macos
incorporate a modified homebrew-fork `OS::Mac` into our codebase as `Cask::MacOS`
2014-12-30 17:16:24 -05:00
Roland Walker 13085c7e26 incorporate homebrew-fork OS::Mac as Cask::MacOS
temporarily define ::MacOS = Cask::MacOS pending updates
to the DSL (it should be visible at the top level only
within Casks.)
2014-12-30 11:29:46 -05:00
Roland Walker ec89e5d26b recast class OS::Mac::Version as OS::Mac::Release 2014-12-30 11:20:21 -05:00
Roland Walker 74b46f7e92 Check for libpng to assure X11 detection
Based on Homebrew's xquartz.rb.  Improves Yosemite specifically.
Fixes #8483
2014-12-30 09:59:28 -05:00
ndr 68d7901e44 Add tests for depends_on :cask 2014-12-29 17:47:55 +00:00
Roland Walker cc84f6ecd5 don't monkeypatch MacOS#release
* complete transition from MacOS#version to MacOS#release
  throughout backend code
* recast related constants and comments as "release" instead
  of "version", and "point release" instead of "full version"
2014-12-27 09:19:38 -05:00
ndr a944a5a69f Actually test for multiple `depends_on :formula` 2014-12-26 21:39:39 +00:00
Roland Walker 05d6afa2ac remove homebrew-fork Pathname#/ monkeypatch
in favor of ordinary Pathname#join.  This was already the rule
for our codebase except for some areas of the test suite.
2014-12-26 11:06:34 -05:00
Roland Walker 05690689bc Remove homebrew-fork Checksum class and refactor
* perform actual checksum calculation within download.rb
* use an accessor named sha256 instead of sums for checksum data
* migrate checksum-specific exceptions out of homebrew-fork
2014-12-23 11:08:45 -05:00
Roland Walker 140613cbb5 update license comment in brew cask create 2014-12-20 10:35:28 -05:00
Roland Walker 68f1c782a6 port PrettyListing class from Homebrew-fork
and simplify it considerably
2014-12-17 07:33:06 -05:00
Roland Walker 6c41fe493b remove docs and code relevant to Ruby 1.8 compat 2014-12-16 08:50:33 -05:00
Claudia e3c617b6f4 When handling errors or missing methods, the CLI now suggests updating
This helps cut trivial issues that would be easily fixable by doing `brew update && …`.
2014-12-12 19:50:19 +01:00
Roland Walker e5d4765135 Merge pull request #7933 from rolandwalker/comment_unknown_license
mark `license :unknown` with explicit todo comment
2014-12-10 08:42:18 -05:00
Roland Walker b3836f581d recast info_plist as info_plist_file 2014-12-09 10:47:23 -05:00
Roland Walker 568a8229c3 mark license :unknown with explicit todo comment 2014-12-09 07:48:45 -05:00
Roland Walker 82826b2687 DSL: add `accessibility_access` stanza
* accepts a Boolean value
* replaces the never-documented `postflight` methods `enable_accessibility_access` /
 `disable_accessibility_access` (`remove_accessibility_access`)
* declarative: unlike the `postflight` approach, does not have to be
  invoked in two places
* de-document obsolete form `caveats` / `assistive_devices`
* bump Travis seed to avoid false test failures
2014-12-08 19:17:19 -05:00
Roland Walker daaf5ad89b missing stubs
can't hurt
2014-12-08 10:32:18 -05:00