Class: Outboxable::Configuration
- Inherits:
-
Object
- Object
- Outboxable::Configuration
- Defined in:
- lib/outboxable/configuration.rb
Constant Summary collapse
- ALLOWED_MESSAGE_BROKERS =
%i[rabbitmq].freeze
- ALLOWED_ORMS =
%i[activerecord mongoid].freeze
Instance Attribute Summary collapse
-
#message_broker ⇒ Object
Returns the value of attribute message_broker.
-
#orm ⇒ Object
Returns the value of attribute orm.
-
#rabbitmq_event_bus_exchange ⇒ Object
Returns the value of attribute rabbitmq_event_bus_exchange.
-
#rabbitmq_host ⇒ Object
Returns the value of attribute rabbitmq_host.
-
#rabbitmq_password ⇒ Object
Returns the value of attribute rabbitmq_password.
-
#rabbitmq_port ⇒ Object
Returns the value of attribute rabbitmq_port.
-
#rabbitmq_user ⇒ Object
Returns the value of attribute rabbitmq_user.
-
#rabbitmq_vhost ⇒ Object
Returns the value of attribute rabbitmq_vhost.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
30 31 32 33 34 35 |
# File 'lib/outboxable/configuration.rb', line 30 def initialize raise Error, 'Sidekiq is not available. Unfortunately, sidekiq must be available for Outboxable to work' unless Object.const_defined?('Sidekiq') raise Error, 'Outboxable Gem only supports Rails but you application does not seem to be a Rails app' unless Object.const_defined?('Rails') raise Error, 'Outboxable Gem only support Rails version 7 and newer' if Rails::VERSION::MAJOR < 7 raise Error, 'Outboxable Gem uses the sidekiq-cron Gem. Make sure you add it to your project' unless Object.const_defined?('Sidekiq::Cron') end |
Instance Attribute Details
#message_broker ⇒ Object
Returns the value of attribute message_broker.
21 22 23 |
# File 'lib/outboxable/configuration.rb', line 21 def @message_broker end |
#orm ⇒ Object
Returns the value of attribute orm.
21 22 23 |
# File 'lib/outboxable/configuration.rb', line 21 def orm @orm end |
#rabbitmq_event_bus_exchange ⇒ Object
Returns the value of attribute rabbitmq_event_bus_exchange.
21 22 23 |
# File 'lib/outboxable/configuration.rb', line 21 def rabbitmq_event_bus_exchange @rabbitmq_event_bus_exchange end |
#rabbitmq_host ⇒ Object
Returns the value of attribute rabbitmq_host.
21 22 23 |
# File 'lib/outboxable/configuration.rb', line 21 def rabbitmq_host @rabbitmq_host end |
#rabbitmq_password ⇒ Object
Returns the value of attribute rabbitmq_password.
21 22 23 |
# File 'lib/outboxable/configuration.rb', line 21 def rabbitmq_password @rabbitmq_password end |
#rabbitmq_port ⇒ Object
Returns the value of attribute rabbitmq_port.
21 22 23 |
# File 'lib/outboxable/configuration.rb', line 21 def rabbitmq_port @rabbitmq_port end |
#rabbitmq_user ⇒ Object
Returns the value of attribute rabbitmq_user.
21 22 23 |
# File 'lib/outboxable/configuration.rb', line 21 def rabbitmq_user @rabbitmq_user end |
#rabbitmq_vhost ⇒ Object
Returns the value of attribute rabbitmq_vhost.
21 22 23 |
# File 'lib/outboxable/configuration.rb', line 21 def rabbitmq_vhost @rabbitmq_vhost end |