Sha256: 36642eeb84ca170f43a11be213b866159b98e54776b66e118fdf5c10a9d0e8b0

Contents?: true

Size: 595 Bytes

Versions: 3

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true

module ShibRack
  # Provides integration of shib-rack into Rails applications
  class Engine < Rails::Engine
    isolate_namespace ShibRack

    configure do
      config.shib_rack = OpenStruct.new
    end

    initializer('shib_rack.configure_handler') do
      configuration.handler = handler
    end

    def configuration
      config.shib_rack
    end

    def handler
      return 'ShibRack::DevelopmentHandler' if configuration[:development_mode]
      return 'ShibRack::TestHandler' if configuration[:test_mode]
      'ShibRack::Handler'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shib-rack-0.3.0 lib/shib_rack/engine.rb
shib-rack-0.2.0 lib/shib_rack/engine.rb
shib-rack-0.1.0 lib/shib_rack/engine.rb