frankfurter/Rakefile

16 lines
244 B
Ruby
Raw Normal View History

2012-11-20 17:36:12 +01:00
require_relative 'lib/db'
require 'fixer'
task :reset do
data = Fixer::Feed.new(:historical).to_a
Currency.delete
Currency.multi_insert data
end
task :update do
Fixer::Feed.new.each do |hsh|
Currency.find_or_create hsh
end
end