Skip to content

Commit

Permalink
Person-importer should work
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Dec 10, 2014
1 parent 1e28c2d commit c65dd59
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 437 deletions.
9 changes: 8 additions & 1 deletion lib/medreg/medreg.rb
Expand Up @@ -2,6 +2,7 @@
# encoding: utf-8
require 'fileutils'
require 'medreg/company_importer'
require 'medreg/person_importer'

module Medreg
ARCHIVE_PATH = File.expand_path(File.join(File.dirname(__FILE__), '../../data'))
Expand All @@ -21,10 +22,16 @@ def Medreg.log(msg)

def Medreg.run(only_run=false)
Medreg.log("Starting with only_run #{only_run}")
unless only_run
import_company = (not only_run or only_run.match(/compan/i))
import_person = (not only_run or only_run.match(/person/i))
if import_company
importer = Medreg::CompanyImporter.new
importer.update
end
if import_person
importer = Medreg::PersonImporter.new
importer.update
end
Medreg.log("Finished.")
end
end

0 comments on commit c65dd59

Please sign in to comment.