Commit graph

820 commits

Author SHA1 Message Date
Roland Walker
136d7fd6c1 read RbConfig in doctor.rb
instead of depending on Homebrew-defined constant.  This
is simpler now that we assume Ruby 2.0
2014-12-19 10:30:14 -05:00
Roland Walker
a0c86c4cd5 remove utf-8 encoding cookie 2014-12-18 13:28:00 -05:00
Roland Walker
01816f96cc Merge pull request #8221 from rolandwalker/honest_doctor_homebrew
Adjust `brew cask doctor` for homebrew-fork
2014-12-18 13:20:53 -05:00
Roland Walker
aa17125f32 remove homebrew-fork software_spec.rb
this was required explicitly from Homebrew-cask, but apparently
is not needed
2014-12-18 12:01:23 -05:00
Roland Walker
d76794c3a2 make render_load_path understand homebrew-fork
tweak doctor's warnings/annotations on `$LOAD_PATH` elements
2014-12-18 11:08:34 -05:00
Roland Walker
b1c3a4f600 doctor: ignore internal HOMEBREW_VERSION constant
Instead extract it from the brew CLI, and consider
removing it from our doctor output entirely.
2014-12-18 11:08:34 -05:00
Roland Walker
58c2f16633 doctor: ignore internal HOMEBREW_CELLAR constant
Instead extract it from the brew CLI, and consider
removing it from our doctor output entirely.
2014-12-18 11:08:34 -05:00
Roland Walker
df8835ab73 doctor: ignore internal HOMEBREW_REPOSITORY const
...constant. Instead extract it from the brew CLI, and consider
removing it from our doctor output entirely.
2014-12-18 11:08:34 -05:00
Roland Walker
d8a94da60f Merge pull request #8193 from rolandwalker/remove_homebrew_install_tap
don't invoke internal Homebrew method `Homebrew.install_tap`
2014-12-17 18:41:22 -05:00
Roland Walker
04dddb8e03 Merge pull request #8189 from rolandwalker/port_homebrew_prettylisting
port PrettyListing class from Homebrew-fork
2014-12-17 18:41:13 -05:00
Roland Walker
2fa0281589 don't invoke method Homebrew.install_tap
* invoke `brew` executable for the equivalent action
* remove `cmd/tap.rb` from homebrew-fork
2014-12-17 09:48:20 -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
68f1c782a6 port PrettyListing class from Homebrew-fork
and simplify it considerably
2014-12-17 07:33:06 -05:00
Roland Walker
ae133faf2f Merge pull request #8152 from rolandwalker/ruby_2_0_transition
remove docs and code relevant to Ruby 1.8 compatibility
2014-12-16 21:18:10 -05:00
ndr
78b8d01592 Merge pull request #8156 from rolandwalker/rename_gpg_file
rename `gpg.rb` to `gpg_check.rb` to match class name
2014-12-16 17:38:24 +00:00
Roland Walker
50294ef0ce cut v0.51.1 2014-12-16 10:15:50 -05:00
Roland Walker
b6fafef797 rename gpg.rb to gpg_check.rb to match class name 2014-12-16 09:30:18 -05:00
Roland Walker
52c322dbb9 rm Homebrew internal method in Cask::CLI::Update
fixes #8153
2014-12-16 09:26:39 -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
86556d4a59 cut v0.51.0 2014-12-16 08:15:31 -05:00
Roland Walker
af363f1280 remove undocumented license :abandoned 2014-12-15 07:33:33 -05:00
Roland Walker
974e11f639 delete undocumented license :trial
per discussion in #8084
2014-12-13 13:52:21 -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
Sébastien Gross
8ca2b12e92 Add :bsexec option to command.run
* Similar to `:sudo`, gives the ability to run an external command
  within a given context.
* Exposes `:bsexec` in DSL; not yet documented
* Fixes #7132 (mount dmg image fails if user does not have StartupItemContext(8))
2014-12-12 11:38:41 -05:00
Roland Walker
d96c17b9db enable license :freemium 2014-12-11 09:42:24 -05:00
Roland Walker
bf99c6b0a3 Store metadata with installed Casks.
Step 2: Snapshot the Cask file used at install-time, using
the previously-merged metadata directory support.

Using a simple filesystem-is-a-database approach, we set up a
`.metadata` directory for each installed Cask in which we can
record any information, starting with a copy of the Cask
definition which was used at install-time.

This should be useful for various cases such as:
- a fallback when the Cask was renamed/removed.  We
  currently cannot recover any uninstall info in that
  scenario
- installation of multiple versions of the same software

There might be a smarter way to discover the source filename
for the Cask through introspection or some deep Ruby voodoo.
All I could come up with was to pass the filename in on the
constructor, which seems perfectly reasonable if voodoo is
not available.  The existing code was taking the title as an
argument to the constructor, which is dispensable.

This PR contains no code to actually make use of the metadata,
but only takes care of the relevant book-keeping: creation,
destruction, as well as organization of metadata according to
software version number and timestamp.
2014-12-10 18:24:43 -05: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
2c3119da03 cut v0.50.0 2014-12-09 19:56:19 -05:00
Roland Walker
542fd838e6 Merge pull request #7958 from rolandwalker/return_path_from_fetch
return tarball_path from fetch method
2014-12-09 19:15:04 -05:00
Roland Walker
93b348b480 Merge pull request #7936 from rolandwalker/macos_release_alias
add `MacOS.release` alias for `MacOS.version`
2014-12-09 18:49:59 -05:00
Roland Walker
dc30c6fb90 Merge pull request #7940 from rolandwalker/postflight_user_errors
sanity checks and error handling in postflight mini-DSL
2014-12-09 18:49:38 -05:00
Roland Walker
6ef309aff0 return tarball_path from fetch method
fixes #7946
2014-12-09 18:43:24 -05:00
Roland Walker
2e2023b88b Be more consistent/liberal about stanza accessors.
Return the current value whenever the stanza method is called
without arguments, including when the stanza has no value.  Do
not attempt to construct an instance with no arguments (which
typically throws an exception).

Incidental comment re: depends_on

Refs #7880
2014-12-09 11:16:48 -05:00
Roland Walker
a808befdd6 sanity checks/error handling, postflight miniDSL
report errors in all user-facing methods
2014-12-09 10:49:03 -05:00
Roland Walker
b3836f581d recast info_plist as info_plist_file 2014-12-09 10:47:23 -05:00
Roland Walker
6da48b07a3 add MacOS.release alias for MacOS.version
* to match phrasing in our documentation
* to distinguish against the Cask `version` (of which there may
  be more than one in the future)
* better fit with symbolic release names eg `:yosemite`
* `MacOS.release` itself is intentionally undocumented pending
  the next code release
2014-12-09 08:45:37 -05:00
Roland Walker
568a8229c3 mark license :unknown with explicit todo comment 2014-12-09 07:48:45 -05:00
Roland Walker
65a71e75eb remove assistive_devices caveats method
backward-compat, replaced by toplevel `accessibility_access`
2014-12-08 19:26:13 -05:00
Roland Walker
972883e6c2 Merge pull request #7898 from rolandwalker/internal_stanza_installer
enable `installer` artifact in `_stanza` verb
2014-12-08 19:24:47 -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
00217148ef enable installer artifact in _stanza verb
Since `installer` is a type of artifact, it must be listed
explicitly, though this repetition indicates poor design.
2014-12-08 10:39:15 -05:00
Roland Walker
2e71e5110d remove newlines from runtime bundle IDs
* create `staged_test.rb` for testing staged Casks
* test an actual staged Cask rather than mocking
2014-12-08 10:32:18 -05:00
Roland Walker
98fa063277 Merge pull request #7895 from claui/fix-system-command-exit-status
In `SystemCommand`, fix `success?` and `exit_status`
2014-12-08 10:31:06 -05:00
Claudia
7f5dc211ba In SystemCommand, fix success? and exit_status
When invoking a `SystemCommand` with `:must_succeed => false`, the `SystemCommand::Result` class would mistake a `Process.Status` object for a `Fixnum`.

This commit fixes this by instantiating `Result` with the actual status code as a number.
2014-12-08 15:53:35 +01:00
Roland Walker
25ff85451d Merge pull request #7893 from claui/fix-brew-cask-dump-ruby18
Fix an issue with `--debug` and `_dump` on Ruby 1.8.7
2014-12-08 07:50:46 -05:00
Roland Walker
1ddbf0e72e Merge pull request #7848 from rolandwalker/remove_x11_required
remove `caveats` / `x11_required`
2014-12-08 05:41:00 -05:00
Roland Walker
09bed7a53b Merge pull request #7845 from rolandwalker/depends_on_x11
DSL: add `depends_on :x11`, permit multiple `depends_on` stanzas
2014-12-08 05:40:45 -05:00
Claudia
5eb24daada Fix an issue with --debug and _dump on Ruby 1.8.7
This fixes an issue where both the `--debug` option and the `brew cask _dump` command would fail on Ruby 1.8.7 when the Cask has an `installer` stanza, e. g. `adobe-air`.
2014-12-08 11:20:41 +01:00
Roland Walker
69d0f98042 remove caveats / x11_required 2014-12-06 11:46:00 -05:00
Roland Walker
5348260520 DSL: add depends_on :x11 2014-12-06 11:20:15 -05:00