Skip to content

Deprecate DownloadService and change fias:download task #22

@ghost

Description

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions