Rakefile in ZenTest-3.4.3 vs Rakefile in ZenTest-3.5.1
- old
+ new
@@ -1,16 +1,14 @@
# -*- ruby -*-
-ENV["RUBY_FLAGS"]="-Ilib:bin:test" # FIX
+$: << 'lib'
require 'rubygems'
require 'hoe'
require './lib/zentest.rb'
Hoe.new("ZenTest", ZenTest::VERSION) do |p|
- paragraphs = File.read("README.txt").split(/\n\n+/)
-
p.author = ['Ryan Davis', 'Eric Hodel']
changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
summary, *description = p.paragraphs_of("README.txt", 3, 3..8)
@@ -19,9 +17,28 @@
p.description = description.join("\n\n")
end
task :autotest do
ruby "-Ilib ./bin/autotest"
+end
+
+task :update do
+ 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|
+ 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::Heckle.flags << '-t test/**/*.rb'"
+ f.puts "# Autotest::Heckle.klasses << 'MyClass'"
+ f.puts "# Autotest::Shame.chat_app = :adium"
+ end
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'