forked from resque/resque-scheduler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
41 lines (34 loc) · 795 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
40
41
require 'bundler/gem_tasks'
$LOAD_PATH.unshift 'lib'
task :default => :test
desc 'Run tests'
task :test do
if RUBY_VERSION =~ /^1\.8/
unless ENV['SEED']
srand
ENV['SEED'] = (srand % 0xFFFF).to_s
end
$stdout.puts "Running with SEED=#{ENV['SEED']}"
srand Integer(ENV['SEED'])
elsif ENV['SEED']
ARGV += %W(--seed #{ENV['SEED']})
end
Dir['test/*_test.rb'].each do |f|
require File.expand_path(f)
end
end
desc 'Run rubocop'
task :rubocop do
unless RUBY_VERSION < '1.9'
sh('rubocop --config .rubocop.yml --format simple') { |r, _| r || abort }
end
end
begin
require 'rdoc/task'
Rake::RDocTask.new do |rd|
rd.main = 'README.md'
rd.rdoc_files.include('README.md', 'lib/**/*.rb')
rd.rdoc_dir = 'doc'
end
rescue LoadError
end