Sha256: d521bd74db361d4dea20ea81293869728b9414633c9672669bf23f1ba3019a5e

Contents?: true

Size: 935 Bytes

Versions: 2

Compression:

Stored size: 935 Bytes

Contents

def source_paths
  [File.expand_path(File.dirname(__FILE__))]
end

# Install Gems
# ----------------------------
gem 'pg'

# Setup the app config
appname = "set_appname"
snake_name = "set_snake_name"

# Set the name of the app in application.rb
gsub_file('config/application.rb', 'module App', "module #{appname}")

# Edit database.yml to work with docker
insert_into_file('config/database.yml', "\s\susername: postgres\n\s\spassword:\n\s\shost: postgres\n\s\sport: 5432\n", :after => "default: &default\n")
gsub_file('config/database.yml', 'app_development', "#{snake_name}_development")
gsub_file('config/database.yml', 'app_test', "#{snake_name}_test")
gsub_file('config/database.yml', 'app_production', "#{snake_name}_production")
gsub_file('config/database.yml', 'username: app', "username: #{snake_name}")
gsub_file('config/database.yml', 'APP_DATABASE_PASSWORD', "#{snake_name.upcase}_DATABASE_PASSWORD")

run('bundle install')

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
htcht-0.1.6 lib/htcht/cli/rails/templates/default_template.rb
htcht-0.1.3 lib/htcht/cli/rails/templates/default_template.rb