Commit Graph

24 Commits

Author SHA1 Message Date
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 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 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
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 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 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 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 3e654b8a2b adopt okjson.rb from homebrew-fork 2014-12-20 15:01:53 -05:00
Roland Walker cf4cc2f255 adopt lib/vendor structure 2014-12-20 13:23:10 -05:00