Commit Graph

1228 Commits

Author SHA1 Message Date
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
Roland Walker a151659c32 Merge pull request #8329 from rolandwalker/remove_homebrew_mach
remove mach.rb from homebrew-fork
2014-12-20 14:54:30 -05:00
Roland Walker 71ebf6df97 Merge pull request #8331 from rolandwalker/remove_homebrew_observer_pathname_extension
remove homebrew-fork module ObserverPathnameExtension
2014-12-20 14:54:21 -05:00
Roland Walker 0fba58eff4 Merge pull request #8332 from rolandwalker/remove_homebrew_misc_methods
remove numerous unused methods from homebrew-fork
2014-12-20 14:54:12 -05:00
Roland Walker 33d7a4787b pare back homebrew-fork global.rb
first pass: more can be removed
2014-12-20 14:46:14 -05:00
Roland Walker ed56d1589d remove numerous unused methods from homebrew-fork
Covering files:
* extend/fileutils.rb
* hardware.rb
* utils.rb
2014-12-20 14:33:06 -05:00
Roland Walker 12135af2f5 rm homebrew-fork module ObserverPathnameExtension 2014-12-20 14:12:15 -05:00
Roland Walker 48319f44d5 remove mach.rb from homebrew-fork 2014-12-20 13:28:40 -05:00
Roland Walker cf4cc2f255 adopt lib/vendor structure 2014-12-20 13:23:10 -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 140613cbb5 update license comment in brew cask create 2014-12-20 10:35:28 -05:00
Roland Walker 62c2c83639 explicitly require Ruby 2.0 at all entry points
to give a more informative error
2014-12-20 10:25:56 -05:00
ndr 1430d8904f Strip compiler methods from homebrew-fork OS::Mac 2014-12-20 14:58:15 +00:00
Roland Walker 4520171988 Merge pull request #8310 from rolandwalker/homebrew_strip_download_strategy
strip classes from homebrew-fork download_strategy.rb
2014-12-20 09:32:08 -05:00
Roland Walker 05eec5111e remove os.rb from homebrew-fork
this can be neglected, as we only support OS X
2014-12-20 09:07:58 -05:00
Roland Walker 4737a6e2c2 strip classes from homebrew-fork download_strategy 2014-12-20 08:56:03 -05:00
ndr 66e9a3b393 Merge pull request #8308 from rolandwalker/homebrew_remove_xcode
remove xcode.rb from homebrew-fork
2014-12-20 13:55:27 +00:00
Roland Walker 4235fa0857 Merge pull request #8298 from rolandwalker/homebrew_reduce_extend_ARGV
strip methods from homebrew-fork extend/ARGV.rb
2014-12-20 08:38:01 -05:00
Roland Walker 811c0e39bf remove xcode.rb from homebrew-fork 2014-12-20 08:37:20 -05:00
Roland Walker b1b21966e7 strip methods from homebrew-fork extend/ARGV.rb 2014-12-20 08:04:03 -05:00
Roland Walker 3c6b120186 Merge pull request #8296 from rolandwalker/reduce_homebrew_extend_string
remove methods from homebrew-cask extend/string.rb
2014-12-20 07:41:31 -05:00
Roland Walker 6cb1de3d2b remove extend/module from homebrew-fork
unused
2014-12-20 07:17:37 -05:00
Roland Walker 8dbe1b4281 remove methods from homebrew-cask extend/string.rb 2014-12-20 07:17:03 -05:00
Roland Walker 1f6ff21143 remove Ruby 2.0 forward-ports from homebrew-fork
* extend/enumerable.rb
* extend/symbol.rb
2014-12-20 06:39:23 -05:00
Roland Walker 493631956a remove homebrew-fork extend/ENV.rb 2014-12-19 11:11:29 -05:00
Roland Walker b90d526981 Merge pull request #8264 from rolandwalker/homebrew_strip_test_env
Homebrew strip test env
2014-12-19 10:43:34 -05:00
Roland Walker 2c0efd7bed strip down testing_env.rb from homebrew-fork 2014-12-19 10:32:40 -05:00
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 5108254e9f strip various exception classes from homebrew-fork 2014-12-19 10:29:34 -05:00
Roland Walker f783c8aafe Merge pull request #8263 from rolandwalker/homebrew_remove_super
remove ENV/super.rb from homebrew-fork
2014-12-19 10:28:46 -05:00
Roland Walker f942124a52 Merge pull request #8265 from rolandwalker/homebrew_remove_metafiles
remove metafiles.rb from homebrew-fork
2014-12-19 10:28:38 -05:00
Roland Walker 4e37fe3fae remove compilers.rb from homebrew-fork 2014-12-19 10:04:25 -05:00
Roland Walker 5ed644db83 remove metafiles.rb from homebrew-fork 2014-12-19 09:44:06 -05:00
Roland Walker c3c642b191 remove ENV/super.rb from homebrew-fork
this only has to do with building Formulae
2014-12-19 09:24:05 -05:00
Roland Walker 3b1deff163 remove several more Homebrew-fork files
No longer needed after latest changes:

* build.rb
* build_options.rb
* keg.rb
* keg_fix_install_names.rb
* options.rb
* pkg_version.rb
2014-12-18 20:10:23 -05:00
Roland Walker 6b1ccbbe60 Merge pull request #8228 from rolandwalker/remove_homebrew_linux
remove linux compat from homebrew-fork
2014-12-18 17:13:34 -05:00
Roland Walker 46c66f7471 Merge pull request #8218 from rolandwalker/remove_several_homebrew_files
remove several homebrew-fork files
2014-12-18 17:13:08 -05:00
Roland Walker 5d6b9f450c Merge pull request #8227 from rolandwalker/remove_homebrew_compat
remove homebrew-fork compat.rb and compat dir
2014-12-18 17:13:01 -05:00
Roland Walker 07af3e736d Merge pull request #8229 from rolandwalker/remove_homebrew_inreplace
remove inreplace.rb from homebrew-fork
2014-12-18 17:12:51 -05:00
Roland Walker 5e0d1a7cd6 Merge pull request #8230 from rolandwalker/remove_homebrew_tap_constants
remove tap_constants.rb from homebrew-fork
2014-12-18 17:12:44 -05:00
Roland Walker 5e6ac42bbb remove homebrew-fork compat.rb and compat dir 2014-12-18 13:32:28 -05:00
Roland Walker a0c86c4cd5 remove utf-8 encoding cookie 2014-12-18 13:28:00 -05:00
Roland Walker 14526210e0 remove several homebrew-fork files
* blacklist.rb
* build_environment.rb
* caveats.rb
* cleaner.rb
* language/go.rb
* language/haskell.rb
* language/python.rb
* tab.rb
2014-12-18 13:24:44 -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 cadfa8ef7d Merge pull request #8225 from rolandwalker/remove_homebrew_software_spec
remove homebrew-fork software_spec.rb
2014-12-18 13:20:45 -05:00
Roland Walker ac9257dc89 remove tap_constants.rb from homebrew-fork 2014-12-18 12:54:06 -05:00
Roland Walker ff6700f9c3 remove inreplace.rb from homebrew-fork 2014-12-18 12:44:39 -05:00
Roland Walker dba90db725 remove linux compat from homebrew-fork 2014-12-18 12:36:39 -05:00
Roland Walker e06bb6e7b6 remove cxxstdlib.rb from homebrew-fork
and everything possibly related
2014-12-18 12:19:08 -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 139a723179 Merge pull request #8197 from rolandwalker/remove_homebrew_debrew
remove `debrew.rb` from homebrew-fork
2014-12-17 18:42:01 -05:00
Roland Walker 75b557352f Merge pull request #8196 from rolandwalker/remove_homebrew_install_renamed
remove `install_renamed.rb` from homebrew-fork
2014-12-17 18:41:53 -05:00
Roland Walker 7c33ee8a7c Merge pull request #8195 from rolandwalker/remove_homebrew_patch
remove `patch.rb` from homebrew-fork
2014-12-17 18:41:43 -05:00
Roland Walker b96822f878 Merge pull request #8194 from rolandwalker/remove_homebrew_tap_migrations
remove homebrew-fork file `tap_migrations.rb`
2014-12-17 18:41:32 -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 13159089dd remove `debrew.rb` from homebrew-fork 2014-12-17 10:09:57 -05:00
Roland Walker 4623e160a3 remove install_renamed.rb from homebrew-fork
unused
2014-12-17 10:05:09 -05:00
Roland Walker d05713050e remove `patch.rb` from homebrew-fork 2014-12-17 10:00:38 -05:00
Roland Walker 113ebce063 remove homebrew-fork `tap_migrations.rb` 2014-12-17 09:55:37 -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
ndr d923178f6f Merge pull request #8190 from rolandwalker/no_check_overrides
`sha256 :no_check` overrides `version <string>`
2014-12-17 13:38:52 +00: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 cb8f255655 rm from homebrew-fork everything re: bottles 2014-12-17 06:39:16 -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
Roland Walker 47778e2d59 Merge pull request #8158 from rolandwalker/remove_homebrew_deps_reqs
strip from homebrew-fork: dependencies and reqs
2014-12-16 20:33:46 -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 a908043bf5 strip from homebrew-fork: dependencies and reqs
Remove everything from homebrew-fork related to dependencies
and requirements.
2014-12-16 09:56:51 -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 1a238777ee Merge pull request #8089 from rolandwalker/homebrew_separation
Separate the Ruby backend from Homebrew + Require Ruby 2.x
2014-12-16 07:51:37 -05:00
Roland Walker ba12a2aaaa replace brew-cask.rb subcommand with bash shim
The `brew-cask` shim finds and executes `lib/brew-cask-cmd.rb`,
but only if Ruby 2.0+ is found.
2014-12-16 07:23:57 -05:00
Roland Walker d882b23d5f Merge pull request #8129 from rolandwalker/remove_license_abandoned
remove undocumented `license :abandoned`
2014-12-15 17:27:30 -05:00
Roland Walker af363f1280 remove undocumented `license :abandoned` 2014-12-15 07:33:33 -05:00
Radek Simko 8d0bd3b286 Explicit conversion Pathname -> String added 2014-12-14 19:53:52 +01:00
Roland Walker 974e11f639 delete undocumented `license :trial`
per discussion in #8084
2014-12-13 13:52:21 -05:00
Roland Walker 9868944de5 check in a somewhat stripped fork of Homebrew
under lib/homebrew-fork
2014-12-13 13:07:12 -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
Roland Walker e581347939 allow multiple depends_on stanzas + refactor
also:
* disallow combining depends_on :macos comparison expressions
* ohai message when depends_on is present
* explicit accessors for :cask and :formula
* simplify some logic and flatten nested conditionals
* reflow incidental doc
2014-12-06 11:06:30 -05:00
Roland Walker a870869f9a Merge pull request #7822 from rolandwalker/allow_leading_numbers
Remove constraint that Cask tokens cannot start with digits
2014-12-06 09:00:04 -05:00
Roland Walker d7956e597d DSL: remove support for `tags :name` 2014-12-06 08:03:03 -05:00
Roland Walker 27c49e31a5 Merge pull request #7825 from rolandwalker/remove_title_support
remove support for `title` method in Casks
2014-12-06 07:56:09 -05:00
Roland Walker 2a09a970cd Merge pull request #7819 from rolandwalker/depends_on_followup
followups on `depends_on` `:macos`/`:arch`
2014-12-06 07:55:13 -05:00
Roland Walker f5bcbd00a5 Merge pull request #7805 from rolandwalker/add_name_stanza
Add `name` stanza for proper name
2014-12-06 05:28:30 -05:00
Roland Walker 8170c34785 DSL: remove `arch_only` caveats support 2014-12-05 18:46:51 -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 b7eb666557 Merge pull request #7794 from rolandwalker/remove_os_version_only_caveat
remove `os_version_only` support from `caveats`
2014-12-05 18:34:44 -05:00
Roland Walker cb5a40f787 remove constraint that tokens can't start w/ digit
Class names are now completely hidden from the user.  This
commit works by adding a prefix to all Cask class names, which
is considered to be an ugly transitional hack on the way to
representing individual Casks as instances.
2014-12-05 11:54:56 -05:00
Roland Walker 037ece852b followups on `depends_on` `:macos`/`:arch`
* always coerce `:macos` value to array; simplify code
 * remove warning comments about unset values
 * doc explicitly that requirements are covered as well as dependencies
 * doc that `depends_on` is not consulted until `install` time
 * in docs and code, say "release" instead of "version" for the :macos release
   * todo: provide our own variable styled "release" to use in Casks, instead of Homebrew's `MacOS.Version`
 * doc that symbols are preferred for `:macos` over strings in Casks (interally, all are converted to idential `Gem::Version` objects)
 * doc: remove `os_version_only` from `cask_language_deltas.md`
 * doc: improve internal links
 * doc: recast OS X release symbol list as table
 * doc: (incidental) regularize orthography of Formula and Cask
2014-12-05 09:55:47 -05:00
Roland Walker 89ec82d9f8 Merge pull request #7793 from rolandwalker/depends_on_arch
DSL: `depends_on :arch` functionality/tests/doc
2014-12-05 09:40:36 -05:00
Roland Walker f800db0383 Add `name` stanza for proper name
Documentation is in a separate PR so that authors don't start
using this feature before release.
2014-12-04 20:08:55 -05:00
Roland Walker bf96caa2b3 convert more backend code from cask_name to token
missed in #7673
2014-12-04 18:48:33 -05:00
Roland Walker dc93af470d remove `os_version_only` from caveats
obsoleted by `depends_on :macos`
2014-12-04 14:54:05 -05:00
Roland Walker 7f5e5124f6 DSL: `depends_on :arch` functionality/tests/doc
* fill in functionality for the `depends_on :arch` stub
* de-document `caveats` method `arch_only`
2014-12-04 14:29:27 -05:00
Roland Walker 52fdbcd671 cut v0.49.0 2014-12-02 13:04:59 -05:00
Roland Walker 1c5c6ae774 Merge pull request #7738 from claui/fix-brew-cask-list-ruby18
Fix regression where some CLI commands break on Ruby 1.8
2014-12-02 12:50:59 -05:00
Roland Walker f7fb88065e Merge pull request #7740 from rolandwalker/relax_sourceforge_jp
relax sourceforge.jp URL pattern
2014-12-02 12:50:12 -05:00
Roland Walker ddc865311f missing "require 'rubygems'"
for depends_on :macos
2014-12-02 12:49:51 -05:00
Roland Walker 2614a447a2 relax sourceforge.jp URL pattern 2014-12-02 12:24:36 -05:00
Roland Walker c59a5fcb80 DSL: `depends_on :macos` functionality/tests/doc
* Fill in the functionality for the `depends_on :macos` stub
* de-document `caveats` method `os_version_only`
* clean up some related docs re: version strings
* add `depends_on_test.rb`
* clarify some related `depends_on :formula` doc, tests, and code
* formatting in test Casks
2014-12-02 12:04:27 -05:00
Claudia 03a8efe128 Make `CLI::Alfred` and `Source::PathBase` work with Ruby 1.8 2014-12-02 17:01:01 +01:00
Roland Walker 9050f4d301 Merge pull request #7684 from rolandwalker/accessibility_review
Review and revise accessibility methods in postflight mini-DSL
2014-12-02 05:19:39 -05:00
Roland Walker bff136da57 Merge pull request #7685 from rolandwalker/plist_postflight_review
review/revise plist methods in postflight mini-DSL
2014-12-02 05:19:12 -05:00
Roland Walker d0d50fd935 Merge pull request #7686 from rolandwalker/move_to_app_postflight_review
review/revise `suppress_move_to_applications` method in postflight mini-DSL
2014-12-02 05:19:00 -05:00
Roland Walker 748b0b3528 Merge pull request #6184 from ndr-qef/gpg
Introduce GPG operations
2014-12-01 18:42:27 -05:00
Roland Walker 6da1dd13bc Merge pull request #7673 from rolandwalker/name_to_token
unify and recast "Cask name" and "title" as "token"
2014-12-01 11:05:12 -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 7ee2ec3253 revise move_to_app method in postflight mini-DSL
* use `@command.run` instead of `system_command` which is intended
  as an external interface
* quoting
2014-11-29 13:54:41 -05:00
Roland Walker 777949dd75 revise plist methods in postflight mini-DSL
* accept index argument to `info_plist` in case of multiple `app`
  artifacts, defaulting to first
* return `Pathname` object from `info_plist`
* use `@command.run` instead of `system_command` which is intended
  as an external interface
* quoting
2014-11-29 13:43:06 -05:00
Roland Walker 2ff2db48b6 revise accessibility methods in postflight miniDSL
* rename `remove_accessibility_access` to `disable_accessibility_access`
  to match corresponding method `enable_accessibility_access`
* move `TCC.db` and `.AccessibilityAPIEnabled` paths to `Cask::Locations`
* remove unneeded backslash from `TCC.db` path
* use full paths to `touch` and `sqlite3` utilities
* use `@command.run` instead of `system_command` which is intended as an
  external interface
* reverse conditional so enable/disable logic is consistent
* `sudo` is needed when creating `.AccessibilityAPIEnabled`
* instead of silent fail, warn that access cannot be safely disabled on
  Mountain Lion and earlier (it could, but might affect other apps)
* quoting/whitespace
2014-11-29 13:21:21 -05:00
Roland Walker 19ee3986c0 Refactor backend classes to match pre/postflight
From legacy forms "after_install", etc.
* abstract out `method_missing_message` to Cask::Utils
* provide `method_missing` coverage in pre/postflight blocks (fixes #7445)
* fix old-style rendering of Cask name as a classname in
  `method_missing` messages
2014-11-26 12:19:17 -05:00
ndr 62c1ce5dfc Merge pull request #7530 from rolandwalker/enforce_min_dsl_version
enforce a valid minimum DSL version in headers
2014-11-23 11:14:58 +00:00
Roland Walker e2a0214de6 enforce a valid minimum DSL version in headers 2014-11-22 20:08:25 -05:00
Roland Walker 367e0f2880 Merge pull request #7529 from rolandwalker/remove_tap_migration
Remove automatic tap migration code and docs
2014-11-22 20:03:27 -05:00
Fabio Niephaus 62cbb3d7a6 get 'syncfolder' from Preferences. resolves #7216 2014-11-22 23:10:04 +01:00
Roland Walker 31f81cc8e9 remove all transitional tap migration code 2014-11-22 10:33:28 -05:00
ndr 5192156f92 Merge pull request #7507 from rolandwalker/remove_caskroom_only_support
DSL: remove support for `caskroom_only`
2014-11-21 18:41:49 +00:00