public
Description: Ruby gem which process flat files from IANA
Homepage: http://yesmar.github.com/iana/
Clone URL: git://github.com/yesmar/iana.git
iana / Rakefile
100644 33 lines (25 sloc) 0.707 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
26
27
28
29
30
31
32
33
#!/usr/bin/env ruby
 
require 'rake/testtask'
 
Rake::TestTask.new do |t|
  t.libs << "test"
  t.test_files = FileList['test/*.rb']
  t.verbose = true
end
 
task :default do
  system("rake -T")
end
 
namespace :todo do
  desc 'List TODOs in all .rb files under lib/'
  task(:list) do
      FileList["lib/**/*.rb"].egrep(/TODO/)
  end
 
  desc 'Edit all TODOs in VIM' # or your favorite editor
  task(:edit) do
      # jump to the first TODO in the first file
      cmd = 'vim +/TODO/'
 
      filelist = []
      FileList["lib/**/*.rb"].egrep(/TODO/) { |fn,cnt,line| filelist << fn }
 
      # will fork a new process and exit, if you're using gvim
      system("#{cmd} #{filelist.sort.join(' ')}")
  end
end