Class: OpenStax::Connect::Configuration
- Inherits:
-
Object
- Object
- OpenStax::Connect::Configuration
- Defined in:
- lib/openstax_connect.rb
Instance Attribute Summary collapse
-
#default_errors_added_trigger ⇒ Object
Returns the value of attribute default_errors_added_trigger.
-
#default_errors_html_id ⇒ Object
Returns the value of attribute default_errors_html_id.
-
#default_errors_partial ⇒ Object
Returns the value of attribute default_errors_partial.
-
#enable_stubbing ⇒ Object
Returns the value of attribute enable_stubbing.
-
#logout_via ⇒ Object
Returns the value of attribute logout_via.
-
#openstax_accounts_url ⇒ Object
Returns the value of attribute openstax_accounts_url.
-
#openstax_application_id ⇒ Object
Returns the value of attribute openstax_application_id.
-
#openstax_application_secret ⇒ Object
Returns the value of attribute openstax_application_secret.
-
#security_transgression_exception ⇒ Object
Returns the value of attribute security_transgression_exception.
-
#user_provider ⇒ Object
See the “user_provider” discussion in the README.
Instance Method Summary collapse
- #enable_stubbing? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/openstax_connect.rb', line 59 def initialize @openstax_application_id = 'SET ME!' @openstax_application_secret = 'SET ME!' @openstax_accounts_url = 'https://accounts.openstax.org/' @enable_stubbing = true @logout_via = :get @default_errors_partial = 'openstax/connect/shared/attention' @default_errors_html_id = 'openstax-connect-attention' @default_errors_added_trigger = 'openstax-connect-errors-added' @security_transgression_exception = OpenStax::Connect::SecurityTransgression @user_provider = OpenStax::Connect::UserProvider super end |
Instance Attribute Details
#default_errors_added_trigger ⇒ Object
Returns the value of attribute default_errors_added_trigger.
47 48 49 |
# File 'lib/openstax_connect.rb', line 47 def default_errors_added_trigger @default_errors_added_trigger end |
#default_errors_html_id ⇒ Object
Returns the value of attribute default_errors_html_id.
46 47 48 |
# File 'lib/openstax_connect.rb', line 46 def default_errors_html_id @default_errors_html_id end |
#default_errors_partial ⇒ Object
Returns the value of attribute default_errors_partial.
45 46 47 |
# File 'lib/openstax_connect.rb', line 45 def default_errors_partial @default_errors_partial end |
#enable_stubbing ⇒ Object
Returns the value of attribute enable_stubbing.
42 43 44 |
# File 'lib/openstax_connect.rb', line 42 def enable_stubbing @enable_stubbing end |
#logout_via ⇒ Object
Returns the value of attribute logout_via.
44 45 46 |
# File 'lib/openstax_connect.rb', line 44 def logout_via @logout_via end |
#openstax_accounts_url ⇒ Object
Returns the value of attribute openstax_accounts_url.
43 44 45 |
# File 'lib/openstax_connect.rb', line 43 def openstax_accounts_url @openstax_accounts_url end |
#openstax_application_id ⇒ Object
Returns the value of attribute openstax_application_id.
40 41 42 |
# File 'lib/openstax_connect.rb', line 40 def openstax_application_id @openstax_application_id end |
#openstax_application_secret ⇒ Object
Returns the value of attribute openstax_application_secret.
41 42 43 |
# File 'lib/openstax_connect.rb', line 41 def openstax_application_secret @openstax_application_secret end |
#security_transgression_exception ⇒ Object
Returns the value of attribute security_transgression_exception.
48 49 50 |
# File 'lib/openstax_connect.rb', line 48 def security_transgression_exception @security_transgression_exception end |
#user_provider ⇒ Object
See the “user_provider” discussion in the README
51 52 53 |
# File 'lib/openstax_connect.rb', line 51 def user_provider @user_provider end |
Instance Method Details
#enable_stubbing? ⇒ Boolean
73 74 75 |
# File 'lib/openstax_connect.rb', line 73 def enable_stubbing? !Rails.env.production? && enable_stubbing end |