Sha256: 8f74572529352f922af24edaacd4b90374a54d2c6ef2d886b303c72e20108693

Contents?: true

Size: 1.18 KB

Versions: 73

Compression:

Stored size: 1.18 KB

Contents

# frozen_string_literal: true

require "rails"
require "action_controller/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "active_storage/engine"

require "action_mailbox"

module ActionMailbox
  class Engine < Rails::Engine
    isolate_namespace ActionMailbox
    config.eager_load_namespaces << ActionMailbox

    config.action_mailbox = ActiveSupport::OrderedOptions.new
    config.action_mailbox.incinerate = true
    config.action_mailbox.incinerate_after = 30.days

    config.action_mailbox.queues = ActiveSupport::InheritableOptions.new \
      incineration: :action_mailbox_incineration, routing: :action_mailbox_routing

    initializer "action_mailbox.config" do
      config.after_initialize do |app|
        ActionMailbox.logger = app.config.action_mailbox.logger || Rails.logger
        ActionMailbox.incinerate = app.config.action_mailbox.incinerate.nil? ? true : app.config.action_mailbox.incinerate
        ActionMailbox.incinerate_after = app.config.action_mailbox.incinerate_after || 30.days
        ActionMailbox.queues = app.config.action_mailbox.queues || {}
        ActionMailbox.ingress = app.config.action_mailbox.ingress
      end
    end
  end
end

Version data entries

73 entries across 73 versions & 7 rubygems

Version Path
actionmailbox-6.0.4 lib/action_mailbox/engine.rb
actionmailbox-6.0.3.7 lib/action_mailbox/engine.rb
actionmailbox-6.1.3.2 lib/action_mailbox/engine.rb
actionmailbox-6.1.3.1 lib/action_mailbox/engine.rb
actionmailbox-6.0.3.6 lib/action_mailbox/engine.rb
actionmailbox-6.1.3 lib/action_mailbox/engine.rb
actionmailbox-6.1.2.1 lib/action_mailbox/engine.rb
actionmailbox-6.0.3.5 lib/action_mailbox/engine.rb
actionmailbox-6.1.2 lib/action_mailbox/engine.rb
actionmailbox-6.1.1 lib/action_mailbox/engine.rb
actionmailbox-6.1.0 lib/action_mailbox/engine.rb
actionmailbox-6.1.0.rc2 lib/action_mailbox/engine.rb
actionmailbox-6.1.0.rc1 lib/action_mailbox/engine.rb
actionmailbox-6.0.3.4 lib/action_mailbox/engine.rb
actionmailbox-6.0.3.3 lib/action_mailbox/engine.rb
actionmailbox-6.0.3.2 lib/action_mailbox/engine.rb
actionmailbox-6.0.3.1 lib/action_mailbox/engine.rb
actionmailbox-6.0.3 lib/action_mailbox/engine.rb
actionmailbox-6.0.3.rc1 lib/action_mailbox/engine.rb
actionmailbox-6.0.2.2 lib/action_mailbox/engine.rb