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

umbrellio / rabbit_messaging / 12198035540

06 Dec 2024 11:30AM UTC coverage: 90.141% (-0.3%) from 90.408%
12198035540

push

github

web-flow
[Receiving] Customizable Job configuration which is based on the EventHandler DSL/option (#27)

* customizable job configuration

* DSL

* queue name

* cop

* specs - start to spec

* fix specs

* bump rails-html-sanitizer

---------

Co-authored-by: AS-AlStar <starovojtov.alexander@gmail.com>

37 of 52 branches covered (71.15%)

Branch coverage included in aggregate %.

8 of 10 new or added lines in 2 files covered. (80.0%)

347 of 374 relevant lines covered (92.78%)

5.35 hits per line

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

91.3
/lib/rabbit/event_handler.rb
1
# frozen_string_literal: true
2

3
require "tainbox"
1✔
4
require "active_support/core_ext/class/attribute"
1✔
5

6
class Rabbit::EventHandler
1✔
7
  include Tainbox
1✔
8

9
  attribute :project_id
1✔
10
  attribute :data
1✔
11
  attribute :message_info
1✔
12

13
  class_attribute :queue
1✔
14
  class_attribute :ignore_queue_conversion, default: false
1✔
15
  class_attribute :additional_job_configs, default: {}
1✔
16

17
  class << self
1✔
18
    private
1✔
19

20
    def queue_as(queue = nil, &block)
1✔
21
      self.queue = queue || block
2✔
22
    end
23

24
    def job_config(**config_opts)
1✔
NEW
25
      additional_job_configs.merge!(config_opts)
×
26
    end
27

28
    def job_configs(**config_opts)
1✔
NEW
29
      self.additional_job_configs = config_opts
×
30
    end
31
  end
32

33
  def initialize(message)
1✔
34
    self.attributes   = message.data
10✔
35
    self.data         = message.data
10✔
36
    self.project_id   = message.project_id
10✔
37
    self.message_info = message.arguments
10✔
38
  end
39
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

© 2026 Coveralls, Inc