class Couchdb_migrate_mastfish

Public Class Methods

new(config) click to toggle source
# File lib/couchdb_migrate_mastfish.rb, line 3
def initialize(config)
  @db = config["db"]
  @views = config["views"]
  p @db
  p 'here'
end

Public Instance Methods

update(http, iter) click to toggle source
# File lib/couchdb_migrate_mastfish.rb, line 10
def update(http, iter)
  item = JSON.parse http.response
  item = transform(item)
  put = EventMachine::HttpRequest.new(@db + item["_id"]).aput :body => item.to_json
  put.callback do
    iter.next
  end
end