|
Revision 858, 0.9 kB
(checked in by j_scheid, 4 years ago)
|
Fixed layout bug in graph when graph_remainder_mode=drop; fixed huge unnecessary database query in graph when graph_remainder_mode=keep or empty; added retrieval and storage of block size for files, in addition to file size; added cache for recursive file and block sizes; made web application use cache if possible; minor rendering improvement in graph; faster_nested_set now properly rewires parent association during inserts; added ETA output to file monitor for initial file retrieval phase; added documentation to earth-webapp.yml
|
| Line | |
|---|
| 1 |
# Add your own tasks in files placed in lib/tasks ending in .rake, |
|---|
| 2 |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. |
|---|
| 3 |
|
|---|
| 4 |
require(File.join(File.dirname(__FILE__), 'config', 'boot')) |
|---|
| 5 |
|
|---|
| 6 |
require 'rake' |
|---|
| 7 |
require 'rake/testtask' |
|---|
| 8 |
require 'rake/rdoctask' |
|---|
| 9 |
|
|---|
| 10 |
require 'tasks/rails' |
|---|
| 11 |
|
|---|
| 12 |
## |
|---|
| 13 |
# Run a single test in Rails. |
|---|
| 14 |
# |
|---|
| 15 |
# rake blogs_list |
|---|
| 16 |
# => Runs test_list for BlogsController (functional test) |
|---|
| 17 |
# |
|---|
| 18 |
# rake blog_create |
|---|
| 19 |
# => Runs test_create for BlogTest (unit test) |
|---|
| 20 |
|
|---|
| 21 |
rule "" do |t| |
|---|
| 22 |
if /(.*)_([^.]+)$/.match(t.name) |
|---|
| 23 |
file_name = $1 |
|---|
| 24 |
test_name = $2 |
|---|
| 25 |
if File.exist?("test/unit/#{file_name}_test.rb") |
|---|
| 26 |
file_name = "unit/#{file_name}_test.rb" |
|---|
| 27 |
elsif File.exist?("test/functional/#{file_name}_controller_test.rb") |
|---|
| 28 |
file_name = "functional/#{file_name}_controller_test.rb" |
|---|
| 29 |
else |
|---|
| 30 |
raise "No file found for #{file_name}" |
|---|
| 31 |
end |
|---|
| 32 |
sh "ruby -Ilib:test test/#{file_name} -n /^test_#{test_name}/" |
|---|
| 33 |
end |
|---|
| 34 |
end |
|---|