Sha256: 8f65372ec72640e933f2e4b116ea1f090c5bc2de6f1e35ed498d6faddbf183d3

Contents?: true

Size: 497 Bytes

Versions: 1

Compression:

Stored size: 497 Bytes

Contents

require 'bushido'

if defined?(Rails) && Rails::VERSION::MAJOR == 3
  require 'rails'
  require 'rails/routes'

  module Bushido
    class Engine < Rails::Engine
        
      initializer "bushido.add_middleware" do |app|
        # Only include our middleware if its on our platform
        unless ENV['BUSHIDO_APP'].nil?
          app.middleware.use Bushido::Middleware
        end
      end
    end
  end
else
  # Rails 2 handling
  Rails.configuration.middleware.use 'Bushido::Middleware'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bushido-0.0.36 lib/bushido/engine.rb