Rakefile in ZenTest-3.9.1 vs Rakefile in ZenTest-3.9.2

- old
+ new

@@ -14,26 +14,34 @@ task :autotest do ruby "-Ilib -w ./bin/autotest" end task :update do + system "p4 edit example_dot_autotest.rb" File.open "example_dot_autotest.rb", "w" do |f| f.puts "# -*- ruby -*-" f.puts Dir.chdir "lib" do Dir["autotest/*.rb"].sort.each do |s| + next if s =~ /rails|discover/ f.puts "# require '#{s[0..-4]}'" end end f.puts - f.puts "# Autotest::AutoUpdate.sleep_time = 60" - f.puts "# Autotest::AutoUpdate.update_cmd = 'svn up'" - f.puts "# Autotest::Emacs.client_cmd = 'emacsclient -e'" - f.puts "# Autotest::Heckle.flags << '-t test/**/*.rb'" - f.puts "# Autotest::Heckle.klasses << 'MyClass'" - f.puts "# Autotest::Shame.chat_app = :adium" + + Dir["lib/autotest/*.rb"].sort.each do |file| + file = File.read(file) + m = file[/module.*/].split(/ /).last rescue nil + next unless m + + file.grep(/def[^(]+=/).each do |setter| + setter = setter.sub(/^ *def self\./, '').sub(/\s*=\s*/, ' = ') + f.puts "# #{m}.#{setter}" + end + end end + system "p4 diff -du example_dot_autotest.rb" end task :sort do begin sh 'for f in lib/*.rb; do echo $f; grep "^ *def " $f | grep -v sort=skip > x; sort x > y; echo $f; echo; diff x y; done'