Sha256: db2c36ec99986e6cfa04d1e8d0b6dec40db35c6d4c47e5c112dcc5f2670b260b

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

gem "pg"

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

# if scroll?("eycloud")
#   @db_stack = "postgresql_91"
# end

after_bundler do
  rake "db:create:all" if config['auto_create']
  
  if config['populate_rake_task']
    sample_rake = <<-RUBY
require './config/environment'
namespace :db do
  desc "Populate the database with sample data"
  task :sample do
  end
  task :populate => :sample
end
RUBY
    File.open("lib/tasks/sample.rake", 'w') {|f| f.write(sample_rake)}
  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:
  - auto_create:
      type: boolean
      prompt: "Create PostgreSQL database with default configuration?"

  - populate_rake_task:
      type: boolean
      prompt: "Add db:sample rake task?"

  - pg_username:
      type: string
      prompt: "PostgreSQL username:"
  - pg_password:
      type: string
      prompt: "PostgreSQL password:"

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
appscrolls-0.7.1 scrolls/postgresql.rb
appscrolls-0.7.0 scrolls/postgresql.rb
eldarscrolls-0.7.0 scrolls/postgresql.rb
ey_rails_wizard-0.6.0 scrolls/postgresql.rb