# frozen_string_literal: true require 'ostruct' 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