Commit Graph

1279 Commits

Author SHA1 Message Date
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
Aditya Dalal 6fd3cebb22 download.rb: Don't use cached download when cask uses `:latest` 2015-12-17 14:13:09 -05:00
Josh Hagins 43233b2f8b Remove stray unnecessary 'exit 0's 2015-12-16 23:54:23 -05:00
Aditya Dalal 2bf6225788 Merge pull request #15643 from joshka/feature/add-audio-plugin-folders
Add Audio Unit and VST plugin folder artifiacts
2015-12-16 17:16:17 -05:00
Josh Hagins 5fa16a51a0 Uninstall login items with uninstall :login_item 2015-12-11 23:47:46 -05:00
Josh Hagins 2b40fe32ed Refactor dispatch_uninstall_directives
Break up the Wall of Code™ that was UninstallBase#dispatch_uninstall_directives
into several smaller methods.
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
Vítor Galvão d2674ce560 Merge pull request #15426 from caskroom/generic_unar-force-overwrite
generic_unar.rb: use -force-overwrite
2015-12-09 22:05:38 +00:00
Josh Hagins 4955bac9a9 Warn of legacy installs in doctor 2015-12-09 19:35:23 +00: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 1a5faf6cd6 Error out if user attempts an unknown command 2015-12-08 13:02:37 -05:00
Joshua McKinney 76e34435e1 Add Audio Unit and VST plugin folder artifiacts 2015-12-06 16:26:34 -06:00
Nick Pellant b0d339e246 Add :auto_updates stanza for Casks 2015-11-30 12:34:30 +00:00
Vítor Galvão 3bce735fc8 generic_unar.rb: use -force-overwrite 2015-11-26 14:57:25 +00:00
Vítor Galvão 7d6f28fb3c generic_unar.rb: use long flags 2015-11-26 14:17:42 +00:00
forkbomber ef182fafe1 invoke chown more reliable while removing remove artifacts
fixes #14842
2015-11-01 03:20:36 -05:00
Vítor Galvão bdf05fa56c Merge pull request #14648 from caskroom/vitorgalvao-accessibility_access
installer.rb: fix accessibility access conditional order
2015-10-31 00:03:46 +00:00
Josh Hagins d39c95942f cut v0.59.0 2015-10-28 14:07:33 -04:00
Josh Hagins 9793861422 Remove launchjobs even if they are not loaded 2015-10-28 13:46:24 -04:00
Josh Hagins ca2f4bb6b8 Use ENV['HOME'] to check existence of launchjobs
Pathname does not expand '~', so we need to give it the absolute path to
the HOME directory.
2015-10-28 13:46:24 -04:00
Vítor Galvão 2c0acb5ca6 installer.rb: fix accessibility access conditional order 2015-10-25 18:04:25 +00:00
Vítor Galvão eb06f29fa4 finished removing Alfred support 2015-10-21 19:56:04 +01:00
Vítor Galvão da62376be8 cut v0.58.0 2015-10-15 01:11:31 +01:00
Vítor Galvão 08ec256acd Merge pull request #14144 from adityadalal924/el-capitain-accessibility
updated accessibility method for el capitan compatibility
2015-10-15 01:04:43 +01:00
Vítor Galvão c216698c73 cut v0.57.0 2015-10-02 17:03:40 +01:00
Vítor Galvão ac9f388f34 Merge pull request #11110 from delphinus35/remove-sort-in-symlinked
remove `sort` for fixing the bug #9227
2015-10-02 16:33:37 +01:00
adityadalal924 ca5283297d updated accessibility method for el capitain compatibility 2015-10-01 22:40:29 -04:00
Josh Hagins 32364632be Include Hbc::Staged module in Hbc::DSL::Preflight 2015-09-05 13:41:46 -04:00
Josh Hagins c2cfded798 Gracefully handle interrupts (CTRL-C) at top level
Interrupts are possible during any stage of program execution. Certain
areas are protected with Hbc::Utils.ignore_interrupts, but for the rest
we should exit gracefully without spitting out an ugly stack trace.
2015-09-03 10:22:52 +01:00
Josh Hagins b30085af1e cut v0.56.0 2015-08-04 00:27:56 -04:00
Josh Hagins 0b8d492ce9 Merge pull request #12992 from jawshooah/tilde-expansion
Expand tilde in `uninstall :delete`
2015-08-03 13:53:08 -04:00
Josh Hagins 907ac5a1cc Merge pull request #11200 from radeksimko/writeable-symlink-target
Make symlink targets writeable, so we can write altnames
2015-08-03 13:52:46 -04:00
Josh Hagins c0ed120631 Expand tilde in uninstall :delete 2015-08-02 20:25:15 -04:00
Josh Hagins 118520d5a5 cut v0.55.0 2015-08-02 12:24:32 -04:00
Josh Hagins c63984053a Move permissions and ownership helpers to Staged module
These helpers should be available to both postflight and
uninstall_preflight blocks.
2015-08-02 01:39:04 -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 111cf05d77 Add postflight helpers to set file ownership and permissions 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
Radek Simko bcdd427b80 Merge pull request #12067 from radeksimko/yellow-warnings
Change warning from red to yellow
2015-06-23 14:45:49 +01:00
Andrew 0ad03b7218 Merge pull request #11672 from vitorgalvao/elcapitan
additions for El Capitan
2015-06-23 14:21:37 +02:00
Radek Simko 7967d9fd18 Change warning from red to yellow 2015-06-23 13:06:06 +01: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 eb496b31fb Merge pull request #9995 from otzy007/list_versions
brew cask list --versions
2015-06-17 12:34:37 -05:00
ndr 2fc9d23239 cut v0.54.1 2015-06-13 19:55:40 +01:00
Vítor Galvão 5fe97c6d12 additions for El Capitan 2015-06-09 16:52:57 +01:00
Andrew Kitchen 8e7a958b6f Allows accessibility entry to be updated if previously installed 2015-06-07 09:18:36 -07:00
Radek Simko c2a20aab1e Make symlink targets writeable, so we can write altnames
- closes #9667
2015-05-15 07:26:22 +01:00
Paul Hinze a952b87291 cut v0.54.0 2015-05-11 09:56:56 -05:00
delphinus 90b48cc177 remove `sort` from symlinked.rb
* fix for the bug issued in #9227
2015-05-10 23:11:05 +09:00
Vítor Galvão 230a116be8 added free_license caveat 2015-04-20 18:20:07 +01:00
Vítor Galvão e8549d3b17 added discontinued caveat 2015-04-20 02:12:59 +01:00
Radek Simko 64c682afa3 Allow :sudo in uninstall stanza (:script + :early_script) 2015-03-29 22:16:51 +01:00
Andrei Gliga 99921ff8cd list installed packages versions 2015-03-11 12:04:14 +02:00
ndr f5a78615ae Audit for illegal SHA-256 digests 2015-02-25 21:35:05 +00:00
Paul Hinze e65c40bb2b cut v0.53.3 2015-02-09 15:43:49 -06:00
Paul Hinze 4d1140a55f core: _actually_ fix caveats
there was another untested place where the cask methods were being
re-implemented. these were preventing casks with caveats from working
properly.

refs #9494
2015-02-09 15:30:26 -06:00
Paul Hinze 5df43132cb cut v0.53.2 2015-02-09 09:50:07 -06:00
Paul Hinze 7856eec860 core: fix preflight/postflight casks
These were broken in the refactor to extract Hbc::Cask from Hbc.

fixes #9503
2015-02-09 09:28:41 -06:00
Paul Hinze ca79d4b3df cut v0.53.1 2015-02-08 08:42:14 -06:00
Paul Hinze 41fcf55bc7 Merge pull request #9491 from caskroom/bsexec-requires-sudo-now-i-guess
10.10.3 fix: pull bsexec from mount commands
2015-02-08 08:31:25 -06:00
Paul Hinze 05dc81431d 10.10.3 fix: pull bsexec from mount commands
It seems like in 10.10.3 apple, in its infinite wisdom, decided that the
bsexec option for launchctl would suddenly require root privileges.

Since we were proactively using bsexec for all DMG mounts, this was
breaking dmg-based Casks for all early adopters of 10.10.3.

We can regroup to try and address #7132 another way, but for now, just
pulling all the bsexec stuff out.
2015-02-08 08:23:42 -06:00
Paul Hinze ea3fbf8e27 Merge pull request #9475 from rolandwalker/fix_rmdir
fix `uninstall :rmdir` silent failure
2015-02-08 07:31:24 -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
Roland Walker 42633f23d2 fix `uninstall :rmdir` silent failure
closes #9446.  The bug looks like a downstream effect of
removing Homebrew monkeypatches.
2015-02-07 12:43:43 -05:00
Roland Walker 8a81cb54a1 Use bold terminal escapes instead of white
Let the terminal decide how to display bold.  Fixes #9349.
The issue arose when integrating Homebrew's `Tty` class.
Homebrew's `Tty.white` actually emits escapes for bold.

Fixing `Tty.white` to do what the method name says caused
loss of visibility on light backgrounds.
2015-02-07 12:16:45 -05:00
Paul Hinze d8942b7210 alfred: bring back cli command as stub
Make `brew cask alfred` inform the user about the new Alfred support for
Casks. Should help with the transition.

refs #9405
2015-02-06 09:52:06 -06:00
ndr eb25dc5f0d Use Hbc::Verify in Hbc::Installer
as a distinct step serving the general purpose of verification, e.g. of
integrity with sha, authenticity with gpg…
2015-01-24 15:34:11 +00:00
ndr dd93689e5b Add helper for verification of multiple properties
With the expectation that:
- we will add gpg checks;
- we may add a `verify` verb;
- we may introduce new means of verification, e.g. OS X's `codesign`
2015-01-24 15:33:06 +00:00
ndr b226ffb609 Move checksum methods to new Hbc::Verify module
and merge them into a single definition.
2015-01-24 15:32:28 +00:00
ndr 23887c8fdf cut v0.53.0 2015-01-23 10:58:08 +00:00
Roland Walker e1ad5a270f expand tilde in $PATH for internal which method
restores Homebrew's behavior with regard to external commands
fixes #8889
2015-01-15 10:43:06 -05:00
ndr 8af88b78e6 Merge pull request #8869 from rolandwalker/which_editor
apply `which` to default editor values
2015-01-15 01:32:26 +00:00
Roland Walker dbfe0db2de apply `which` to default editor values
this was lost during integration from Homebrew
2015-01-14 07:37:45 -05:00
Leo Koppelkamm 10c48cb927 Make staged_path work in installer stanzas 2015-01-13 22:48:11 +01:00
Vítor Galvão 0ae2edd707 Merge pull request #8840 from vitorgalvao/remove-alfred
Removed alfred command support
2015-01-13 21:27:17 +00:00
Vítor Galvão 078f0b0300 removed alfred support 2015-01-13 17:49:32 +00:00
ndr 57867eef32 Merge pull request #8870 from rolandwalker/remove_release_constants
remove homebrew-fork `MACOS_RELEASE` constants
2015-01-13 17:48:54 +00:00
Roland Walker a401047164 remove homebrew-fork MACOS_RELEASE constants
* contain logic within module Hbc::MacOS
* add release_with_patchlevel method
* allow MACOS_RELEASE and MACOS_RELEASE_WITH_PATCHLEVEL
  environment variables to override the determined release
  values regardless of whether under the test harness
2015-01-13 07:35:27 -05:00
Roland Walker 28a61d70a7 Merge pull request #8790 from ndr-qef/core/flense_homebrew
Split arguments on whitespace when executing editors
2015-01-13 07:08:25 -05:00
ndr d5722ee079 Merge pull request #8751 from vitorgalvao/remove-widget-support
Remove support for widgets
2015-01-11 12:29:00 +00:00
ndr 8fa1f4db24 Split ENV variables on whitespace in `exec_editor` 2015-01-09 22:31:59 +00:00
Vítor Galvão 529bd801e4 Removed support for widgets
Closes #2206.
2015-01-08 19:51:15 +00:00
Roland Walker d0f9363de5 cut v0.52.1 2015-01-07 18:31:26 -05: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 db23f90c3e Merge pull request #8723 from rolandwalker/move_homebrew_path_constants
recast `HOMEBREW_*` path constants as read/write location methods
2015-01-07 18:19:02 -05:00
Roland Walker 4b4e8cf706 incorporate homebrew-fork ignore_interrupts
utility method
2015-01-07 09:51:39 -05: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 5452a496db remove unneeded load_path 2015-01-07 09:06:33 -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
ndr 83bf761588 Improve error message for AIR app reinstallation
Adobe AIR Installer forbids the silent reinstallation of existing AIR
apps; any attempt fails with exit code 9.

In the absence of known workarounds, we merely wrap the failure in a
clearer error message.
2015-01-04 11:46:26 +00:00
ndr 2dbb8e57b6 Check for DSL-level nils when sorting dependencies
Refer to #8615.

`depends_on.cask` can be nil if a Cask includes at least one
`depends_on` stanza, but no `:cask` key.
2015-01-04 02:30:36 +00:00
Roland Walker 95325125dd Merge pull request #8612 from rolandwalker/strip_homebrew_fork_download_strategy
strip homebrew-fork download_strategy.rb
2015-01-03 14:47:05 -05:00
Roland Walker 050897a8a5 strip homebrew-fork download_strategy.rb
remove unused or overridden methods
remove usused classes
2015-01-03 08:29:13 -05:00
Roland Walker 774eae75a8 replace homebrew-fork method exec_editor
remove which_editor
remove safe_exec
2015-01-03 07:59:51 -05:00
Roland Walker 4e59f6c55b cut v0.52.0 2015-01-02 19:09:43 -05:00
Roland Walker 7741262b8f Merge pull request #8595 from rolandwalker/remove_homebrew_fork_resource
remove homebrew-fork resource.rb
2015-01-02 17:18:50 -05:00
Roland Walker 00786c68a8 audit check for sha256 of the empty string 2015-01-02 10:30:26 -05:00
Roland Walker 1ae9ce2bd0 namespace Hbc followups 2015-01-02 10:20:09 -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 852552462b migrate puts_columns from homebrew-fork
into our codebase.
* recast in terms of existing Cask::Utils.stringify_columns
* fix stringify columns to use backticks so that stty can detect the tty
* recover desired behavior of not columnizing in stringify_columns if not
  on a tty
* update comments re: various Homebrew imports
2014-12-31 17:08:35 -05:00
Roland Walker 3b7bdf371a Merge pull request #8557 from rolandwalker/incorporate_homebrew_fork_hardware
incorporate `hardware.rb` from homebrew-fork
2014-12-31 17:04:54 -05:00
Roland Walker db33be107b Rewrite homebrew-fork which method
and incorporate into our codebase.  Update some incidental comments.
2014-12-31 09:35:04 -05:00
Roland Walker 476a72ae92 incorporate hardware.rb from homebrew-fork
* this is already a much-simplified version
* recast to avoid using popen_read method
* popen.rb is now unused and is removed
* new file is cask/hardware/cpu.rb
* toplevel ::Hardware namespace is temporarily aliased to Cask::Hardware
2014-12-31 08:34:49 -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 761a09b633 remove homebrew-fork xquartz.rb
On review, the primary gain from adopting this code is the
libpng detection method used in #8519.  The rest of the
logic is not useful to us until/unless we start requiring
specific X11 versions in `depends_on :x11`.
2014-12-30 20:05:26 -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 60da9879e6 Merge pull request #8519 from rolandwalker/x11_detection
Check for libpng to assure X11 detection
2014-12-30 16:45:10 -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 1b775d0f06 make @@release a class variable 2014-12-30 11:22:48 -05:00
Roland Walker 667fed6471 cache inverted Release hash 2014-12-30 11:21:30 -05:00
Roland Walker ec89e5d26b recast class OS::Mac::Version as OS::Mac::Release 2014-12-30 11:20:21 -05:00
Roland Walker 997c4a007d merge all OS X release symbols into one file 2014-12-30 11:14:06 -05:00
Roland Walker 0e20bd4f62 separate hardware from MacOS
and remove unused method prefer_64_bit?
2014-12-30 11:10:09 -05:00
Roland Walker 875f44d8e4 move unused xquartz.rb to new namespace
* migrate methods app_with_bundle_id and pkgutil_info within xquartz.rb
  as this is the only place they are used
* remove duplicate X11 namespace
2014-12-30 11:07:56 -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
Roland Walker 8d2e23c03d don't redirect tput STDERR
when both outputs are redirected, it always returns 80
2014-12-30 08:57:56 -05:00
ndr c12365caba Satisfy Cask dependencies on install
Includes an unsavory hack to bypass redundant checks for Cask
subdependencies, in the form of an optional argument passed down from
`install` to `satisfy_dependencies`.
2014-12-29 17:07:05 +00:00
ndr 892eefe58c Implement Cask dependencies
as a class concerned with recursively loading, graphing and sorting all
dependencies of a given Cask.
2014-12-29 16:56:49 +00:00
ndr 1d0b697054 Add exception for cyclic Cask dependencies 2014-12-29 16:36:00 +00:00
ndr 54e03c27b0 Introduce a TopologicalHash class
In the interest of `depends_on :cask`, we introduce a topologically
sortable hashmap, implemented as a small subclass of Hash.
2014-12-29 16:31:24 +00:00
Roland Walker 3a39a017d4 Merge pull request #8465 from rolandwalker/improve_string_coercion
improve `String` coercion in `system_command.rb`
2014-12-27 23:29:08 -05:00
ndr 5b2c9d64be Strip instruction set detection methods from homebrew-fork 2014-12-28 00:44:37 +00:00
Roland Walker 3d8f9a874a improve String coercion in system_command.rb 2014-12-27 19:22:38 -05:00
ndr a3ad17dd83 Merge pull request #8464 from rolandwalker/remove_homebrew_mac_hardware
remove homebrew-fork os/mac/hardware.rb
2014-12-27 23:32:30 +00:00
Roland Walker 1970759587 remove homebrew-fork os/mac/hardware.rb
* remove many methods
* merge the remainder into hardware.rb directly
* make Hardware a module
* remove :dunno type, return nil instead
* redirect STDERR within backticks
2014-12-27 17:41:27 -05:00
Roland Walker 1163e1d87a move Hash monkeypatch to separate file 2014-12-27 17:04:21 -05:00
Roland Walker dfe630771e Merge pull request #8460 from rolandwalker/no_monkeypatch_cabv
move `cabv` method out of `Pathname` monkeypatch
2014-12-27 17:02:41 -05: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
Roland Walker dbed4628e0 move cabv method out of Pathname monkeypatch
recast as utility method
2014-12-27 08:55:06 -05:00
Roland Walker 6e0e29df52 remove JSON support from homebrew-fork
and vendor/okjson.rb in our own codebase, recently adopted
from homebrew-fork.  JSON reads are used within Homebrew
to support download mirrors and GitHub interface: two things
we might wish to support in the future, but do not at this
time.
2014-12-26 19:36:59 -05:00
Roland Walker 69ffb280cd Merge pull request #8447 from rolandwalker/remove_homebrew_github
remove homebrew-fork `GitHub` class
2014-12-26 19:10:50 -05:00
Roland Walker 7612199f24 remove homebrew-fork GitHub class
It might be interesting in the future to incorporate this
class to search into untapped repos.  For now, it is not
being used, and so should be deleted.
2014-12-26 18:57:54 -05:00
Roland Walker 27a92b6d9a remove homebrew-fork Version class
replace with Gem::Version for OS X release comparisons.

Later we will need to pull in something like the Version class or
build something similar, to support a greater understanding of the
value of the version stanza (which is not solely numeric, as
Gem::Version expects).  For now, we don't need the complexity of
this class, as we aren't using it.
2014-12-26 18:33:18 -05:00
Roland Walker d1116d7e16 Merge pull request #8427 from rolandwalker/homebrew_remove_extend_pathname_rmdir_if_possible
rm homebrew-fork extend Pathname#rmdir_if_possible
2014-12-26 14:29:08 -05:00
Roland Walker be4f975b03 Merge pull request #8428 from rolandwalker/remove_homebrew_pathname_slash_monkeypatch
remove homebrew-fork `Pathname#/` monkeypatch
2014-12-26 14:28:58 -05:00
Roland Walker 6557cfe5a6 Merge pull request #8429 from rolandwalker/preserve_stdout_plist
leave stdout intact when parsing plists
2014-12-26 14:28:49 -05:00
Roland Walker 9d5a3d9240 Merge pull request #8430 from rolandwalker/make_pathnames_absolute
make relative `Pathname`s absolute in `system_command`
2014-12-26 14:28:40 -05:00
Roland Walker 64ee1394bc Merge pull request #8433 from rolandwalker/remove_homebrew_extend_argv
remove homebrew-fork ARGV monkeypatch
2014-12-26 14:28:31 -05:00
Roland Walker 16884ef0b0 Merge pull request #8434 from rolandwalker/remove_homebrew_popen_write
remove unused homebrew-fork method `popen_write`
2014-12-26 14:28:23 -05:00
Roland Walker 8d4076d4d9 Merge pull request #8435 from rolandwalker/strip_homebrew_hardware
remove unused constants/methods from hardware.rb
2014-12-26 14:28:12 -05:00
Roland Walker 0eb2c98b08 Merge pull request #8436 from rolandwalker/remove_some_download_methods
remove 3 unused methods from `download_strategy.rb`
2014-12-26 14:27:56 -05:00
Roland Walker c73b9b90c6 remove namespace workaround from homebrew-fork
irrelevant since we don't load Formulae
2014-12-26 13:20:57 -05:00
Roland Walker b4f1365d84 remove 3 unused methods from download_strategy.rb
in homebrew-fork
2014-12-26 13:12:02 -05:00
Roland Walker b1f90acad6 remove unused constants/methods from hardware.rb
in homebrew-fork.
2014-12-26 12:49:31 -05:00
Roland Walker c3f5a45255 remove unused homebrew-fork method popen_write 2014-12-26 12:42:04 -05:00
Roland Walker 679c72a81f remove homebrew-fork ARGV monkeypatch 2014-12-26 12:33:09 -05:00
Roland Walker 08f5937527 make relative Pathnames absolute in system_command
This was the original intention mentioned in some comments elsewhere.
This may occasionally produce a surprising result, in which case the
argument should be explicitly stringified.
2014-12-26 12:05:17 -05:00
Roland Walker 49c3d8d35f leave stdout intact when parsing plists
from a Cask::SystemCommand::Result instance
2014-12-26 11:32:03 -05: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
ndr f1eb7a2d65 Merge pull request #8425 from rolandwalker/homebrew_strip_utils
strip homebrew-fork `utils.rb`
2014-12-26 15:57:20 +00:00
Roland Walker f6f225127f rm homebrew-fork extend Pathname#rmdir_if_possible
integrate a modified version into our codebase as a utility
method (no longer a monkeypatch)
2014-12-26 09:59:24 -05:00
Roland Walker 6acc285737 remove homebrew-fork extend Pathname#version
apparently unused
2014-12-26 09:39:27 -05:00
Roland Walker d1ef048d4b strip homebrew-fork utils.rb
* remove unused methods gzip and paths
* migrate ohai, opoo, onoe into our own codebase
* move GitHub module into a separate file
* remove unused requires
2014-12-26 09:31:57 -05:00
Roland Walker a5f3f34e65 move require 'resource' to download_strategy.rb
where it is actually needed
2014-12-26 09:07:41 -05:00
Roland Walker 611e09c061 Merge pull request #8402 from rolandwalker/refactor_homebrew_tty
Refactor Homebrew's `Tty` class
2014-12-26 09:02:13 -05:00
Roland Walker daf660753c Refactor Homebrew's Tty class
which was incorporated into our codebase

* separate attributes from colors
* don't reset all attributes when setting a color
* allow chaining for multiple attributes
* cover all basic colors and attributes
* use more standard names ie Tty#underline instead of Tty#em
* add Tty#bg_red, etc.
* sanity checks
* style

This fixes some minor bugs such as the display of underline under single
dash in audit output.
2014-12-26 08:33:05 -05:00
Roland Walker 286b95c799 remove Pathname#cd monkeypatch
from homebrew-fork.  Replace our single use of this method in doctor.rb
2014-12-24 09:16:27 -05:00
Roland Walker e67848e051 adopt homebrew-fork Ruby 2.0.0 Pathname encode fix
into our main codebase per https://bugs.ruby-lang.org/issues/9915
2014-12-24 09:14:51 -05:00
Roland Walker 1c3c8d64f0 rm unused homebrew-fork extend/pathname methods
* stem
* text_executable?
2014-12-24 09:12:55 -05:00
Roland Walker 4142ccde69 remove modified Pathname#extname monkeypatch
from homebrew-fork.  It appears we do not depend on this behavior.
2014-12-24 09:11:46 -05:00
Roland Walker 9bb7e813b9 remove modified Pathname#write monkeypatch
from homebrew-fork.  It appears we do not depend on this behavior.
2014-12-24 09:11:26 -05:00
Roland Walker df23228866 Merge pull request #8391 from rolandwalker/remove_unused_pathname_methods
strip more unused methods from homebrew-fork extend/pathname.rb
2014-12-23 20:25:56 -05:00
Roland Walker c23b51f46d Merge pull request #8393 from rolandwalker/remove_homebrew_mac_methods
remove some unused methods from homebrew-fork `os/mac.rb`
2014-12-23 20:25:48 -05:00
Roland Walker b37658656e strip more unused methods from extend/pathname.rb
in homebrew-fork
2014-12-23 20:00:00 -05:00
Roland Walker 72fa49b1b1 whitespace 2014-12-23 19:59:26 -05:00
Roland Walker 027fd8509a rm some unused methods from homebrew-fork mac.rb 2014-12-23 19:59:01 -05:00
Roland Walker 15eb5fa587 remove homebrew-fork class Tty
* migrate into our codebase at lib/cask/utils/tty.rb
* merge with our monkeypatch
2014-12-23 19:58:21 -05:00
Roland Walker 2f1732d967 Merge pull request #8388 from rolandwalker/remove_homebrew_checksum
Remove homebrew-fork `Checksum` class and refactor
2014-12-23 19:56:40 -05:00
Roland Walker cfd16b984b remove homebrew-fork extend/string.rb
Integrate the last remaining monkeypatch `undent` into our own codebase.
2014-12-23 12:20:44 -05:00
Roland Walker fc8052c6e6 add requires removed during homebrew-fork cleanups
Recent deletions in homebrew-fork allowed tests to pass,
but HEAD was actually broken for interactive use.
2014-12-23 11:22:20 -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 8eb7de29a2 remove Homebrew namespaces in homebrew-fork
* remove two Homebrew modules
* rename Homebrew.system
* rename HomebrewArgvExtension
* remove some unused requires

still todo: constants starting with HOMEBREW_
2014-12-22 10:07:04 -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 5dc63ef62e Merge pull request #8324 from rolandwalker/enforce_required_stanzas
actually require all required stanzas
2014-12-22 07:19:46 -05:00
ndr c5067fab70 Remove rogue include of homebrew-fork FileUtils 2014-12-21 23:57:47 +00:00
Roland Walker 45929e158d Merge pull request #8342 from rolandwalker/pare_homebrew_extend_pathname
delete ~75% of homebrew-fork extend/pathname.rb
2014-12-20 16:36:23 -05:00
Roland Walker 2b70fd815c delete ~75% of homebrew-fork extend/pathname.rb 2014-12-20 16:22:46 -05:00
ndr 4694461344 Merge pull request #8341 from rolandwalker/fully_remove_homebrew_mach
fully remove homebrew-fork mach.rb
2014-12-20 21:16:49 +00:00
Roland Walker 17986602a2 fully remove homebrew-fork mach.rb
that was mistakenly commented out
2014-12-20 16:08:49 -05:00
Roland Walker 9f218ee765 remove homebrew-fork with_system_path method 2014-12-20 15:57:34 -05:00
Roland Walker 8b7936ff41 Merge pull request #8339 from rolandwalker/remove_homebrew_download_stage
remove homebrew-fork staging logic
2014-12-20 15:56:04 -05:00
Roland Walker a1045925b5 remove homebrew-fork staging logic
we have a separate implementation, which is also separate from
download strategy
2014-12-20 15:46:12 -05:00
Roland Walker b22e75a499 Merge pull request #8338 from rolandwalker/remove_homebrew_string_chuzzle
remove homebrew-fork chuzzle method
2014-12-20 15:43:51 -05:00
Roland Walker 23e12093ed Merge pull request #8337 from rolandwalker/remove_homebrew_extend_fileutils
remove homebrew-fork extend/fileutils.rb
2014-12-20 15:38:38 -05:00
Roland Walker fcafd2f350 remove homebrew-fork chuzzle method 2014-12-20 15:38:08 -05:00
Roland Walker c396433984 Merge pull request #8336 from rolandwalker/remove_homebrew_start_with
remove `String` monkeypatches: `start_with?` and `undent_…_72`
2014-12-20 15:33:22 -05:00
Roland Walker e10d098f6d remove homebrew-fork extend/fileutils.rb 2014-12-20 15:32:18 -05:00
Roland Walker 83f628de29 Merge pull request #8334 from rolandwalker/adopt_okjson
adopt okjson.rb from homebrew-fork
2014-12-20 15:26:01 -05:00
Roland Walker 288af438cc Merge pull request #8335 from rolandwalker/move_homebrew_mktemp_to_resource
move mktemp method into homebrew-fork resource.rb
2014-12-20 15:25:53 -05:00
Roland Walker 0cc60463c3 remove String class monkeypatches: start_with? and
undent_..._72
2014-12-20 15:22:55 -05:00
Roland Walker f85ef452e1 move mktemp method into homebrew-fork resource.rb
This is the only place it is used.
No longer need to include FileUtils.
2014-12-20 15:12:39 -05:00
Roland Walker 3513190111 Merge pull request #8330 from rolandwalker/remove_homebrew_old_ruby
delete homebrew-fork code specific to old Rubies
2014-12-20 15:07:26 -05:00
Roland Walker 3e654b8a2b adopt okjson.rb from homebrew-fork 2014-12-20 15:01:53 -05:00
Roland Walker 2c7fd80cd2 Merge pull request #8328 from rolandwalker/vendor_structure
adopt lib/vendor structure
2014-12-20 14:58:46 -05:00
Roland Walker 820b51e5a6 delete homebrew-fork code specific to old Rubies 2014-12-20 14:55:58 -05:00