3 desc "Check that the require files match the about_* files"
5 about_files = Dir['src/about_*.rb'].size
6 about_requires = `grep require src/path_to_enlightenment.rb | wc -l`.to_i
7 puts "Checking path_to_enlightenment completeness"
8 puts "# of about files: #{about_files}"
9 puts "# of about requires: #{about_requires}"
10 if about_files > about_requires
11 puts "*** There seems to be requires missing in the path to enlightenment"
18 desc "Check that asserts have __ replacements"
20 puts "Checking for asserts missing the replacement text:"
22 sh "egrep -n 'assert( |_)' src/about_* | egrep -v '__|_n_|project|about_assert' | egrep -v ' *#'"
24 puts "Examine the above lines for missing __ replacements"
25 rescue RuntimeError => ex
32 desc "Run some simple consistancy checks"
33 task :check => ["check:abouts", "check:asserts"]