Sha256: a80e98aa8a214c1ca0cfc18c0f0f89d82b4a88e0f0c663d0bb1886ebc3caf62a

Contents?: true

Size: 824 Bytes

Versions: 4

Compression:

Stored size: 824 Bytes

Contents

require 'hoptoad_notifier'
require 'rails'

module HoptoadNotifier
  class Railtie < Rails::Railtie
    rake_tasks do
      require "hoptoad_notifier/rails3_tasks"
    end

    initializer "hoptoad.use_rack_middleware" do |app|
      app.config.middleware.use "HoptoadNotifier::Rack"
    end

    config.after_initialize do
      HoptoadNotifier.configure(true) do |config|
        config.logger           ||= Rails.logger
        config.environment_name ||= Rails.env
        config.project_root     ||= Rails.root
        config.framework        = "Rails: #{::Rails::VERSION::STRING}"
      end

      if defined?(::ActionController::Base)
        require 'hoptoad_notifier/rails/javascript_notifier'

        ::ActionController::Base.send(:include, HoptoadNotifier::Rails::JavascriptNotifier)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
hoptoad_notifier-2.3.8 lib/hoptoad_notifier/railtie.rb
hoptoad_notifier-2.3.7 lib/hoptoad_notifier/railtie.rb
riscfuture-hoptoad_notifier-2.3.6 lib/hoptoad_notifier/railtie.rb
hoptoad_notifier-2.3.6 lib/hoptoad_notifier/railtie.rb