repo.or.cz
/
twitter4r-core.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Minor fixes for twitter4r/twitter4r-core/issues/11
[twitter4r-core.git]
/
tasks
/
find.rake
blob
d3cb891fafc7845a006091982b19d8f06fb87e1e
1
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
15
16
namespace :find do
17
desc "Find TODO tags in the code"
18
task :todos do
19
egrep /(TODO)/
20
end
21
22
desc "Find FIXME tags in the code"
23
task :fixmes do
24
egrep /(FIXME)/
25
end
26
27
desc "Find TBD tags in the code"
28
task :tbds do
29
egrep /(TBD)/
30
end
31
end