Sha256: f9c44b8f1ce657ec09f54a09e323b5dc37de8e15ff0eccbe1a64918f1002947b
Contents?: true
Size: 1.85 KB
Versions: 3
Compression:
Stored size: 1.85 KB
Contents
namespace :inkling do desc "Boostraps (calls generators, creates databases, runs migrations, seeds the database) Inkling" task :bootstrap => ["environment", "inkling:generate", "inkling:run_bootstrap_tasks", "db:create", "db:migrate", "inkling:init", "inkling:welcome_msg"] desc "Wipes migrations dir Hard reset (caveat raker), then bootstrap. Destroys db, recreates it, regenerates all migrations, migrates, and initializes with inkling data" task :rebuild => ["environment", "inkling:destroy_migrations", "db:drop", "inkling:bootstrap"] desc "Runs system('rm -rf db/migrate/*')" task :destroy_migrations do system("rm -rf db/migrate/*") end desc "Runs system('rails generate inkling')" task :generate do system("rails generate inkling") end desc "Iterates through array Inkling::REBUILD_TASKS and executes each task it finds (useful to add your bootstrap sequence to inkling:rebuild)" task :run_bootstrap_tasks do for task in Inkling::BOOTSTRAP_TASKS Rake::Task[task].execute end end desc "Create a default user with login 'admin' and password 'admin'" task :default_admin => [:environment] do user = Inkling::User.create!(:email => "admin@localhost.com", :password => "test123", :password_confirmation => "test123") Inkling::RoleMembership.create!(:user => user, :role => Inkling::Role.find_by_name(Inkling::Role::ADMIN)) puts "Inkling> Created default administrator: login - 'admin@localhost.com', password - 'test123'." end desc "Initializes inkling data." task :init => [:environment] do Inkling::Role.create!(:name => Inkling::Role::ADMIN) Rake::Task["inkling:default_admin"].execute puts "Inkling> Created administrator role." end task :welcome_msg do puts Inkling::WELCOME_MSG end desc "Runs specs and cukes." task :megatest => [:environment, :spec, :cucumber] end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
inkling-0.0.5 | lib/tasks/inkling.rake |
inkling-0.0.4 | lib/tasks/inkling.rake |
inkling-0.0.3a | lib/tasks/inkling.rake |