Skip to content

Instantly share code, notes, and snippets.

/t.rb

Created June 12, 2010 08:53
Show Gist options
  • Select an option

  • Save anonymous/435577 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/435577 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'ruote'
require 'ruote/storage/fs_storage'
require 'ruote/couch'
source = Ruote::FsStorage.new(
'ruote_work')
destination = Ruote::Couch::CouchStorage.new(
'127.0.0.1', 5984, 'couch_prefix' => 'test')
%w[
configurations errors expressions msgs schedules variables workitems
].each do |type|
source.get_many(type).each { |item| destination.put(item) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment