lib/relaton_iana/data_fetcher.rb in relaton-iana-1.18.0 vs lib/relaton_iana/data_fetcher.rb in relaton-iana-1.19.0

- old
+ new

@@ -36,11 +36,11 @@ def fetch Dir["iana-registries/**/*.xml"].each do |file| content = File.read file, encoding: "UTF-8" parse(content) if content.include? "<registry" rescue StandardError => e - warn "Error: #{e.message}. File: #{file}" + Util.error "Error: #{e.message}. File: #{file}" end @index.save end def parse(content) @@ -64,10 +64,10 @@ when "yaml" then bib.to_hash.to_yaml else bib.send("to_#{@format}") end file = file_name(bib) if @files.include? file - warn "File #{file} already exists. Document: #{bib.docnumber}" + Util.warn "File #{file} already exists. Document: #{bib.docnumber}" else @files << file end @index.add_or_update bib.docnumber, file File.write file, c, encoding: "UTF-8"