Sha256: 0271e7b891b3a1c49ae778859f189e7828021a1b98783a5e96228057af79e804
Contents?: true
Size: 1.81 KB
Versions: 2
Compression:
Stored size: 1.81 KB
Contents
require 'rubygems' require 'rake' task :default => [:test] require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'test' test.pattern = 'test/**/*_test.rb' test.warning = true test.verbose = false end desc "Run all of them fancy benchmarks, Howard!" task :benchmarks do Dir["test/benchmark/*.rb"].each do |file| puts ">> Running #{file}" puts %x[ruby #{file}] end end desc "Run Flog against library (except tests)" task :flog do puts %x[find ./lib -name *.rb | xargs flog] end desc "Run Flay against library (except tests)" task :flay do puts %x[find ./lib -name *.rb | xargs flay] end desc "Run Roodi against library (except tests)" task :roodi do puts %x[find ./lib -name *.rb | xargs roodi] end desc "Stats on lines of code and test" task :stats do loc = %x[find ./lib -name *.rb | xargs cat | wc -l].strip.to_i lotc = %x[find ./test -name *.rb | xargs cat | wc -l].strip.to_i total, ratio = (loc + lotc), (lotc / loc.to_f) fmt = " Code: %d\n Test: %d\n -----\n Total: %d Ratio (test/code): %f" puts fmt % [loc, lotc, loc + lotc, ratio] end # # Some monks like diamonds. I like gems. begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.name = "riot" gem.summary = "An extremely fast, expressive, and context-driven unit-testing framework. Protest the slow test." gem.description = "An extremely fast, expressive, and context-driven unit-testing framework. A replacement for all other testing frameworks. Protest the slow test." gem.email = "gus@gusg.us" gem.homepage = "http://github.com/thumblemonks/riot" gem.authors = ["Justin 'Gus' Knowlden"] gem.add_dependency 'term-ansicolor' end Jeweler::GemcutterTasks.new rescue LoadError puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
riot-0.10.11 | Rakefile |
riot-0.10.10 | Rakefile |