• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

payrollhero / dispatch-rider / #3015

02 Sep 2022 11:22PM UTC coverage: 0.409% (-84.7%) from 85.154%
#3015

push

web-flow
Layout/SpaceInsideStringInterpolation-20220901233630 (#89)

* :police_car: regenerate rubocop todo

* :police_car: Layout/SpaceInsideStringInterpolation

* :police_car: regenerate rubocop todo

Co-authored-by: Rubocop Challenger <rubocop@payrollhero.com>

0 of 1 new or added line in 1 file covered. (0.0%)

1529 existing lines in 63 files now uncovered.

7 of 1711 relevant lines covered (0.41%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/dispatch-rider/logging/text_formatter.rb
1
# Text Log Formatter
UNCOV
2
module DispatchRider
×
UNCOV
3
  module Logging
×
UNCOV
4
    class TextFormatter
×
UNCOV
5
      def format(data)
×
UNCOV
6
        case data[:phase]
×
UNCOV
7
        when :complete
×
UNCOV
8
          "Completed execution of: #{message_info_fragment(data)} in #{format_duration(data[:duration])} seconds"
×
UNCOV
9
        when :fail
×
UNCOV
10
          "Failed execution of: #{exception_info_fragment(data)}"
×
UNCOV
11
        when :start
×
UNCOV
12
          "Starting execution of: #{message_info_fragment(data)}"
×
UNCOV
13
        when :success
×
UNCOV
14
          "Succeeded execution of: #{message_info_fragment(data)}"
×
UNCOV
15
        when :stop
×
NEW
16
          "Got stop #{data[:reason] ? '(' + data[:reason] + ')' : ''} while executing: #{message_info_fragment(data)}"
×
UNCOV
17
        when :error_handler_fail
×
UNCOV
18
          "Failed error handling of: #{exception_info_fragment(data)}"
×
UNCOV
19
        else
×
20
          raise ArgumentError, "Invalid phase : #{data[:phase].inspect}"
×
UNCOV
21
        end
×
UNCOV
22
      end
×
23

UNCOV
24
      private
×
25

UNCOV
26
      def message_info_fragment(data)
×
UNCOV
27
        "(#{data[:guid]}): #{data[:subject]} : #{message_info_arguments(data[:body]).inspect}"
×
UNCOV
28
      end
×
29

UNCOV
30
      def exception_info_fragment(data)
×
UNCOV
31
        "(#{data[:guid]}): #{data[:subject]} with #{data[:exception][:class]}: #{data[:exception][:message]}"
×
UNCOV
32
      end
×
33

UNCOV
34
      def message_info_arguments(body)
×
UNCOV
35
        body.dup.tap do |m|
×
UNCOV
36
          m.delete('guid')
×
UNCOV
37
          m.delete('object_id')
×
UNCOV
38
        end
×
UNCOV
39
      end
×
40

UNCOV
41
      def format_duration(duration)
×
UNCOV
42
        '%.2f' % [duration]
×
UNCOV
43
      end
×
UNCOV
44
    end
×
UNCOV
45
  end
×
UNCOV
46
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc