Skip to content

Commit

Permalink
updated gitingore and change base path of downloaded resources
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Sep 13, 2024
1 parent b836cb4 commit 814b561
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ contact_companies_alert_list.txt
.DS_Store
node_modules/
/lib/tasks/data
ettevotja_rekvisiidid__lihtandmed.csv.zip
./ettevotja_rekvisiidid__lihtandmed.csv.zip
Binary file removed ettevotja_rekvisiidid__lihtandmed.csv.zip
Binary file not shown.
11 changes: 5 additions & 6 deletions lib/tasks/company_status.rake
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ require 'uri'
require 'optparse'
require 'rake_option_parser_boilerplate'


namespace :company_status do
# bundle exec rake company_status:check_all -- --open_data_file_path=lib/tasks/data/ettevotja_rekvisiidid__lihtandmed.csv --missing_companies_output_path=lib/tasks/data/missing_companies_in_business_registry.csv --deleted_companies_output_path=lib/tasks/data/deleted_companies_from_business_registry.csv --download_path=https://avaandmed.ariregister.rik.ee/sites/default/files/avaandmed/ettevotja_rekvisiidid__lihtandmed.csv.zip --soft_delete_enable=false
# bundle exec rake company_status:check_all -- --open_data_file_path=tmp/ettevotja_rekvisiidid__lihtandmed.csv --missing_companies_output_path=tmp/missing_companies_in_business_registry.csv --deleted_companies_output_path=tmp/deleted_companies_from_business_registry.csv --download_path=https://avaandmed.ariregister.rik.ee/sites/default/files/avaandmed/ettevotja_rekvisiidid__lihtandmed.csv.zip --soft_delete_enable=false
desc 'Get Estonian companies status from Business Registry.'

DELETED_FROM_REGISTRY_STATUS = 'K'
DESTINATION = 'lib/tasks/data/'
DESTINATION = 'tmp/'
COMPANY_STATUS = 'ettevotja_staatus'
BUSINESS_REGISTRY_CODE = 'ariregistri_kood'

Expand Down Expand Up @@ -56,9 +55,9 @@ namespace :company_status do
private

def initialize_rake_task
open_data_file_path = 'lib/tasks/data/ettevotja_rekvisiidid__lihtandmed.csv'
missing_companies_in_business_registry_path = 'lib/tasks/data/missing_companies_in_business_registry.csv'
deleted_companies_from_business_registry_path = 'lib/tasks/data/deleted_companies_from_business_registry.csv'
open_data_file_path = "#{DESTINATION}ettevotja_rekvisiidid__lihtandmed.csv"
missing_companies_in_business_registry_path = "#{DESTINATION}missing_companies_in_business_registry.csv"
deleted_companies_from_business_registry_path = "#{DESTINATION}deleted_companies_from_business_registry.csv"
url = 'https://avaandmed.ariregister.rik.ee/sites/default/files/avaandmed/ettevotja_rekvisiidid__lihtandmed.csv.zip'

options = {
Expand Down

0 comments on commit 814b561

Please sign in to comment.