Sha256: ecc0447272e654319d518b3faecc1f93f62ca805143be7de8301147b355edb49

Contents?: true

Size: 1.57 KB

Versions: 6

Compression:

Stored size: 1.57 KB

Contents

require 'rubygems'
require 'rake'

task :default => [:test]

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
  test.libs << 'lib' << 'test'
  test.pattern = 'test/**/*_test.rb'
  test.verbose = false
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"]
  end
  Jeweler::GemcutterTasks.new
rescue LoadError
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
riot-0.10.0 Rakefile
riot-0.9.12 Rakefile
riot-0.9.11 Rakefile
riot-0.9.10 Rakefile
riot-0.9.9 Rakefile
riot-0.9.8 Rakefile