Skip to content

Generates a config/database.yml file with the environment information from your database service.

Notifications You must be signed in to change notification settings

closer/step-rails-database-yml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails database yml

Generates a config/database.yml file with the environment information from your database service.

For this step you need to have a mysql or postgres. See the services on wercker devcenter for more information about services.

What's new

  • Use $PWD instead of $WERCKER_ROOT_DIR

Options

  • service This option is not required. If set, it will load the template from the specified service; otherwise, it will infer the service from the environment.

Example

The following wercker.yml:

box: wercker/ruby
services:
  - wercker/postgresql
build:
  steps:
    - rails-database-yml

Will generate the following config/database.yml:

test:
    adapter: postgresql
    encoding: "utf8"
    database: <%= ENV['WERCKER_POSTGRESQL_DATABASE'] %><%= ENV['TEST_ENV_NUMBER'] %>
    username: <%= ENV['WERCKER_POSTGRESQL_USERNAME'] %>
    password: <%= ENV['WERCKER_POSTGRESQL_PASSWORD'] %>
    host: <%= ENV['WERCKER_POSTGRESQL_HOST'] %>
    port: <%= ENV['WERCKER_POSTGRESQL_PORT'] %>

Changelog

0.9.3

  • Use $PWD instead of $WERCKER_ROOT_DIR

0.9.2

  • Adds environment variable TEST_ENV_NUMBER to the database name

0.9.1

  • Initial version

About

Generates a config/database.yml file with the environment information from your database service.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages