Revision
14671
Author
diegoviola
Date
2009-08-28 22:07:28 -0500 (Fri, 28 Aug 2009)

Log Message

removed some useless stuff

Added Paths

Removed Paths

Diff

Deleted: freeswitch/trunk/contrib/diegoviola/ruby/callcard/Rakefile

Added: freeswitch/trunk/contrib/diegoviola/ruby/callcard/rate.rb (0 => 14671)


--- freeswitch/trunk/contrib/diegoviola/ruby/callcard/rate.rb	                        (rev 0)
+++ freeswitch/trunk/contrib/diegoviola/ruby/callcard/rate.rb	2009-08-29 03:07:28 UTC (rev 14671)
@@ -0,0 +1,22 @@
+#!/usr/bin/ruby
+
+require 'rubygems'
+require 'fastercsv'
+require 'activerecord'
+
+ActiveRecord::Base.establish_connection(
+  :adapter  => "mysql",
+  :host     => "192.168.0.2",
+  :username => "root",
+  :password => "",
+  :database => "callcard_development"
+)
+
+class Destination < ActiveRecord::Base
+end
+
+FasterCSV.foreach('outbound_rates.csv') do |row|
+  destination = Destination.new(:country => row[0], :prefix => row[1], :rate => row[4])
+  destination.save
+end
+