Commit Graph

48 Commits

Author SHA1 Message Date
Josh Hagins 003bbb14ba Intercept --help flag, treat as help cmd 2016-01-17 22:09:49 -05:00
Josh Hagins b9b1a7f807 Add `style` subcommand to run RuboCop against args 2016-01-16 18:19:31 -05:00
Vítor Galvão c87a957943 spec: appcast-sha256 to appcast-checkpoint 2016-01-13 19:26:39 +00:00
Josh Hagins 99c96c0fc1 Fix tests broken by changing casks from classes to instances 2016-01-06 10:33:03 -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 af15dc5131 Merge pull request #16296 from jawshooah/rspec-random-order
RSpec: run specs in random order, same as MiniTest
2016-01-02 17:33:17 -05:00
Josh Hagins 2a0d04235c Treat --version like a positional argument in subcommand 2016-01-02 16:02:02 -05:00
Josh Hagins ff4ed36cc0 Fix temporal dependency in binary_spec 2016-01-02 15:41:00 -05:00
Josh Hagins 199eb6ae94 Merge branch 'master' into sourceforge-osdn 2015-12-31 13:19:15 -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 f6edf33dae spec: sourceforge-other to sourceforge-version-latest 2015-12-31 15:28:29 +00:00
Vítor Galvão c10bcac428 spec: also consider osdn format 2015-12-31 14:56:40 +00:00
Vítor Galvão b7c585da31 Revert "Delete Subversion support" 2015-12-29 15:22:57 +00:00
Josh Hagins 5daf6f1cba Audit: further spec enhancements and refactoring 2015-12-27 22:27:01 -05:00
Josh Hagins b4d4811f77 DRY up tests for required stanzas 2015-12-27 19:18:50 -05:00
Josh Hagins d7344feb5a Amend wording in sha256 audit spec 2015-12-27 18:52:13 -05:00
Josh Hagins cbf00b1023 Add audit checks for appcast
Check that appcast sha256:
  - exists
  - is a string of 64 hexadecimal characters
  - is not the sha256 for the empty string
2015-12-27 18:46:37 -05:00
Josh Hagins 4706c4f38a Test audit for invalid sha256 values 2015-12-27 18:46:37 -05:00
Josh Hagins a2be75aa4a Test that audit shows an error for missing name 2015-12-27 18:46:37 -05:00
Josh Hagins 75f4f03069 Test that audit shows an error for missing license 2015-12-27 18:46:37 -05:00
Vítor Galvão 3049279582 removed svn from core 2015-12-25 18:42:02 +00:00
Josh Hagins c0848ba9bf Add specs for Verify and Verify::Checksum 2015-12-23 22:45:08 -05:00
Sean Smith 64db9962a2 Changing Fake User Agent
Per #11349, adjusting the fake user-agent string to something Core
is ok with.
2015-06-20 11:50:16 -04: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 226da2fe1d Add test for creating binarydir if it doesn't exist 2015-01-24 22:54:33 +00:00
Radek Simko adc695a035 Test casks decoupled 2015-01-24 21:12:26 +00:00
Radek Simko ab8d31ab16 TempEnvVarHelper -> EnvHelper placed into its own class (avoid monkey patching) 2015-01-24 20:57:18 +00:00
Radek Simko 6b3146aed6 binary_test (minitest) -> binary_spec (rspec) 2015-01-24 20:01:54 +00:00
Roland Walker a146a1c313 Merge pull request #8721 from rolandwalker/integrate_download_strategy
partial merge of homebrew-fork download_strategy
2015-01-07 18:19:12 -05:00
Roland Walker 526c8c08e7 cleaner way to allow spec test to run
without creating unwanted directories
2015-01-07 09:06:06 -05:00
Roland Walker 9deef47e2e partial merge of homebrew-fork download_strategy
merge module Hbc::DownloadStrategy and class Hbc::HbAbstractDownloadStrategy
into class Hbc::AbstractDownloadStrategy
2015-01-07 05:34:03 -05:00
Roland Walker ef3d7c90d4 remove homebrew-fork resource.rb
* Most of what the Resource class does, we do (or can easily do) with
[`url.rb`](https://github.com/caskroom/homebrew-cask/blob/remove_homebrew_fork_resource/lib/hbc/url.rb)
* adjust our download_strategy.rb to compensate
* adjust homebrew-fork download_strategy.rb to compensate
* add parentheses in homebrew-fork download_strategy.rb
2015-01-02 09:43:14 -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 0bdc8cf99e actually require all required stanzas
* audit tests match the documentation
* require `license`
* require at least one activatable artifact (or explicit `stage_only`)
2014-12-20 11:34:49 -05:00
Roland Walker 1413bea1c0 `sha256 :no_check` overrides `version <string>`
This behavior was traditionally present, and is now recovered
by removing the audit test added in #4743.  The doc is clarified
but did not require major change.

closes: #6356
refs: #8179
2014-12-17 08:21:51 -05:00
Roland Walker 6c41fe493b remove docs and code relevant to Ruby 1.8 compat 2014-12-16 08:50:33 -05:00
Roland Walker 6f759e07ae disable test which writes outside test dir
invoking Cask.init attempts to actually `mkdir /custom/caskdir`
2014-12-11 10:49:45 -05:00
Roland Walker a6bc35cfa8 remove support for `title` method in Casks
obsoleted by `token`
2014-12-05 18:41:24 -05:00
Roland Walker a335d3b06d unify and recast "Cask name" & "title" as "token"
* "Canonical App Name" becomes "Simplified App Name"
* devscript `cask_namer` renamed to `generate_cask_token`
* doc file `CASK_NAMING_REFERENCE.md` renamed to `cask_token_reference.md`
* DSL uses `"#{token}"` for interpolation instead of `"#{title}"`
* documentation text
* backend code (variables, method, class names)
* error message text
* tests
* code comments
* Cask comments
* emphasize `tags :name`
* doc: use "vendor" consistently instead of "developer"
* doc: many man page argument descriptions were incorrect
* incidental clarifications

Many backend variables similar to `cask_name` or `cask` have
been standardized to `cask_token`, `token`, etc, resolving a long-
standing ambiguity in which variables named `cask` might contain
a Cask instance or a string token.

In many places the docs could be shortened from "Cask name" to
simply "token", which is desirable because we use the term "Cask"
in too many contexts.
2014-12-01 11:00:23 -05:00
Roland Walker 707db75505 standardize Cask (capitalized) when used as noun
* was already done, but inconsistently
* this style follows homebrew Formula
* covers user-facing messages, test titles, comments
* some related minor orthography is included, such
  as the consistent spelling of our project name as
  "homebrew-cask"
* grammar nits
2014-10-08 10:39:51 -04:00
Roland Walker 6d82c9770e change docs/tests to use version :latest
Instead of version 'latest' (value as string).  The string
value is still permitted during a transitional period.
2014-09-17 07:22:33 -04:00
Paul Hinze 63a32ef021 rspecify scopes and download strategy tests
refs #5080
2014-06-29 14:56:47 -05:00
Paul Hinze 58d4c745a9 install rspec; move first few tests over
refs #5080
2014-06-29 11:33:22 -05:00