Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (27 sloc) 0.703 kb
require 'rubygems'
require 'bundler/setup'
require 'rspec/core/rake_task'
task :default => :test
task :test => :spec
if !defined?(RSpec)
puts "spec targets require RSpec"
else
desc "Run all examples"
RSpec::Core::RakeTask.new(:spec) do |t|
#t.pattern = 'spec/**/*_spec.rb' # not needed this is default
t.rspec_opts = ['-cfs']
end
end
namespace :db do
desc 'Auto-migrate the database (destroys data)'
task :migrate => :environment do
DataMapper.auto_migrate!
end
desc 'Auto-upgrade the database (preserves data)'
task :upgrade => :environment do
DataMapper.auto_upgrade!
end
end
task :environment do
require File.join(File.dirname(__FILE__), 'environment')
end
Jump to Line
Something went wrong with that request. Please try again.