Sha256: c9e193b25c48a70a26cf13c187f577030ee4de58db59cb776d27927ab7af4ffe

Contents?: true

Size: 705 Bytes

Versions: 2

Compression:

Stored size: 705 Bytes

Contents

require 'auditor'
require 'rails'
require 'action_controller'
require 'application_helper'

module Auditor
  class Engine < Rails::Engine

    # Config defaults
    config.widget_factory_name = "default factory name"
    config.mount_at = '/'
    
    # Load rake tasks
    rake_tasks do
      load File.join(File.dirname(__FILE__), 'rails/railties/tasks.rake')
    end
    
    # Check the gem config
    initializer "check config" do |app|

      # make sure mount_at ends with trailing slash
      config.mount_at += '/'  unless config.mount_at.last == '/'
    end
    
    initializer "static assets" do |app|
      app.middleware.use ::ActionDispatch::Static, "#{root}/public"
    end
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
request-auditor-0.0.3 lib/engine.rb
request-auditor-0.0.1 lib/engine.rb