beast rev 2066
[beast-modified.git] / vendor / plugins / open_id_authentication / tasks / open_id_authentication_tasks.rake
blob0b9cc52042388f795d34b06ed21ae4c962c03ac1
1 namespace :open_id_authentication do
2   namespace :db do
3     desc "Creates authentication tables for use with OpenIdAuthentication"
4     task :create => :environment do
5       raise "Task unavailable to this database (no migration support)" unless ActiveRecord::Base.connection.supports_migrations?
6       require 'rails_generator'
7       require 'rails_generator/scripts/generate'
8       Rails::Generator::Scripts::Generate.new.run([ "open_id_authentication_tables", "add_open_id_authentication_tables" ])
9     end
11     desc "Clear the authentication tables"
12     task :clear => :environment do
13       OpenIdAuthentication::DbStore.gc
14     end
15   end
16 end