opening database prompt based on database.yml

Hello everybody,

I wrote a script to open a database prompt based on the contents of
database.yml

See the rdb_prompt directory under

  http://github.com/stephanwehner/railsgoodies

I find it very useful, since I work with several different branches of
Rails projects, each possibly having different migrations which are
applied to different (mysql) databases.

Opening a (mysql) prompt would require looking up the name of the
database, and more -- which a script can do faster than me.

(sqlite3 / postgresql also supported)

The current README is below. To obtain a copy, use this "Public Clone
URL":

  git://github.com/stephanwehner/railsgoodies.git

or use github's download function.

Cheers,

Stephan

=========================== Contents of file README

Don't want to piss on anyone's parade but Rails comes with a script
that does that eg

ruby script/dbconsole production

Fred

Stephan Wehner wrote:

Frederick Cheung wrote:

Rails projects, each possibly having different migrations which are
applied to different (mysql) databases.

Opening a (mysql) prompt would require looking up the name of the
database, and more -- which a script can do faster than me.

Don't want to piss on anyone's parade but Rails comes with a script
that does that eg

ruby script/dbconsole production

It looks to me that script/dbconsole doesn't hide the password for mysql
and postgresql on all platforms -- whereas rdb_prompt takes care of that
(for postgresql trivially by not supporting passwords).

So I'll put a patch together.

The patch is attached to this new ticket

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2707

Please review.

Stephan