• 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/configuration.rb
UNCOV
1
module DispatchRider
×
UNCOV
2
  class Configuration
×
UNCOV
3
    attr_accessor(
×
UNCOV
4
      :handler_path,
×
UNCOV
5
      :error_handler,
×
UNCOV
6
      :queue_info,
×
UNCOV
7
      :queue_kind,
×
UNCOV
8
      :subscriber,
×
UNCOV
9
      :logger,
×
UNCOV
10
      :log_formatter,
×
UNCOV
11
      :debug,
×
UNCOV
12
      :additional_info_injector
×
UNCOV
13
    )
×
UNCOV
14
    attr_reader :callbacks
×
15

UNCOV
16
    def initialize
×
UNCOV
17
      @handler_path = Dir.getwd + "/app/handlers"
×
UNCOV
18
      @error_handler = DispatchRider::DefaultErrorHandler
×
UNCOV
19
      @queue_kind = :file_system
×
UNCOV
20
      @queue_info = { path: "tmp/dispatch-rider-queue" }
×
UNCOV
21
      @callbacks = Callbacks::Storage.new
×
UNCOV
22
      @subscriber = DispatchRider::Subscriber
×
UNCOV
23
      @log_formatter = DispatchRider::Logging::TextFormatter.new
×
UNCOV
24
      @additional_info_injector = -> (data) { data }
×
UNCOV
25
      @logger = Logger.new(STDERR)
×
UNCOV
26
      @debug = false
×
27

UNCOV
28
      @callbacks.around(:dispatch_message) do |job, message|
×
UNCOV
29
        Logging::LifecycleLogger.wrap_handling(message) do
×
UNCOV
30
          job.call
×
UNCOV
31
        end
×
UNCOV
32
      end
×
UNCOV
33
    end
×
34

UNCOV
35
    delegate :before, :after, :around, :to => :callbacks
×
36

UNCOV
37
    def default_retry_timeout=(val)
×
UNCOV
38
      DispatchRider::Handlers::Base.set_default_retry(val)
×
UNCOV
39
    end
×
40

UNCOV
41
    def handlers
×
UNCOV
42
      @handlers ||= begin
×
UNCOV
43
        load_handler_files
×
UNCOV
44
        DispatchRider::Handlers::Base.subclasses.map { |klass| klass.name.underscore.to_sym }
×
UNCOV
45
      end
×
UNCOV
46
    end
×
47

UNCOV
48
    private
×
49

UNCOV
50
    def load_handler_files
×
UNCOV
51
      Dir["#{@handler_path}/**/*.rb"].each do |filename|
×
UNCOV
52
        require filename.gsub(/\.rb$/, '')
×
UNCOV
53
      end
×
UNCOV
54
    end
×
UNCOV
55
  end
×
UNCOV
56
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