fias
fias copied to clipboard
Deprecate DownloadService and change fias:download task
There is no need in lib/fias/import/download_service.rb
anymore, you can always use URI https://fias.nalog.ru/Public/Downloads/Actual/fias_dbf.rar to fetch the latest version of FIAS.
Basically, current fias:download
task can be replaced with the following:
task :download do
puts 'https://fias.nalog.ru/Public/Downloads/Actual/fias_dbf.rar'
end
But since it barely does anything and you need to chain it with wget
anyway to actually download FIAS, I propose rewriting it:
FIAS_URI = 'https://fias.nalog.ru/Public/Downloads/Actual/fias_dbf.rar'
task :download do
sh "wget #{FIAS_URI}"
end
This way, running rake fias:download
is enough to download the latest FIAS.
What do you think? Should I make a PR out of this, updating README and stuff?
Removing DownloadService
also allows to remove httparty dependency, because it's used only in there.