README.markdown in bcdatabase-1.0.0 vs README.markdown in bcdatabase-1.0.1
- old
+ new
@@ -12,23 +12,23 @@
## Using bcdatabase to configure the database for a Rails application
A bog-standard rails application's `config/database.yml` file looks like this:
development:
- adapter: oracle-enhanced
+ adapter: oracle_enhanced
database: //localhost/XE
username: cfg_animal
password: not-important
test:
- adapter: oracle-enhanced
+ adapter: oracle_enhanced
database: //localhost/XE
username: cfg_animal_test
password: who-cares
production:
- adapter: oracle-enhanced
+ adapter: oracle_enhanced
database: //super/prod
username: cfg_animal
password: very-secret
Rails allows this file to contain [ERB][]. `bcdatabase` uses ERB to replace an entire configuration block. If you wanted to replace, say, just the production block in this example, you would transform it like so:
@@ -37,17 +37,17 @@
require 'bcdatabase'
bcdb = Bcdatabase.load
%>
development:
- adapter: oracle-enhanced
+ adapter: oracle_enhanced
database: //localhost/XE
username: cfg_animal
password: not-important
test:
- adapter: oracle-enhanced
+ adapter: oracle_enhanced
database: //localhost/XE
username: cfg_animal_test
password: who-cares
<%= bcdb.production :prod, :cfg_animal %>
@@ -81,27 +81,27 @@
### Example
If you have an `/etc/nubic/db/stage.yml` file that looks like this:
defaults:
- adapter: oracle-enhanced
+ adapter: oracle_enhanced
database: //mondo/stage
cfg_animal:
password: secret
personnel:
username: pers
password: more-secret
You have defined two configuration entries. `:stage, :cfg_animal`:
- adapter: oracle-enhanced
+ adapter: oracle_enhanced
username: cfg_animal
password: secret
database: //mondo/stage
and `:bcstage, :personnel`:
- adapter: oracle-enhanced
+ adapter: oracle_enhanced
username: pers
password: more-secret
database: //mondo/stage
## Obscuring passwords