Skip to content

Commit

Permalink
style: improved log message and additional rubocop linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrandahl committed Dec 18, 2024
1 parent 64b41e2 commit bf33345
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/services/report_manager.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Service object for interacting with remote service-manager API
class ReportManager
class ReportManager # rubocop:disable Metrics/ClassLength
def initialize(config = nil)
return unless config

Expand Down Expand Up @@ -104,7 +104,7 @@ def create_params_sets(params) # rubocop:disable Metrics/MethodLength

def start_request(req_spec)
json = api.post_json("#{url}report-request", req_spec.to_hash)
Rails.logger.debug { "ReportManager: #{json}" } if Rails.env.development?
Rails.logger.debug { "ReportManager response: #{json}" } if Rails.env.development?
ReportStatus.new(json)
end

Expand All @@ -122,7 +122,9 @@ def validate?(params)
end

def key_present?(params, key)
return false unless !params.key?(key) || params[key].nil? || params[key].to_s.empty?
return false unless !params.key?(key) ||
params[key].nil? ||
params[key].to_s.empty?

@errors ||= []
@errors << "missing parameter #{key}"
Expand Down

0 comments on commit bf33345

Please sign in to comment.