Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 62 lines (53 sloc) 1.623 kb
266b9d2 Ryan Davis Hoe'd the rakefile
zenspider authored
1 require 'rubygems'
7dcb182 Michael Grosser initial clean
authored
2 $LOAD_PATH << 'lib'
36b2ec6 Ryan Davis Switched tests and rakefile to minitest.
zenspider authored
3
4a5bb92 Michael Grosser added better rake test task, updated readme
authored
4 #rake test
5 require 'rake/testtask'
2c3c431 Michael Grosser fixed test task running twice
authored
6 Rake::TestTask.new(:test) {|test| test.libs << "test"}
4a5bb92 Michael Grosser added better rake test task, updated readme
authored
7 task :default => :test
86a854f Eric Hodel Rakefile for ZenTest.
drbrain authored
8
7dcb182 Michael Grosser initial clean
authored
9 desc "run autotest on itself"
b6dfd37 Ryan Davis Added autotest rake rule.
zenspider authored
10 task :autotest do
94e1500 Ryan Davis bin/autotest masks Dir[] warnings from rubygems because they are dumb.
zenspider authored
11 ruby "-Ilib -w ./bin/autotest"
be6df18 Ryan Davis Removed redundancies in rakefile. Using gem spec for most stuff now.
zenspider authored
12 end
8d085de Ryan Davis Updated History for 3.0 release.
zenspider authored
13
7dcb182 Michael Grosser initial clean
authored
14 #TODO exclude /usr/ folder
15 #TODO improve coverage ? only 20% atm...
16 desc "show rcov report"
17 task :rcov_info do
18 ruby "-Ilib -S rcov --text-report --save coverage.info test/test_*.rb"
19 end
20
21 desc "update example_dot_autotest.rb with all possible constants"
eded3a4 Ryan Davis Added automatic updating for example_dot_autotest.rb
zenspider authored
22 task :update do
1509930 Ryan Davis Added email_notify, jabber_notify, and rcov autotest plugins.
zenspider authored
23 system "p4 edit example_dot_autotest.rb"
eded3a4 Ryan Davis Added automatic updating for example_dot_autotest.rb
zenspider authored
24 File.open "example_dot_autotest.rb", "w" do |f|
25 f.puts "# -*- ruby -*-"
26 f.puts
27 Dir.chdir "lib" do
28 Dir["autotest/*.rb"].sort.each do |s|
1509930 Ryan Davis Added email_notify, jabber_notify, and rcov autotest plugins.
zenspider authored
29 next if s =~ /rails|discover/
eded3a4 Ryan Davis Added automatic updating for example_dot_autotest.rb
zenspider authored
30 f.puts "# require '#{s[0..-4]}'"
31 end
32 end
1b21b6a Ryan Davis Added default value to shame.
zenspider authored
33
34 f.puts
1509930 Ryan Davis Added email_notify, jabber_notify, and rcov autotest plugins.
zenspider authored
35
36 Dir["lib/autotest/*.rb"].sort.each do |file|
37 file = File.read(file)
38 m = file[/module.*/].split(/ /).last rescue nil
39 next unless m
40
41 file.grep(/def[^(]+=/).each do |setter|
42 setter = setter.sub(/^ *def self\./, '').sub(/\s*=\s*/, ' = ')
43 f.puts "# #{m}.#{setter}"
44 end
45 end
eded3a4 Ryan Davis Added automatic updating for example_dot_autotest.rb
zenspider authored
46 end
1509930 Ryan Davis Added email_notify, jabber_notify, and rcov autotest plugins.
zenspider authored
47 system "p4 diff -du example_dot_autotest.rb"
eded3a4 Ryan Davis Added automatic updating for example_dot_autotest.rb
zenspider authored
48 end
49
7dcb182 Michael Grosser initial clean
authored
50 begin
51 require 'jeweler'
52 Jeweler::Tasks.new do |gem|
53 gem.name = "autotest"
54 gem.summary = "Autotest, without ZenTest"
55 gem.homepage = "http://github.com/grosser/autotest"
56 gem.authors = ["Ryan Davis"]
3d6c857 Ryan Davis Massive overhaul of autotest and tests.
zenspider authored
57 end
8e796d1 Michael Grosser release as autotest gem
authored
58
59 Jeweler::GemcutterTasks.new
7dcb182 Michael Grosser initial clean
authored
60 rescue LoadError
61 puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
62 end
Something went wrong with that request. Please try again.