Skip to content

Commit

Permalink
Fixed 'rake todo', broken after last mspec change
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Davis committed Feb 25, 2008
1 parent f26bb0c commit d348928
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions rakelib/todo.rake
Expand Up @@ -2,19 +2,17 @@

task :todo do
excludes = Hash.new 0
Dir.chdir "spec/data" do
Find.find "." do |path|
next unless File.file? path
next unless File.size? path
dir = File.dirname(path).sub(/^\../, '')

excludes[dir] += File.readlines(path).size
end
Find.find "spec/tags" do |path|
next unless File.file? path
next unless File.size? path
dir = File.dirname(path).sub(/^\../, '')

excludes[dir] += File.readlines(path).size
end

total = 0
excludes.sort_by { |_, v| -v }.each do |dir, count|
puts "%3d: spec/%s" % [count, dir]
puts "%3d: %s" % [count, dir]
total += count
end
puts "%3d: TOTAL" % total
Expand Down

0 comments on commit d348928

Please sign in to comment.