From c8fbdffdcb476d6f9e28fb2c333de22241618f3f Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 1 May 2017 02:55:03 +0200 Subject: Add README Include a description and background, usage, and license information. Installation instructions come from the auto-generated README provided by Bundler. --- README.md | 51 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index bc1f48c..c9bd2f9 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,50 @@ -# DBShell::Rails +dbshell-rails +============= + +A Rake task to launch a database shell, using the connection parameters +specified in your Rails application. The shell will be automatically connected +to the current environment's database. + +The following databases are supported: + +* PostgreSQL (runs `psql`) +* MySQL (runs `mysql`) +* SQLite (runs `sqlite3`) + +After being a Djangonaut for a while and then doing more work in Rails, I was +surprised that it apparently has no equivalent to Django's +`./manage.py dbshell` command. This launcher program aims to provide that +missing functionality. + + +## Usage + + $ rake dbshell + example_app_development=# + + $ rails dbshell + example_app_development=# + + $ RAILS_ENV=test rake dbshell + example_app_test=# -TODO: Write a gem description ## Installation Add this line to your application's Gemfile: -```ruby +``` ruby gem 'dbshell-rails' ``` And then execute: - $ bundle + $ bundle -Or install it yourself as: - - $ gem install dbshell-rails - -## Usage +Or install it yourself with: -TODO: Write usage instructions here + $ gem install dbshell-rails -## Contributing -1. Fork it ( https://github.com/[my-github-username]/dbshell-rails/fork ) -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create a new Pull Request +## License +Licensed under the MIT License. See the included LICENSE.txt file. -- cgit v1.2.3