Skip to content

Instantly share code, notes, and snippets.

@hron
Created November 11, 2009 00:15
Show Gist options
  • Save hron/231429 to your computer and use it in GitHub Desktop.
Save hron/231429 to your computer and use it in GitHub Desktop.
common: &common
adapter: mysql
dev: &dev
<<: *common
username: root
<% if File.exist? "/opt/local/var/run/mysql5/mysqld.sock" %>
socket: /opt/local/var/run/mysql5/mysqld.sock
<% elsif File.exist? "/tmp/mysql.sock" %>
socket: /tmp/mysql.sock
<% elsif File.exist? "/var/run/mysqld/mysqld.sock" %>
socket: /var/run/mysqld/mysqld.sock
<% end %>
development:
<<: *dev
database: birdy
test:
<<: *dev
database: birdy_test
production:
<<: *common
host: 10.0.1.24
<% if `uname -n`.strip == "staging" %>
database: birdy_stage
username: birdy_stage
password: somethingsecret
<% else %>
database: birdy
username: birdy
password: somethingelsethatissecret
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment