Sha256: 94d5e79bdcb93d5aefc1123df3c934e01da72c93c748b7f995f41d5a9c95e98b

Contents?: true

Size: 1.3 KB

Versions: 38

Compression:

Stored size: 1.3 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

    config.action_mailbox.storage_service = nil

    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
        ActionMailbox.storage_service = app.config.action_mailbox.storage_service
      end
    end
  end
end

Version data entries

38 entries across 36 versions & 4 rubygems

Version Path
actionmailbox-7.0.8.7 lib/action_mailbox/engine.rb
actionmailbox-7.0.8.6 lib/action_mailbox/engine.rb
actionmailbox-7.0.8.5 lib/action_mailbox/engine.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actionmailbox-7.0.8.4/lib/action_mailbox/engine.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/actionmailbox-7.0.5.1/lib/action_mailbox/engine.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/actionmailbox-7.0.5.1/lib/action_mailbox/engine.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/actionmailbox-7.0.5.1/lib/action_mailbox/engine.rb
actionmailbox-7.0.8.4 lib/action_mailbox/engine.rb
actionmailbox-7.0.8.1 lib/action_mailbox/engine.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionmailbox-7.0.3.1/lib/action_mailbox/engine.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionmailbox-7.0.2.3/lib/action_mailbox/engine.rb
actionmailbox-7.0.8 lib/action_mailbox/engine.rb
actionmailbox-7.0.7.2 lib/action_mailbox/engine.rb
actionmailbox-7.0.7.1 lib/action_mailbox/engine.rb
actionmailbox-7.0.7 lib/action_mailbox/engine.rb
actionmailbox-7.0.6 lib/action_mailbox/engine.rb
actionmailbox-7.0.5.1 lib/action_mailbox/engine.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionmailbox-7.0.2.3/lib/action_mailbox/engine.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionmailbox-7.0.3.1/lib/action_mailbox/engine.rb
actionmailbox-7.0.5 lib/action_mailbox/engine.rb