forked from Homebrew/homebrew-cask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
51 lines (41 loc) · 1.24 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
require 'coveralls/rake/task'
require 'rake/testtask'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
$LOAD_PATH.unshift(File.expand_path('../lib', __FILE__))
namespace :test do
Rake::TestTask.new(:minitest) do |t|
# TODO: setting the --seed here is an ugly temporary hack, to remain only
# until test-suite glitches are fixed.
ENV['TESTOPTS'] = '--seed=14830' if ENV['TRAVIS']
t.pattern = "test/**/*_test.rb"
t.libs << 'test'
end
RSpec::Core::RakeTask.new(:rspec)
desc 'Run tests for minitest and RSpec with coverage'
task :coverage do
ENV['COVERAGE'] = '1'
Rake::Task[:test].invoke
end
end
desc 'Run tests for minitest and RSpec'
task :test => ['test:minitest', 'test:rspec']
Coveralls::RakeTask.new
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = ['--force-exclusion']
end
task :default => [:test, :rubocop]
desc 'Open a REPL for debugging and experimentation'
task :console do
require 'pry'
require 'pry-byebug'
require 'vendor/homebrew-fork/global'
require 'hbc'
ARGV.clear
Hbc.pry
end
desc 'Generate man page from Markdown source'
task :man do
sh 'ronn --roff --pipe --organization=Homebrew-cask --manual=brew-cask ' \
'doc/src/brew-cask.1.md > man/man1/brew-cask.1'
end