Sha256: ccf7b9cc5949af4afa973ae80a935a97ac3f27e329f8ffd3a4a180f5491670a5

Contents?: true

Size: 717 Bytes

Versions: 3

Compression:

Stored size: 717 Bytes

Contents

require 'hydra-head'
require 'rails'
require 'action_controller'
require 'application_helper'

module HydraHead
  class Engine < Rails::Engine

    # Config defaults
    config.mount_at = '/'
    
    # Load rake tasks
    rake_tasks do
      Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)),'railties', '*.rake')).each do |railtie|
        load railtie
      end
    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

3 entries across 3 versions & 1 rubygems

Version Path
hydra-head-3.0.0pre3 lib/engine.rb
hydra-head-3.0.0pre2 lib/engine.rb
hydra-head-3.0.0pre1 lib/engine.rb