BarBack is the Rails console you can share with non technical people. It's a Rails engine that enables you to (with HTTP basic authentication):
- execute an ActiveRecord or SQL read query;
- save an ActiveRecord or SQL read query for later;
- view the query result and update, create, or delete records;
- share the query result with anybody via a link that contains a random UUID;
- export the query result to CSV.
Add this line to your application's Gemfile:
gem 'bar_back'
And then execute:
$ bundle
$ bin/rails generator bar_back:install
BarBack by default is mounted at /bar_back
in config/routes.rb
:
mount BarBack::Engine => "/bar_back"
HTTP basic authentication is enabled by default in config/initializers/bar_back.rb
:
BarBack.http_basic_enabled = true
BarBack.http_basic_username = "#{SecureRandom.alphanumeric(10)}"
BarBack.http_basic_password = "#{SecureRandom.alphanumeric(10)}"
$ bin/rails test test/
Contributions are more than welcome, but I'd love to keep BarBack simple and bullshit free.
Please let's discuss in an issue before submitting a pull request.
The gem is available as open source under the terms of the MIT License.