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

39 lines (32 sloc) 0.918 kb
require 'rake'
require 'rake/gempackagetask' # TODO Remove.
task :default => :spec
# Specs.
#
require 'spec'
require 'spec/rake/spectask'
spec_root = File.join(File.dirname(__FILE__), 'spec')
desc "Run specs"
Spec::Rake::SpecTask.new(:spec) do |t|
t.spec_opts = ['--options', "\"#{File.join(spec_root, 'spec.opts')}\""]
t.spec_files = FileList[File.join(spec_root, '**', '*_spec.rb')]
end
task :simplecov do
ENV['COV'] = 'yes'
end
task :cov do
Rake::Task['simplecov'].invoke
Rake::Task['spec'].invoke
end
# Very pedestrian, coder only cloc.
#
task :stats do
%w|project_prototype lib spec test_project|.each do |dir|
original_dir = dir
dir = "#{dir}/*.rb"
dirs = 5.times.inject([dir]) do |dirs, _|
dirs << dirs.last.gsub(%r{/*.rb}, '/**/*.rb')
end
puts original_dir << ': ' << `wc -l #{dirs.join(' ')} 2>/dev/null`.chop.split("\n").last.gsub(/(\d+)\stotal$/, '\1')
end
end
Jump to Line
Something went wrong with that request. Please try again.