Class: Rails::Contact::Configuration
- Inherits:
-
Object
- Object
- Rails::Contact::Configuration
- Defined in:
- lib/rails/contact/configuration.rb
Instance Attribute Summary collapse
-
#contact_class_name ⇒ Object
Returns the value of attribute contact_class_name.
-
#default_per_page ⇒ Object
Returns the value of attribute default_per_page.
-
#elasticsearch_url ⇒ Object
Returns the value of attribute elasticsearch_url.
-
#google_client_id ⇒ Object
Returns the value of attribute google_client_id.
-
#google_client_secret ⇒ Object
Returns the value of attribute google_client_secret.
-
#google_max_contacts ⇒ Object
Returns the value of attribute google_max_contacts.
-
#google_redirect_uri ⇒ Object
Returns the value of attribute google_redirect_uri.
-
#google_sync_enabled ⇒ Object
Returns the value of attribute google_sync_enabled.
-
#google_token_path ⇒ Object
Returns the value of attribute google_token_path.
-
#reset_index_on_boot ⇒ Object
Returns the value of attribute reset_index_on_boot.
-
#rolling_window_sort ⇒ Object
Returns the value of attribute rolling_window_sort.
-
#search_backend ⇒ Object
Returns the value of attribute search_backend.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rails/contact/configuration.rb', line 9 def initialize @contact_class_name = "Rails::Contact::Contact" @elasticsearch_url = ENV.fetch("ELASTICSEARCH_URL", "http://127.0.0.1:9200") @search_backend = :elasticsearch @google_sync_enabled = false @google_max_contacts = 25_000 @rolling_window_sort = :updated_at @google_client_id = ENV["GOOGLE_CLIENT_ID"] @google_client_secret = ENV["GOOGLE_CLIENT_SECRET"] @google_redirect_uri = ENV["GOOGLE_REDIRECT_URI"] @google_token_path = ENV.fetch("RAILS_CONTACT_GOOGLE_TOKEN_PATH", "tmp/rails_contact_google_token.json") @reset_index_on_boot = false @default_per_page = 25 end |
Instance Attribute Details
#contact_class_name ⇒ Object
Returns the value of attribute contact_class_name.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def contact_class_name @contact_class_name end |
#default_per_page ⇒ Object
Returns the value of attribute default_per_page.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def default_per_page @default_per_page end |
#elasticsearch_url ⇒ Object
Returns the value of attribute elasticsearch_url.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def elasticsearch_url @elasticsearch_url end |
#google_client_id ⇒ Object
Returns the value of attribute google_client_id.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def google_client_id @google_client_id end |
#google_client_secret ⇒ Object
Returns the value of attribute google_client_secret.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def google_client_secret @google_client_secret end |
#google_max_contacts ⇒ Object
Returns the value of attribute google_max_contacts.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def google_max_contacts @google_max_contacts end |
#google_redirect_uri ⇒ Object
Returns the value of attribute google_redirect_uri.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def google_redirect_uri @google_redirect_uri end |
#google_sync_enabled ⇒ Object
Returns the value of attribute google_sync_enabled.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def google_sync_enabled @google_sync_enabled end |
#google_token_path ⇒ Object
Returns the value of attribute google_token_path.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def google_token_path @google_token_path end |
#reset_index_on_boot ⇒ Object
Returns the value of attribute reset_index_on_boot.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def reset_index_on_boot @reset_index_on_boot end |
#rolling_window_sort ⇒ Object
Returns the value of attribute rolling_window_sort.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def rolling_window_sort @rolling_window_sort end |
#search_backend ⇒ Object
Returns the value of attribute search_backend.
4 5 6 |
# File 'lib/rails/contact/configuration.rb', line 4 def search_backend @search_backend end |