Class: Sufia::Configuration
- Inherits:
-
Object
- Object
- Sufia::Configuration
- Defined in:
- lib/sufia/configuration.rb
Instance Attribute Summary collapse
- #active_deposit_agreement_acceptance ⇒ Object
- #activity_to_show_default_seconds_since_now ⇒ Object
- #always_display_share_button ⇒ Object
-
#analytic_start_date ⇒ Object
Returns the value of attribute analytic_start_date.
- #analytics ⇒ Object
- #arkivo_api ⇒ Object
- #audit_user_key ⇒ Object
- #batch_user_key ⇒ Object
- #browse_everything ⇒ Object
- #citations ⇒ Object
- #contact_email ⇒ Object
- #display_media_download_link ⇒ Object
- #google_analytics_id ⇒ Object
- #libreoffice_path ⇒ Object
- #max_notifications_for_dashboard ⇒ Object
-
#model_to_create ⇒ Object
Returns a lambda that takes a hash of attributes and returns a string of the model name.
- #owner_permission_levels ⇒ Object
- #permission_levels ⇒ Object
- #persistent_hostpath ⇒ Object
- #redis_namespace ⇒ Object
- #subject_prefix ⇒ Object
- #translate_id_to_uri ⇒ Object
- #translate_uri_to_id ⇒ Object
- #upload_path ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#active_deposit_agreement_acceptance ⇒ Object
61 62 63 64 |
# File 'lib/sufia/configuration.rb', line 61 def active_deposit_agreement_acceptance return true if @active_deposit_agreement_acceptance.nil? @active_deposit_agreement_acceptance end |
#activity_to_show_default_seconds_since_now ⇒ Object
47 48 49 |
# File 'lib/sufia/configuration.rb', line 47 def activity_to_show_default_seconds_since_now @activity_to_show_default_seconds_since_now ||= 24 * 60 * 60 end |
#always_display_share_button ⇒ Object
84 85 86 87 |
# File 'lib/sufia/configuration.rb', line 84 def return true if @always_display_share_button.nil? @always_display_share_button end |
#analytic_start_date ⇒ Object
Returns the value of attribute analytic_start_date.
96 97 98 |
# File 'lib/sufia/configuration.rb', line 96 def analytic_start_date @analytic_start_date end |
#analytics ⇒ Object
32 33 34 |
# File 'lib/sufia/configuration.rb', line 32 def analytics @analytics ||= false end |
#arkivo_api ⇒ Object
52 53 54 |
# File 'lib/sufia/configuration.rb', line 52 def arkivo_api @arkivo_api ||= false end |
#audit_user_key ⇒ Object
72 73 74 |
# File 'lib/sufia/configuration.rb', line 72 def audit_user_key @audit_user_key ||= '[email protected]' end |
#batch_user_key ⇒ Object
67 68 69 |
# File 'lib/sufia/configuration.rb', line 67 def batch_user_key @batch_user_key ||= '[email protected]' end |
#browse_everything ⇒ Object
27 28 29 |
# File 'lib/sufia/configuration.rb', line 27 def browse_everything @browse_everything ||= nil end |
#citations ⇒ Object
37 38 39 |
# File 'lib/sufia/configuration.rb', line 37 def citations @citations ||= false end |
#contact_email ⇒ Object
128 129 130 |
# File 'lib/sufia/configuration.rb', line 128 def contact_email @contact_email ||= "[email protected]" end |
#display_media_download_link ⇒ Object
99 100 101 |
# File 'lib/sufia/configuration.rb', line 99 def display_media_download_link @display_media_download_link ||= false end |
#google_analytics_id ⇒ Object
90 91 92 |
# File 'lib/sufia/configuration.rb', line 90 def google_analytics_id @google_analytics_id ||= nil end |
#libreoffice_path ⇒ Object
22 23 24 |
# File 'lib/sufia/configuration.rb', line 22 def libreoffice_path @libreoffice_path ||= "soffice" end |
#max_notifications_for_dashboard ⇒ Object
42 43 44 |
# File 'lib/sufia/configuration.rb', line 42 def max_notifications_for_dashboard @max_notifications_for_dashboard ||= 5 end |
#model_to_create ⇒ Object
Returns a lambda that takes a hash of attributes and returns a string of the model name. This is called by the batch upload process
140 141 142 |
# File 'lib/sufia/configuration.rb', line 140 def model_to_create @model_to_create ||= ->(_attributes) { Sufia.primary_work_type.model_name.name } end |
#owner_permission_levels ⇒ Object
111 112 113 |
# File 'lib/sufia/configuration.rb', line 111 def @owner_permission_levels ||= { "Edit Access" => "edit" } end |
#permission_levels ⇒ Object
104 105 106 107 108 |
# File 'lib/sufia/configuration.rb', line 104 def @permission_levels ||= { "Choose Access" => "none", "View/Download" => "read", "Edit" => "edit" } end |
#persistent_hostpath ⇒ Object
11 12 13 |
# File 'lib/sufia/configuration.rb', line 11 def persistent_hostpath @persistent_hostpath ||= "http://localhost/files/" end |
#redis_namespace ⇒ Object
16 17 18 |
# File 'lib/sufia/configuration.rb', line 16 def redis_namespace @redis_namespace ||= "sufia" end |
#subject_prefix ⇒ Object
133 134 135 |
# File 'lib/sufia/configuration.rb', line 133 def subject_prefix @subject_prefix ||= "Contact form:" end |
#translate_id_to_uri ⇒ Object
123 124 125 |
# File 'lib/sufia/configuration.rb', line 123 def translate_id_to_uri @translate_id_to_uri ||= ActiveFedora::Noid.config.translate_id_to_uri end |
#translate_uri_to_id ⇒ Object
117 118 119 |
# File 'lib/sufia/configuration.rb', line 117 def translate_uri_to_id @translate_uri_to_id ||= ActiveFedora::Noid.config.translate_uri_to_id end |
#upload_path ⇒ Object
78 79 80 |
# File 'lib/sufia/configuration.rb', line 78 def upload_path @upload_path ||= ->() { Rails.root + 'tmp' + 'uploads' } end |
Instance Method Details
#curation_concerns_config ⇒ Object
3 4 5 |
# File 'lib/sufia/configuration.rb', line 3 def curation_concerns_config @curation_concerns_config ||= CurationConcerns.config end |
#geonames_username=(username) ⇒ Object
56 57 58 |
# File 'lib/sufia/configuration.rb', line 56 def geonames_username=(username) Qa::Authorities::Geonames.username = username end |