Skip to content

Instantly share code, notes, and snippets.

@reu
Created February 14, 2012 15:12
Show Gist options
  • Save reu/1827467 to your computer and use it in GitHub Desktop.
Save reu/1827467 to your computer and use it in GitHub Desktop.
svp.rake
task :synchronize_site_names => :environment do
require "csv"
first_line_skipped = false
CSV.foreach("doc/sgpd_svp.csv") do |line|
first_line_skipped = true and next unless first_line_skipped
svp_site_id, svp_site_name, oas_site_name = line
unless oas_site_name.blank?
OasSite[oas_site_name] = svp_site_id
puts "#{oas_site_name}: #{svp_site_id}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment