This repository has been archived by the owner on Nov 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathRakefile
60 lines (46 loc) · 1.5 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
53
54
55
56
57
58
59
60
require 'rubygems'
require 'bundler'
require 'cucumber'
require 'cucumber/rake/task'
require 'metric_fu'
require 'rake'
require 'rake/clean'
require 'rspec/core/rake_task'
#require 'vagrant'
CLEAN.include ['coverage', 'target', '/tmp/skewer_test_code', '/tmp/more_skewer_test_code', '.skewer.json', '/tmp/skewer*']
RSPEC_PATTERN = 'spec/**/*spec*.rb'
Bundler::GemHelper.install_tasks
MetricFu::Configuration.run do |config|
#define which metrics you want to use
config.metrics = [:saikuro, :flog, :flay, :reek, :roodi]
end
desc "fire up vagrant so we can test the plain ssh update script"
task :vagrant_destroy do
env = Vagrant::Environment.new
env.cli("destroy")
end
task :vagrant_up do
env = Vagrant::Environment.new
env.cli("up")
end
Cucumber::Rake::Task.new(:features, 'skewer') do |t|
no_cloud = ENV['CLOUD'] ? '' : '--tags ~@cloud'
t.cucumber_opts = "features --format pretty --tags ~@wip #{no_cloud}"
end
desc "Run all specs"
RSpec::Core::RakeTask.new do |t|
t.pattern = RSPEC_PATTERN
t.rspec_opts = ['-I lib', '--color']
end
desc "Run all specs with rcov"
RSpec::Core::RakeTask.new("spec:coverage") do |t|
t.rcov = true
# The matcher *spec*.rb is used to invoke spec_helper.rb.
# This makes sure that the RSpec tests get run from within rcov.
# See spec/spec_helper.rb for more info.
t.pattern = RSPEC_PATTERN
t.rcov_opts = %w{--include lib -Ispec --exclude gems\/,spec\/,features\/}
t.rspec_opts = ["-c"]
end
task :default => [:clean, :spec]
#task :features => :vagrant_up