mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-10-29 23:32:35 +01:00
16 lines
244 B
Ruby
16 lines
244 B
Ruby
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
|