forked from flapjack/flapjack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
52 lines (38 loc) · 1.01 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
52
#!/usr/bin/env ruby
unless $:.include?(File.dirname(__FILE__) + '/lib/')
$: << File.dirname(__FILE__) + '/lib'
end
require 'fileutils'
require 'rake'
Dir['tasks/**/*.rake'].each { |t| load t }
require 'cucumber'
require 'cucumber/rake/task'
require 'rake/clean'
require 'bundler'
Bundler::GemHelper.install_tasks
require 'pact/tasks'
Cucumber::Rake::Task.new(:features) do |t|
#t.cucumber_opts = 'features --format pretty'
t.cucumber_opts = '--format progress'
end
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task :default => :tests
namespace :verify do
task :uncommitted do
def red(text)
"\e[0;31;49m#{text}\e[0m"
end
uncommitted = `git ls-files -m`.split("\n")
if uncommitted.size > 0
puts red('The following files are uncommitted:')
uncommitted.each do |filename|
puts red(" - #{filename}")
end
exit 1
end
end
task :all => [ :uncommitted ]
end
task :verify => [ 'verify:all', :spec, :features]
task :tests => [ :spec, :features]