rails/actionmailbox/lib/action_mailbox.rb
Petrik 8565f45100 Use relative includes of README's in documentation [ci-skip]
The Rails documentation uses the `:include:` directive to inline the
README of the framework into the main documentation page. As the
README's aren't in the root directory from where SDoc is run we need to
add the framework path to the include:

    # :include: activesupport/README.md

This results in a warning when installing the gems as generating the rdoc for the gem is run from the gem/framework root:

    Couldn't find file to include 'activesupport/README.rdoc' from lib/active_support.rb

The `:include:` RDoc directive supports includes relative to the current
file as well:

    # :include: ../README.md

This makes sure it works for the Rails API docs and the separate gems.

Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2024-01-18 10:39:15 +01:00

27 lines
621 B
Ruby

# frozen_string_literal: true
require "active_support"
require "active_support/rails"
require "active_support/core_ext/numeric/time"
require "action_mailbox/version"
require "action_mailbox/deprecator"
require "action_mailbox/mail_ext"
# :markup: markdown
# :include: ../README.md
module ActionMailbox
extend ActiveSupport::Autoload
autoload :Base
autoload :Router
autoload :TestCase
mattr_accessor :ingress
mattr_accessor :logger
mattr_accessor :incinerate, default: true
mattr_accessor :incinerate_after, default: 30.days
mattr_accessor :queues, default: {}
mattr_accessor :storage_service
end