forked from WeAreFarmGeek/diplomat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
39 lines (31 loc) · 873 Bytes
/
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
require 'bundler/setup'
Bundler.setup
begin
require 'rubocop/rake_task'
desc 'Run Ruby style checks'
RuboCop::RakeTask.new(:style)
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting style" unless ENV['CI']
end
begin
require 'rspec/core/rake_task'
desc 'Run RSpec examples'
RSpec::Core::RakeTask.new(:spec)
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting spec" unless ENV['CI']
end
begin
require 'cucumber'
require 'cucumber/rake/task'
desc 'Run Cucumber features'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = 'features --format pretty'
end
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting spec" unless ENV['CI']
end
desc 'Run a bootstrapped consul server for testing'
task :consul do
system('consul agent -server -bootstrap -data-dir=/tmp')
end
task default: %w[style spec]