JS_FILES = FileList.new("lib/**/*.js") + FileList.new("specs/**/*.js") TORTOISEPROC = %Q|"C:/Program Files/TortoiseSVN/bin/TortoiseProc.exe"| rule '.lint' => '.js' do |t| STDOUT.flush # show "(in c:/somedir)" in VS Output window before shelling out sh %Q|cscript /NoLogo vendor/jslint/jslint.wsf <"#{t.source}"| already_existed = File.file?(t.name) FileUtils.touch(t.name) sh %Q|attrib +h "#{t.name}"| unless already_existed end task :lint => JS_FILES.ext('lint') do puts 'Lint passed.' end task :commit => :lint do print "Opening TortoiseSVN commit dialog... " STDOUT.flush system %Q|#{TORTOISEPROC} /command:commit /path:"#{Dir.getwd}" /notempfile| puts "Done." end task :modifications do print "Opening TortoiseSVN modifications window... " system %Q|#{TORTOISEPROC} /command:repostatus /path:"#{Dir.getwd}" /notempfile| puts "Done." end