Skip to content

Commit c3fd8e3

Browse files
committed
updated application settings to env variables
1 parent 06c7607 commit c3fd8e3

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

config/application.rb

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -123,65 +123,65 @@ class Application < Rails::Application
123123
# -------------------- #
124124

125125
# Used throughout the system via ApplicationService.application_name
126-
config.x.application.name = 'DMPRoadmap'
126+
config.x.application.name = ENV['APPLICATION_NAME']
127127
# Used as the default domain when 'archiving' (aka anonymizing) a user account
128128
# for example `jane.doe@uni.edu` becomes `1234@removed_accounts-example.org`
129-
config.x.application.archived_accounts_email_suffix = '@removed_accounts-example.org'
129+
config.x.application.archived_accounts_email_suffix = ENV['APPLICATION_ARCHIVED_ACCOUNTS_EMAIL_SUFFIX']
130130
# Available CSV separators, the default is ','
131131
config.x.application.csv_separators = [',', '|', '#']
132132
# The largest page size allowed in requests to the API (all versions)
133-
config.x.application.api_max_page_size = 100
133+
config.x.application.api_max_page_size = ENV['APPLICATION_API_MAX_PAGE_SIZE']
134134
# The link to the API documentation - used in emails about the API
135135
config.x.application.api_documentation_urls = {
136-
v0: 'https://github.com/DMPRoadmap/roadmap/wiki/API-V0-Documentation',
137-
v1: 'https://github.com/DMPRoadmap/roadmap/wiki/API-V1-Documentation'
136+
v0: ENV['APPLICATION_API_DOCUMENTATION_URLS_VO'],
137+
v1: ENV['APPLICATION_API_DOCUMENTATION_URLS_V1']
138138
}
139139
# The links that appear on the home page. Add any number of links
140140
config.x.application.welcome_links = [
141141
{
142-
title: 'Digital Curation Centre',
143-
url: 'https://dcc.ac.uk/'
142+
title: ENV['APPLICATION_WELCOME_LINK_TITLE_1'],
143+
url: ENV['APPLICATION_WELCOME_LINK_URL_1']
144144
}, {
145-
title: 'UC3: University of California Curation Center',
146-
url: 'https://www.cdlib.org/uc3/'
145+
title: ENV['APPLICATION_WELCOME_LINK_TITLE_2'],
146+
url: ENV['APPLICATION_WELCOME_LINK_URL_2']
147147
}, {
148-
title: 'UK funder requirements for Data Management Plans',
149-
url: 'http://www.dcc.ac.uk/resources/data-management-plans/funders-requirements'
148+
title: ENV['APPLICATION_WELCOME_LINK_TITLE_3'],
149+
url: ENV['APPLICATION_WELCOME_LINK_URL_3']
150150
}, {
151-
title: 'US funder requirements for Data Management Plans',
152-
url: 'https://dmptool.org/guidance'
151+
title: ENV['APPLICATION_WELCOME_LINK_TITLE_4'],
152+
url: ENV['APPLICATION_WELCOME_LINK_URL_4']
153153
}, {
154-
title: 'DCC Checklist for a Data Management Plan',
155-
url: 'https://dmponline.dcc.ac.uk/files/DMP_Checklist_2013.pdf'
154+
title: ENV['APPLICATION_WELCOME_LINK_TITLE_5'],
155+
url: ENV['APPLICATION_WELCOME_LINK_URL_5']
156156
}
157157
]
158158
# The default user email preferences used when a new account is created
159159
config.x.application.preferences = {
160160
email: {
161161
users: {
162-
new_comment: false,
163-
admin_privileges: true,
164-
added_as_coowner: true,
165-
feedback_requested: true,
166-
feedback_provided: true
162+
new_comment: ENV['APPLICATION_PREFERENCES_NEW_COMMENT'],
163+
admin_privileges: ENV['APPLICATION_PREFERENCES_ADMIN_PRIVILEGES'],
164+
added_as_coowner: ENV['APPLICATION_PREFERENCES_ADDED_AS_COOWNER'],
165+
feedback_requested: ENV['APPLICATION_PREFERENCES_FEEDBACK_REQUESTED'],
166+
feedback_provided: ENV['APPLICATION_PREFERENCES_FEEDBACK_PROVIDED']
167167
},
168168
owners_and_coowners: {
169-
visibility_changed: true
169+
visibility_changed: ENV['APPLICATION_PREFERENCES_VISIBILITY_CHANGED']
170170
}
171171
}
172172
}
173173
# Setting to only take orgs from local and not allow on-the-fly creation
174-
config.x.application.restrict_orgs = false
174+
config.x.application.restrict_orgs = ENV['APPLICATION_RESTRICT_ORGS']
175175
# Setting to display phone number in contributor form
176-
config.x.application.display_contributor_phone_number = false
176+
config.x.application.display_contributor_phone_number = ENV['APPLICATION_DISPLAY_CONTRIBUTOR_PHONE_NUMBER']
177177

178178
# Setting require contributor requirement of contributor name and email
179-
config.x.application.require_contributor_name = false
180-
config.x.application.require_contributor_email = false
179+
config.x.application.require_contributor_name = ENV['APPLICATION_REQUIRE_CONTRIBUTOR_NAME']
180+
config.x.application.require_contributor_email = ENV['APPLICATION_REQUIRE_CONTRIBUTOR_EMAIL']
181181

182182
# Defines if Guidances/Comments in toggleable & if it's opened by default
183-
config.x.application.guidance_comments_toggleable = true
184-
config.x.application.guidance_comments_opened_by_default = true
183+
config.x.application.guidance_comments_toggleable = ENV['APPLICATION_GUIDANCE_COMMENTS_TOGGLEABLE']
184+
config.x.application.guidance_comments_opened_by_default = ENV['APPLICATION_GUIDANCE_COMMENTS_OPENED_BY_DEFAULT']
185185

186186
# ------------------- #
187187
# SHIBBOLETH SETTINGS #

0 commit comments

Comments
 (0)