Sha256: 6aa71d3201b71b9df6069553a847af7d540e2c6f2878b1461a792fe8d71ed208

Contents?: true

Size: 1.7 KB

Versions: 11

Compression:

Stored size: 1.7 KB

Contents

$LOAD_PATH << 'lib'

#rake test
require 'rake/testtask'
Rake::TestTask.new(:test) {|test| test.libs << "test"}
task :default => :test

desc "show help"
task :help do
  puts `./bin/autotest --help`
end

desc "run autotest on itself"
task :autotest do
  ruby "-Ilib -w ./bin/autotest"
end

#TODO exclude /usr/ folder
#TODO improve coverage ? only 20% atm...
desc "show rcov report"
task :rcov_info do
  ruby "-Ilib -S rcov --text-report --save coverage.info test/test_*.rb"
end

desc "update example_dot_autotest.rb with all possible constants"
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

    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

begin
  require 'jeweler'
  Jeweler::Tasks.new do |gem|
    gem.name = "autotest-standalone"
    gem.summary = "Autotest, without ZenTest"
    gem.homepage = "http://github.com/grosser/autotest"
    gem.authors = ["Ryan Davis", "Michael Grosser"]
    gem.files << 'lib/autotest/notify.rb'
  end

  Jeweler::GemcutterTasks.new
rescue LoadError
  puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
autotest-standalone-4.5.11 Rakefile
autotest-standalone-4.5.10 Rakefile
autotest-standalone-4.5.9 Rakefile
autotest-standalone-4.5.8 Rakefile
autotest-standalone-4.5.7 Rakefile
autotest-standalone-4.5.6 Rakefile
autotest-standalone-4.5.5 Rakefile
autotest-standalone-4.5.4 Rakefile
autotest-standalone-4.5.3 Rakefile
autotest-standalone-4.5.2 Rakefile
autotest-standalone-4.5.1 Rakefile