Hydroponics

A user interface to seed or destroy large quantities of data in a Rails app as quickly as possible.

This project began after I tried to create 25,000 users in our Rails app, Pipeline, using a ruby script I wrote one day. It took many, many hours to run the script. So then I thought of how much faster it would be if I was just writing plain SQL. But then I remembered how much of a pain it is to write SQL. I read up on Sequel, tried it out, and discovered that it was pleasant to use and very quick.

I came up with the name Hydroponics trying to tie together “Pipeline” and the concept of “seeding” a database. I don’t know if pipelines can have hydroponics in them, but I like the name anyway.

Installation

From the shell:

gem install hydroponics
hydro -ovr <RAILS_ROOT>

where <RAILS_ROOT> is the folder containing your Rails project.

Usage

Go to the url:

http://localhost:9294/dupe/<table>

where <table> is the table name you want to seed. You must already have at least one row in the table for Dupe to work.

Extension

Right now, the Hydroponics UI is a Sinatra app, but it is laid out like a Rails project. Put your new routes in config/hydro_app.rb and your new database actions in app/actions/.

Acknowledgement

All thanks and praise are due to Allah.

Copyright © 2010 Tyler Boyd. See LICENSE for details.