Sha256: ea48b2e007b55e2119f42af6afb44a5e2291dda5d7b827522689debf8ec8ea53
Contents?: true
Size: 726 Bytes
Versions: 43
Compression:
Stored size: 726 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.select{ |f| f.basename.to_s.match(pattern) }.first 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
43 entries across 43 versions & 1 rubygems