Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (34 sloc) 0.795 kb
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
Jump to Line
Something went wrong with that request. Please try again.