diff options
| author | AnastasiaSulyagina | 2016-08-18 22:11:42 +0300 |
|---|---|---|
| committer | AnastasiaSulyagina | 2016-08-19 14:50:14 +0300 |
| commit | e81f4ab7deeb40308f240be5ea00091fc8786d7a (patch) | |
| tree | b5418f9149de71c0f05f90cb2b39ab47f46e27b4 /Library/Homebrew/cask/cmd | |
| parent | 5c7c9de669025bbe4cad9829be39c5cf3b31ad25 (diff) | |
| download | brew-e81f4ab7deeb40308f240be5ea00091fc8786d7a.tar.bz2 | |
init
Diffstat (limited to 'Library/Homebrew/cask/cmd')
| -rwxr-xr-x | Library/Homebrew/cask/cmd/brew-cask-tests.rb | 20 | ||||
| -rwxr-xr-x | Library/Homebrew/cask/cmd/brew-cask.rb | 12 |
2 files changed, 32 insertions, 0 deletions
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 |
