Sha256: 7915ead27863bcc289fd5714c57c572828fed6c2389c1fac5c5c86b797c65522

Contents?: true

Size: 499 Bytes

Versions: 3

Compression:

Stored size: 499 Bytes

Contents

namespace 'db' do

  kit = Kit.new 'config.yml'

  task :create do
    kit.db_create
  end

  task :destroy do
    kit.db_destroy
  end

  task :reset => [:destroy, :create, :migrate] do
  end

  task :environment do
    kit.db_connect
  end

  task :migrate, [:direction, :steps]  => [:create, :environment] do |_, args|
    args.with_defaults(direction: nil, steps: 1)
    if args[:direction].nil?
      kit.db_migrate
    else
      kit.db_migrate args[:direction], args[:steps]
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kit-1.1.0 lib/kit/rake/admin/database.rb
kit-1.0.1 lib/kit/rake/admin/database.rb
kit-1.0.0 lib/kit/rake/admin/database.rb