shuber / sortable

Allows you to sort ActiveRecord items in multiple lists with multiple scopes

This URL has Read+Write access

shuber (author)
Mon Jul 06 10:30:17 -0700 2009
commit  8ca12806647226d2e54354059c6944458302e875
tree    3e5c02a069bbe6693691be7eef13ad199cea5f1c
parent  90fd4ab86a48661a1b808f9bb906c4c9e45fca6c
sortable / Rakefile
100644 35 lines (31 sloc) 1.053 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
 
desc 'Default: run the sortable tests'
task :default => :test
 
namespace :test do
  desc 'Test the sortable gem/plugin with all active record versions >= 2.0.0'
  task :all do
    versions = `gem list`.match(/activerecord \((.+)\)/).captures[0].split(/, /).select { |v| v[0,1].to_i > 1 }
    versions.each do |version|
      puts "\n============================================================="
      puts "TESTING WITH ACTIVE RECORD VERSION #{version}\n\n"
      system "rake test ACTIVE_RECORD_VERSION=#{version}"
      puts "\n\n"
    end
  end
end
 
desc 'Test the sortable gem/plugin.'
Rake::TestTask.new(:test) do |t|
  t.libs << 'lib'
  t.pattern = 'test/*_test.rb'
  t.verbose = true
end
 
desc 'Generate documentation for the sortable gem/plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = 'sortable'
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README.rdoc')
  rdoc.rdoc_files.include('lib/**/*.rb')
end