-
Notifications
You must be signed in to change notification settings - Fork 25
/
Rakefile
38 lines (32 loc) · 959 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
require 'bundler/gem_tasks'
require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rspec_opts = '--color'
end
require 'cucumber'
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = %w{--tags ~@jruby} unless defined?(JRUBY_VERSION)
end
Cucumber::Rake::Task.new(:wip) do |t|
t.cucumber_opts = %w{-p wip}
end
task :default => [:spec, :features]
require 'timeout'
desc "Run benchmarks"
task :benchmark do
begin
Timeout.timeout(120) do
glob = File.expand_path("../benchmarks/*.rb", __FILE__)
Dir[glob].each { |benchmark| load benchmark }
end
rescue Exception, Timeout::Error => ex
puts "ERROR: Couldn't complete benchmark: #{ex.class}: #{ex}"
puts " #{ex.backtrace.join("\n ")}"
exit 1 unless ENV['CI'] # Hax for running benchmarks on Travis
end
end
require 'yard'
YARD::Rake::YardocTask.new