Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d324e69039
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 48 lines (39 sloc) 1.095 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 36 37 38 39 40 41 42 43 44 45 46 47
require 'rake'
require 'rake/clean'
begin
  require 'hanna/rdoctask'
rescue LoadError
  require 'rake/rdoctask'
end

CLEAN.include ["rdoc"]

Rake::RDocTask.new do |rdoc|
  rdoc.rdoc_dir = "rdoc"
  rdoc.options += ["--quiet", "--line-numbers", "--inline-source"]
  rdoc.main = "README"
  rdoc.title = "fixture_dependencies: Rails fixture loading that works with foreign keys"
  rdoc.rdoc_files.add ["README", "MIT-LICENSE", "lib/**/*.rb"]
end

desc "Package fixture_dependencies"
task :package do
  sh %{gem build fixture_dependencies.gemspec}
end

begin
  require 'spec/rake/spectask'

  desc "Run Sequel specs"
  Spec::Rake::SpecTask.new(:spec_sequel) do |t|
    t.spec_files = Dir['spec/*_spec.rb']
    #t.rcov = true
  end

  desc "Run ActiveRecord specs"
  task :spec_ar do
    sh %{#{FileUtils::RUBY} -S rake spec_sequel FD_AR=1}
  end

  desc "Run Sequel and ActiveRecord specs"
  task :default=>[:spec_sequel, :spec_ar]
rescue LoadError
end

desc "Create spec database"
task :spec_migrate do
  sh %{mkdir -p spec/db}
  sh %{sequel -m spec/migrate -E sqlite://spec/db/fd_spec.sqlite3}
end
Something went wrong with that request. Please try again.