From e81f4ab7deeb40308f240be5ea00091fc8786d7a Mon Sep 17 00:00:00 2001 From: AnastasiaSulyagina Date: Thu, 18 Aug 2016 22:11:42 +0300 Subject: init --- Library/Homebrew/cask/cmd/brew-cask-tests.rb | 20 ++++++++++++++++++++ Library/Homebrew/cask/cmd/brew-cask.rb | 12 ++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 Library/Homebrew/cask/cmd/brew-cask-tests.rb create mode 100755 Library/Homebrew/cask/cmd/brew-cask.rb (limited to 'Library/Homebrew/cask/cmd') diff --git a/Library/Homebrew/cask/cmd/brew-cask-tests.rb b/Library/Homebrew/cask/cmd/brew-cask-tests.rb new file mode 100755 index 000000000..92ef3ddd9 --- /dev/null +++ b/Library/Homebrew/cask/cmd/brew-cask-tests.rb @@ -0,0 +1,20 @@ +require "English" + +repo_root = Pathname(__FILE__).realpath.parent.parent +repo_root.cd do + ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1" + + Homebrew.install_gem_setup_path! "bundler" + unless quiet_system("bundle", "check") + system "bundle", "install", "--path", "vendor/bundle" + end + + test_task = "test" + %w[rspec minitest coverage].each do |subtask| + next unless ARGV.flag?("--#{subtask}") + test_task = "test:#{subtask}" + end + + system "bundle", "exec", "rake", test_task + Homebrew.failed = !$CHILD_STATUS.success? +end diff --git a/Library/Homebrew/cask/cmd/brew-cask.rb b/Library/Homebrew/cask/cmd/brew-cask.rb new file mode 100755 index 000000000..825c4cb81 --- /dev/null +++ b/Library/Homebrew/cask/cmd/brew-cask.rb @@ -0,0 +1,12 @@ +require "pathname" + +$LOAD_PATH.unshift(File.expand_path("../../lib", Pathname.new(__FILE__).realpath)) + +require "hbc" + +begin + Hbc::CLI.process(ARGV) +rescue Interrupt + puts + exit 130 +end -- cgit v1.2.3