Added v 0.4.0 snapshot.
[twitter4r-core.git] / tasks / find.rake
blobd3cb891fafc7845a006091982b19d8f06fb87e1e
2 def egrep(pattern)
3   Dir.glob('**/*.rb').each do |name|
4     count = 0
5     open(name) do |f|
6       while line = f.gets
7         count += 1
8         if line =~ pattern
9           puts "#{name}:#{count}:#{line}"
10         end
11       end
12     end
13   end
14 end
16 namespace :find do
17   desc "Find TODO tags in the code"
18   task :todos do
19     egrep /(TODO)/
20   end
22   desc "Find FIXME tags in the code"
23   task :fixmes do
24     egrep /(FIXME)/
25   end
27   desc "Find TBD tags in the code"
28   task :tbds do
29     egrep /(TBD)/
30   end
31 end