Class: BcmsCas::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- BcmsCas::Engine
- Includes:
- Cms::Module
- Defined in:
- lib/bcms_cas/engine.rb
Constant Summary collapse
- NOT_CONFIGURED =
"https://localhost:3000/cas-not-configured"
Class Method Summary collapse
Class Method Details
.cas_server ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/bcms_cas/engine.rb', line 33 def self.cas_server if Rails.configuration.respond_to? :bcms_cas_server Rails.configuration.bcms_cas_server else NOT_CONFIGURED end end |
.configured? ⇒ Boolean
41 42 43 |
# File 'lib/bcms_cas/engine.rb', line 41 def self.configured? NOT_CONFIGURED != cas_server end |
.raise_configuration_error ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/bcms_cas/engine.rb', line 45 def self.raise_configuration_error = <<message Configuration Issue: You must configure a CAS server for the bcms_cas module to work. Add the following to 'config/environments/#{Rails.env}.rb' config.bcms_cas_server = "https://cas.some-domain.com" message raise end |