public
Description: A Ruby state machine library, like assm / acts_as_state_machine, but with a nicer, more sensible API (in my opinion).
Homepage: http://groups.google.com/group/ruby-workflow
Clone URL: git://github.com/ryan-allen/workflow.git
workflow / rakefile.rb
100644 25 lines (20 sloc) 0.613 kb
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
task :default do
  Rake::Task['run_specs'].invoke
end
 
task :spec => [:run_specs] do
end
 
task :run_specs do
  puts `spec --require specs/bootstrap.rb --color specs/*_spec.rb`
  raise "specs failed" if $?.exitstatus != 0
end
 
task :run_specs_without_specdoc do
  puts `spec --require specs/bootstrap.rb --color specs/*_spec.rb`
  raise "specs failed" if $?.exitstatus != 0
end
 
task :loc do
  loc, nf, blank = 0, 0, /^\s+?$/
  Dir['**/*.rb'].each do |path|
    open(path) { |f| nf += 1; f.each { |line| loc += 1 unless line =~ blank } }
  end
  puts "There are #{loc} non-blank line(s) across #{nf} file(s)."
end