-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathRakefile
77 lines (62 loc) · 1.77 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
require 'rake'
require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'
require 'rspec/core/rake_task'
require 'link_checker'
task :default => [:test_everything]
task :test_everything do
Rake::Task['rspec'].invoke
Rake::Task['run_rackup_daemon'].invoke
begin
Rake::Task['jasmine:ci'].invoke
Rake::Task['integration'].invoke
Rake::Task['cucumber_tests'].invoke
Rake::Task['robot_tests'].invoke
Rake::Task['check_external_links'].invoke
ensure
Rake::Task['stop_rackup_daemon'].invoke
end
end
desc "Run the spec tasks"
RSpec::Core::RakeTask.new(:rspec) do |t|
t.rspec_opts = ["--tag ~integration"]
end
desc "Run the integration spec tasks"
RSpec::Core::RakeTask.new(:integration) do |t|
t.rspec_opts = ["--tag integration"]
end
task :robot_tests do
sh "robot -d robottests/output --noncritical 'developing' robottests"
end
desc "run cucumber features"
Cucumber::Rake::Task.new(:cucumber_tests) do |t|
t.cucumber_opts = "features --format pretty"
end
desc "Link checking on ScrumPrimer.org"
task :check_external_links do
require 'link_checker'
LinkChecker.new(:target => 'http://127.0.0.1:9292').check_uris
end
desc "Startup rackup as a daemon and store the pid"
task :run_rackup_daemon do
sh "rackup -D -P rackup.pid"
end
desc "Kill rackup based on the pid"
task :stop_rackup_daemon do
sh "kill -9 `cat rackup.pid`"
sh "rm -f rackup.pid"
end
begin
require 'jasmine'
load 'jasmine/tasks/jasmine.rake'
rescue LoadError
task :jasmine do
abort "Jasmine is not available. In order to run jasmine, you must: (sudo) gem install jasmine"
end
end
# Deprecated. Needs to be replaced with another linter
#Jshintrb::JshintTask.new :jshint do |t|
#t.pattern = 'public/js/**/scrumprimer.js'
#t.options = :defaults
#end