Sha256: b173ebd30616e91f60dc9738f0bf623da2c804e539de831f810d7990877dbc66

Contents?: true

Size: 1.12 KB

Versions: 21

Compression:

Stored size: 1.12 KB

Contents

namespace :challah do
  desc "Setup the challah gem within this rails app."
  task :setup => [ "challah:setup:migrations", "challah:unpack:user", "db:migrate", "challah:setup:seeds", "challah:users:create", "challah:banner" ]

  task :banner do
    banner = <<-str

  ==========================================================================
  Challah has been set up successfully!

  Your app now has a User model that is ready to go.

  And some new routes set up for /sign-in and /sign-out. You can use these
  for the built-in log in page or roll your own if you'd prefer.

  The user that you just created is ready to log in.

  ==========================================================================

    str

    puts banner
  end

  desc "Insert the default users, roles and permissions."
  task :seeds => [ "challah:setup:seeds" ]

  namespace :setup do
    task :migrations do
      puts "Copying migrations..."
      ENV['FROM'] = 'challah_engine'
      Rake::Task['railties:install:migrations'].invoke
    end

    task :seeds => :environment do
      puts "Populating seed data..."
      Challah::Engine.load_seed
    end
  end
end

Version data entries

21 entries across 20 versions & 2 rubygems

Version Path
challah-1.0.0 lib/tasks/setup.rake
challah-1.0.0.beta3 lib/tasks/setup.rake
challah-1.0.0.beta2 lib/tasks/setup.rake
challah-1.0.0.beta lib/tasks/setup.rake
challah-0.9.1.beta.3 lib/tasks/setup.rake
challah-0.9.1.beta.2 lib/tasks/setup.rake
challah-0.9.1.beta lib/tasks/setup.rake
challah-0.9.0 lib/tasks/setup.rake
challah-0.9.0.pre lib/tasks/setup.rake
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/lib/tasks/setup.rake
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/lib/tasks/setup.rake
challah-0.8.3 lib/tasks/setup.rake
challah-0.8.2 lib/tasks/setup.rake
challah-0.8.1 lib/tasks/setup.rake
challah-0.8.0 lib/tasks/setup.rake
challah-rolls-0.1.0 vendor/bundle/gems/challah-0.8.0.pre/lib/tasks/setup.rake
challah-0.8.0.pre lib/tasks/setup.rake
challah-0.7.1 lib/tasks/setup.rake
challah-0.7.0 lib/tasks/setup.rake
challah-0.7.0.pre2 lib/tasks/setup.rake