Sha256: 8d46ae8e26b2affa315cd092415d71d7098e0624978f69a919efccb45a662db5
Contents?: true
Size: 1.86 KB
Versions: 1
Compression:
Stored size: 1.86 KB
Contents
namespace :couchdb do desc "Create the CouchDB database defined in config/couchdb.yml for the current environment" task :create, :database, :needs => :environment do |t, args| args.with_defaults(:database => "*") puts CouchRestRails::Database.create(args.database) end desc "Deletes the CouchDB database for the current RAILS_ENV" task :delete, :database, :needs => :environment do |t, args| args.with_defaults(:database => "*") puts CouchRestRails::Database.delete(args.database) end desc "Deletes and recreates the CouchDB database for the current RAILS_ENV" task :reset => [:delete, :create] namespace :test do desc "Empty the test CouchDB database" task :reset do `rake RAILS_ENV=test couchdb:delete` `rake RAILS_ENV=test couchdb:create` end end namespace :fixtures do desc "Load fixtures into the current environment's CouchDB database" task :load, :database, :needs => :environment do |t, args| args.with_defaults(:database => "*") puts CouchRestRails::Fixtures.load(args.database) end task :dump, :database, :needs => :environment do |t, args| args.with_defaults(:database => "*") puts CouchRestRails::Fixtures.dump(args.database) end end namespace :views do desc "Push views into the current environment's CouchDB database" task :push, :database, :design_doc, :needs => :environment do |t, args| args.with_defaults(:database => "*", :design_doc => "*") puts CouchRestRails::Views.push(args.database, args.design_doc) end end namespace :lucene do desc "Push views into the current environment's CouchDB database" task :push, :database, :design_doc, :needs => :environment do |t, args| args.with_defaults(:database => "*", :design_doc => "*") puts CouchRestRails::Lucene.push(args.database, args.design_doc) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
therealadam-couchrest-rails-0.1.1 | lib/couch_rest_tasks.rb |