Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 43 lines (36 sloc) 1.115 kb
08da5080 »
2006-09-22 moved plugin inside query_stats
1 require 'rake'
2 require 'rake/testtask'
3 require 'rake/rdoctask'
4
5 desc 'Default: run unit tests.'
6 task :default => :test
7
22b3f58d »
2008-07-12 add rake pc, rake test:multi, store up to 1000 queries
8 desc "pre-commit task"
9 task :pc => "test:multi"
10
08da5080 »
2006-09-22 moved plugin inside query_stats
11 desc 'Test the query_stats plugin.'
12 Rake::TestTask.new(:test) do |t|
13 t.libs << 'lib'
14 t.pattern = 'test/**/*_test.rb'
15 t.verbose = true
16 end
17
18 desc 'Generate documentation for the query_stats plugin.'
19 Rake::RDocTask.new(:rdoc) do |rdoc|
20 rdoc.rdoc_dir = 'rdoc'
21 rdoc.title = 'QueryStats'
22 rdoc.options << '--line-numbers' << '--inline-source'
23 rdoc.rdoc_files.include('README')
6f5bc6eb »
2006-09-22 fixed bug which set label to :select after :columns
24 rdoc.rdoc_files.include('CHANGELOG')
08da5080 »
2006-09-22 moved plugin inside query_stats
25 rdoc.rdoc_files.include('lib/**/*.rb')
26 end
22b3f58d »
2008-07-12 add rake pc, rake test:multi, store up to 1000 queries
27
28 DB_ADAPTERS = %w[sqlite3 mysql]
aa881963 »
2008-12-01 test with rails 2.2
29 RAILS_VERSIONS = %w[1.2.6 2.0.2 2.1.1 2.2.2]
22b3f58d »
2008-07-12 add rake pc, rake test:multi, store up to 1000 queries
30
31 namespace :test do
32 desc "test with multiple versions of rails and multiple adapters"
33 task :multi do
34 RAILS_VERSIONS.each do |rails_version|
aa881963 »
2008-12-01 test with rails 2.2
35 puts "Testing with Rails #{rails_version}"
22b3f58d »
2008-07-12 add rake pc, rake test:multi, store up to 1000 queries
36 DB_ADAPTERS.each do |db_adapter|
aa881963 »
2008-12-01 test with rails 2.2
37 puts " - Adapter: #{db_adapter}"
22b3f58d »
2008-07-12 add rake pc, rake test:multi, store up to 1000 queries
38 sh "RAILS_VERSION='#{rails_version}' DB='#{db_adapter}' rake test > /dev/null 2>&1"
39 end
40 end
41 end
42 end
Something went wrong with that request. Please try again.