lib/relaton/index/file_io.rb in relaton-index-0.2.6 vs lib/relaton/index/file_io.rb in relaton-index-0.2.7

- old
+ new

@@ -111,15 +111,15 @@ rescue Psych::SyntaxError warn_local_index_error "YAML parsing error when reading" end def warn_local_index_error(reason) - warn "[relaton] #{reason} file #{file}" + warn "[relaton-#{@dir}] #{reason} file #{file}" if url.is_a? String - warn "[relaton] Considering #{file} file corrupt, re-downloading from #{url}" + warn "[relaton-#{@dir}] Considering #{file} file corrupt, re-downloading from #{url}" else - warn "[relaton] Considering #{file} file corrupt, removing it." + warn "[relaton-#{@dir}] Considering #{file} file corrupt, removing it." remove end end # @@ -131,19 +131,19 @@ resp = URI(url).open zip = Zip::InputStream.new resp entry = zip.get_next_entry index = YAML.safe_load(entry.get_input_stream.read, permitted_classes: [Symbol]) save index - warn "[relaton] Downloaded index from #{url}" + warn "[relaton-#{@dir}] Downloaded index from #{url}" return index if check_format index warn_remote_index_error "Wrong structure of" rescue Psych::SyntaxError warn_remote_index_error "YAML parsing error when reading" end def warn_remote_index_error(reason) - warn "[relaton] #{reason} newly downloaded file " \ + warn "[relaton-#{@dir}] #{reason} newly downloaded file " \ "at #{file} #{url}, the remote index seems to be invalid." \ "Please report this issue at https://github.com/relaton/relaton-cli." end #