require "net/http" require "active_support/all" require "active_adapter" Dir["#{File.expand_path(__dir__)}/active_notifier/core_ext/**/*.rb"].each { |file| require file } require "active_notifier/configurable" require "active_notifier/notifiable" # Notify message through webhooks module ActiveNotifier extend ActiveSupport::Autoload autoload :Notifier eager_autoload do autoload_at "active_notifier/errors" do autoload :Error autoload :ConfigureError autoload :TemplateNotFoundError autoload :UndefinedTokenError autoload :AdapterError end end include Configurable include Notifiable ActiveSupport.on_load(:after_initialize) do Kernel.const_set(ActiveNotifier.config.const_name || :Notifier, ActiveNotifier) end end