Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 41 lines (31 sloc) 0.788 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
gem "pg"

gsub_file "config/database.yml", /username: .*/, "username: #{config['pg_username']}"
gsub_file "config/database.yml", /password: .*/, "password: #{config['pg_password']}"

after_bundler do
  rake "db:create:all"
  
  rakefile("sample.rake") do
<<-RUBY
namespace :db do
desc "Populate the database with sample data"
task :sample => :environment do

end
task :populate => :sample
end
RUBY
  end
end

__END__

name: PostgreSQL
description: Use PostgreSQL for dev & production database
author: drnic

exclusive: orm
category: persistence

run_before: [eycloud]

args: -d postgresql

config:
- pg_username:
type: string
prompt: "Local development PostgreSQL username:"
- pg_password:
type: string
prompt: "Local development PostgreSQL password:"
Something went wrong with that request. Please try again.