Constantizes string

This commit is contained in:
Brusk Awat 2022-12-01 18:41:10 +03:00
parent 9d0246458a
commit 77b6151364
Signed by: broosk1993
GPG Key ID: 5D20F7E02649F74E
3 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,7 @@
PATH
remote: .
specs:
rabbit_carrots (0.1.3)
rabbit_carrots (0.1.4)
activesupport (>= 6.0.0)
bunny (>= 2.19.0)
connection_pool (~> 2.3.0)

View File

@ -5,7 +5,10 @@ namespace :rmq do
task subscriber: :environment do
Rails.application.eager_load!
channels = RabbitCarrots::Configuration.routing_key_mappings
channels = RabbitCarrots::Configuration.routing_key_mappings.map do |mapping|
# This will be supplied in initializer. At that time, the Handler will not be available to be loaded and will throw Uninitialized Constant
{ **mapping, handler_class: mapping[:handler_class].constantize }
end
Rails.logger = Logger.new($stdout)

View File

@ -1,5 +1,5 @@
# frozen_string_literal: true
module RabbitCarrots
VERSION = "0.1.3"
VERSION = "0.1.4"
end