Skip to content

Instantly share code, notes, and snippets.

@lgsunnyvale
Created February 19, 2013 09:35
Show Gist options
  • Save lgsunnyvale/4984395 to your computer and use it in GitHub Desktop.
Save lgsunnyvale/4984395 to your computer and use it in GitHub Desktop.
migrate customer database
require 'CSV'
require 'curb'
def migrate(uuid)
index = 0
CSV.foreach("members.csv") do |row|
if index==0
continue
end
Curl.get "http://loyalty.500friends.com/api/record.gif?uuid=#{uuid}&email=#{row[1]}&
value=#{row[2]}"
index += 1
end
end
migrate ARGV[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment