Home > taps_plugin

taps_plugin

Taps_plugin is a project mainly written in Ruby, based on the MIT license.

Rails 3 plugin for taps access

= Taps Plugin

  • http://github.com/josephholsten/taps_plugin
  • http://rdoc.info/projects/josephholsten/taps_plugin
  • http://www.railsplugins.org/plugins/470-taps
  • mailto:[email protected]

== Description:

Taps is the the easiest way to push and pull data between databases and this plugin makes taps just work in rails environments.

== Synopsis:

The taps plugin provides a script that will talk to your rails environment to figure out your database configuration, start a taps service, and pull data from other taps services.

Start a taps server by heading to your live app and telling the script to start a server, passing it a username and password:

script/taps server bobdobbs secret

By default, this will start a taps server to the database for your +Rails.env+ on port 5000. You can then pull from this taps server into your local copy of your app by using the taps script to pull from the server using your username and password:

script/taps pull http://bobdobbs:[email protected]:5000

That's all you've got to do. Of course, taps supports many more options. You can also run the taps server for a different environment on a different port with debug logging:

RAILS_ENV=development script/taps server --port 3000 --debug bobdobbs secret

You can also pull just some tables without compression:

script/taps pull --disable-compression --tables=Posts,Users http://bobdobbs:[email protected]:5000

You can explore even more options in the usage messages from running the taps script.

== Requirements:

  • rails 3.0
  • taps 0.3

== Installation:

Install the taps plugin in your Rails 3 app by going to the application directory and running:

rails plugin install http://github.com/josephholsten/taps_plugin.git

Then run the generator to add the taps script:

rails generate taps

== Rails 2

This plugin is designed to work with Rails 3, but most people aren't ready to make the leap so the taps plugin still works with a little effort. The generator only works in Rails 3, you'll need to add the taps script by hand. Just save this code in +script/taps+:

#!/usr/bin/env ruby
require File.expand_path('../../config/environment',  __FILE__)
require 'taps_plugin'
TapsPlugin::Command.start(ARGV)

Make sure to make it executable and the script should work as normal.

== License:

Copyright (c) 2010 Joseph Anthony Pasquale Holsten, released under the MIT license. See the COPYING file for details.