Sha256: aeab71c99c9ba9977e2506998ddac2ded97cdba3eecd1223804f045249c9d51a
Contents?: true
Size: 720 Bytes
Versions: 19
Compression:
Stored size: 720 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/feeds" module Renalware module Feeds module Job extend ActiveSupport::Concern def formatted_exception(error) [ "#{error.backtrace.first}: #{error.message} (#{error.class})", error.backtrace.drop(1).map{ |s| "\t#{s}" } ].join("\n") end def log(msg) Rails.logger.info(msg) end def find_file_in(files, pattern) file = files.detect{ |f| f.basename.to_s.match(pattern) } if file.nil? msg = "Zip file does not contain a file with name matching #{pattern}!" log(msg) fail(msg) end file end end end end
Version data entries
19 entries across 19 versions & 1 rubygems