Commit Graph

467 Commits

Author SHA1 Message Date
Josh Hagins 7b486a827f Add support for RSpec-style shared examples in MiniTest 2015-12-21 19:39:21 -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 feba4ec740 Remove DSL versions from all casks 2015-12-17 20:15:28 -05: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 b069d1ee51 Move .rubocop_todo.yml from to TOPLEVEL_FILES
IGNORE_FILES is not meant to include files tracked in the repository.
2015-11-24 19:48:01 -05:00
Vítor Galvão 533ff608ba Create .gitattributes 2015-09-21 13:57:20 +01:00
William Boman 18259219d7 add .editorconfig file 2015-09-08 01:42:23 +01: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
Josh Hagins 37f42f90df Report test coverage with coveralls 2015-03-17 21:20:41 -04:00
Josh Hagins d3ba0471e0 Add rubocop config files to layout_test.rb 2015-03-06 19:08:10 -05: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 36b8903a36 flatten homebrew-fork and move it under vendor/lib
* remove transitional modifications to $LOAD_PATH
* all require statements are now explicit about loading from homebrew-fork
2014-12-31 07:57:18 -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 13391af9a9 Merge pull request #8318 from rolandwalker/explicit_ruby_2_requirement
explicitly require Ruby 2.0 at all entry points
2014-12-22 07:20:00 -05:00
Roland Walker 22dc95872c add license stanza to test Cask
to make tests pass after requiring `license`
2014-12-20 11:34:20 -05:00
Roland Walker 140613cbb5 update license comment in brew cask create 2014-12-20 10:35:28 -05:00