/
config.rb
397 lines (371 loc) · 13.5 KB
/
config.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# YALE PROD
AppConfig[:container_management_barcode_length] = {
:system_default => {
:min=>14,
:max=>14
},
"YCBA-IA" => {
:min=>9,
:max=>9
}
}
# Metadata Cloud harvesting is using up all connections some times.
# We think this number will improve things.
# Further increasing per suggestions in 18904
AppConfig[:db_max_connections] = 70
# Other changes to try to improve indexing
AppConfig[:indexer_thread_count] = 5
AppConfig[:pui_indexer_thread_count] = 5
AppConfig[:indexer_records_per_thread] = 15
AppConfig[:pui_indexer_records_per_thread] = 15
#new (so far required) setting to adjust how a few plugins are set up so that we won't always have to maintain separate branches
AppConfig[:environment] = 'PROD'
# Want to ensure for sure that we can get registrations. May 2023 reasons include a bunch of hiring. Consequences include needing to manually cull spam accounts or to set up automatic means for culling spam.
AppConfig[:allow_user_registration] = true
AppConfig[:container_management_extent_calculator] = {
:report_volume => false,
:unit => :feet,
:decimal_places => 2
}
AppConfig[:digitization_work_order_goobi] = true
AppConfig[:max_top_container_results] = 2500
#AppConfig[:preservica_data_deleter_match_url] = "https://preservica.library.yale.edu"
#AppConfig[:preservica_data_deleter_match_user] = "preservicaprod"
AppConfig[:user_defined_in_basic] = {
"accessions" => ["date_1", "text_1", "boolean_1", "boolean_2", "date_2", "string_2"],
"digital_objects" => [],
"resources" => ["string_2"],
"hide_user_defined_section" => false
}
# Search results paging
AppConfig[:default_page_size] = 10
AppConfig[:pui_branding_img] = ''
AppConfig[:pui_block_referrer] = true
AppConfig[:pui_enable_staff_link] = true
AppConfig[:pui_page_actions_print] = false
AppConfig[:pui_page_actions_request] = false
AppConfig[:pui_search_results_page_size] = 20
# The following determine which "tabs" are on the main horizontal menu
AppConfig[:pui_hide] = {
repositories: false,
resources: false,
digital_objects: true,
accessions: true,
subjects: false,
agents: false,
classifications: true,
search_tab: false,
accession_badge: true,
record_badge: true,
container_inventory: false,
classification_badge: true,
}
AppConfig[:pui_repos] = {
"brbl" => {
hide: {
accession_badge: false,
}
},
"mssa" => {
hide: {
classification_badge: false,
}
},
}
# Note that without explicit "requests_permitted_for_born_digital" parameter, requests for born digital items will not be permitted
AppConfig[:aeon_fulfillment] = {
"arts" => {
:aeon_web_url => "https://aeon.library.yale.edu/aeon.dll",
:aeon_return_link_label => "Return to Archives at Yale",
:aeon_external_system_id => "ArchivesSpace",
:request_in_new_tab => true,
:requests_permitted_for_containers_only => true,
:hide_button_for_access_restriction_types => ['NoRequest'],
:hide_button_for_accessions => true,
:document_type_map => {:default => 'Manuscript'},
:web_request_form_map => {:default => 'GenericRequestManuscript'},
:aeon_site_code => "ART"
},
"brbl" => {
:aeon_web_url => "https://aeon.library.yale.edu/aeon.dll",
:aeon_return_link_label => "Return to Archives at Yale",
:aeon_external_system_id => "ArchivesSpace",
:request_in_new_tab => true,
:requests_permitted_for_containers_only => true,
:hide_button_for_access_restriction_types => ['NoRequest'],
:hide_button_for_accessions => true,
:document_type_map => {:default => 'BRBL'},
:web_request_form_map => {:default => 'GenericRequestORBIS'},
:aeon_site_code => "BRBL"
},
"mssa" => {
:aeon_web_url => "https://aeon.library.yale.edu/aeon.dll",
:aeon_return_link_label => "Return to Archives at Yale",
:aeon_external_system_id => "ArchivesSpace",
:request_in_new_tab => true,
:requests_permitted_for_containers_only => true,
:hide_button_for_access_restriction_types => ['NoRequest'],
:hide_button_for_accessions => true,
:document_type_map => {
:default => 'Manuscript',
'RU' => 'Archives',
},
:web_request_form_map => {
:default => 'GenericRequestManuscript',
'RU' => 'GenericRequestArchive',
},
:aeon_site_code => "MSS"
},
"music" => {
:aeon_web_url => "https://aeon.library.yale.edu/aeon.dll",
:aeon_return_link_label => "Return to Archives at Yale",
:aeon_external_system_id => "ArchivesSpace",
:request_in_new_tab => true,
:requests_permitted_for_containers_only => true,
:hide_button_for_access_restriction_types => ['NoRequest'],
:hide_button_for_accessions => true,
:document_type_map => {:default => 'Manuscript'},
:web_request_form_map => {:default => 'GenericRequestManuscript'},
:aeon_site_code => "MSS"
},
"walpole" => {
:aeon_web_url => "https://aeon.library.yale.edu/aeon.dll",
:aeon_return_link_label => "Return to Archives at Yale",
:aeon_external_system_id => "ArchivesSpace",
:request_in_new_tab => true,
:requests_permitted_for_containers_only => true,
:hide_button_for_access_restriction_types => ['NoRequest'],
:hide_button_for_accessions => true,
:document_type_map => {:default => 'Manuscript'},
:web_request_form_map => {:default => 'GenericRequestManuscript'},
:aeon_site_code => "LWL"
},
"divinity" => {
:aeon_web_url => "https://aeon.library.yale.edu/aeon.dll",
:aeon_return_link_label => "Return to Archives at Yale",
:aeon_external_system_id => "ArchivesSpace",
:request_in_new_tab => true,
:requests_permitted_for_containers_only => true,
:hide_button_for_access_restriction_types => ['NoRequest'],
:hide_button_for_accessions => true,
:document_type_map => {:default => 'Manuscript'},
:web_request_form_map => {:default => 'GenericRequestManuscript'},
:aeon_site_code => "DIVY"
},
"fortunoff_testimonies" => {
:aeon_web_url => "https://aeon.library.yale.edu/aeon.dll",
:aeon_return_link_label => "Return to Archives at Yale",
:aeon_external_system_id => "ArchivesSpace",
:request_in_new_tab => true,
:requests_permitted_for_containers_only => true,
:hide_button_for_access_restriction_types => ['NoRequest'],
:hide_button_for_accessions => true,
:document_type_map => {:default => 'Fortunoff'},
:web_request_form_map => {:default => 'GenericRequestFortunoff'},
:requests_permitted_for_born_digital => false,
:disable_digital_copy_request_for_access_restriction_types => ['InProcessSpecColl'],
:disable_reading_room_request_for_access_restriction_types => ['UseSurrogate'],
:aeon_site_code => "FORT"
},
"medical" => {
:aeon_web_url => "https://aeon.library.yale.edu/aeon.dll",
:aeon_return_link_label => "Return to Archives at Yale",
:aeon_external_system_id => "ArchivesSpace",
:request_in_new_tab => true,
:requests_permitted_for_containers_only => true,
:hide_button_for_access_restriction_types => ['NoRequest'],
:hide_button_for_accessions => true,
:document_type_map => {:default => 'Manuscript'},
:web_request_form_map => {:default => 'GenericRequestManuscript'},
:aeon_site_code => "MHL"
},
"ycba-ia" => {
:aeon_web_url => "https://aeon.library.yale.edu/aeon.dll",
:aeon_return_link_label => "Return to Archives at Yale",
:aeon_external_system_id => "ArchivesSpace",
:request_in_new_tab => true,
:requests_permitted_for_containers_only => true,
:hide_button_for_access_restriction_types => ['NoRequest'],
:hide_button_for_accessions => true,
:document_type_map => {:default => 'Manuscript'},
:web_request_form_map => {:default => 'GenericRequestManuscript'},
:aeon_site_code => 'YCBA'
},
"ycba-rbm" => {
:aeon_web_url => "https://aeon.library.yale.edu/aeon.dll",
:aeon_return_link_label => "Return to Archives at Yale",
:aeon_external_system_id => "ArchivesSpace",
:request_in_new_tab => true,
:requests_permitted_for_containers_only => true,
:hide_button_for_access_restriction_types => ['NoRequest'],
:hide_button_for_accessions => true,
:document_type_map => {:default => 'Manuscript'},
:web_request_form_map => {:default => 'GenericRequestManuscript'},
:disable_digital_copy_request_for_access_restriction_types => ['InProcessSpecColl'],
:disable_reading_room_request_for_access_restriction_types => ['UseSurrogate'],
:aeon_site_code => 'YCBA'
},
"peabody" => {
:hide_request_button => true
},
"oham" => {
:hide_request_button => true
}
}
AppConfig[:aeon_fulfillment_button_position] = 0
AppConfig[:aeon_fulfillment_record_types] = [
"archival_object",
"accession",
"top_container"
]
AppConfig[:aeon_disable_photoduplication] = true
AppConfig[:aeon_client_max_results] = 3000
AppConfig[:aeon_client_username] = 's_lib_aeon_lookup'
AppConfig[:aeon_client_password] = ENV.fetch('AEON_CLIENT_PASSWORD', nil)
AppConfig[:aeon_client_repo_codes] = [
"Arts",
"BRBL",
"Divinity",
"Fortunoff_Testimonies",
"Medical",
"MSSA",
"Music",
"OHAM",
"Walpole",
"YCBA-IA",
"YCBA-RBM"
]
AppConfig[:record_inheritance] = {
:archival_object => {
:composite_identifiers => {
:include_level => true,
:identifier_delimiter => ",",
},
:inherited_fields => [
{
:property => "title",
:inherit_directly => true
},
{
:property => "component_id",
:inherit_directly => false
},
{
:property => 'lang_materials',
:inherit_directly => false
},
{
:property => "dates",
:inherit_directly => true
},
{
:property => "linked_agents",
:inherit_if => proc { |json| json.select {|j| j["role"] == "creator"} },
:inherit_directly => false
},
{
:property => "notes",
:inherit_if => proc { |json| json.select {|j| j["type"] == "accessrestrict"} },
:inherit_directly => false
},
{
:property => "notes",
:inherit_if => proc { |json| json.select {|j| j["type"] == "prefercite"} },
:inherit_directly => false
},
]
}
}
AppConfig[:google_maps_api_key] = ENV.fetch('GOOGLE_MAPS_API_KEY', nil)
AppConfig[:libcal_service_id] = '457'
AppConfig[:omniauthCas] = {
:provider => {
:url => 'https://secure.its.yale.edu',
:login_url => '/cas/login',
:service_validate_url => '/cas/serviceValidate',
:host => 'secure.its.yale.edu',
:ssl => true,
},
:frontendUidProc => lambda { |hash| hash['uid'] },
:backendUidProc => lambda { |hash| hash['user'] },
:backendEmailProc => lambda { |hash| '' },
:logoutUrlPath => '/cas/logout',
:createUnknownUsers => true,
:allow_standard_login => true
}
## Yale Accession MARC Export config
AppConfig[:yale_accession_marc_export_schedule] = '45 22 * * *' # 22:45 every day; Lyrasis servers are on UTC, so this is 1745 EST and 1845 EDT
AppConfig[:yale_accession_marc_export_location_code] = 'beints'
AppConfig[:yale_accession_marc_export_target] = 's3'
AppConfig[:yale_accession_marc_export_s3_client_opts] = {
:access_key_id => ENV.fetch('YALE_ACCESS_KEY_ID', nil),
:secret_access_key => ENV.fetch('YALE_SECRET_ACCESS_KEY', nil),
:region => 'us-west-2',
}
AppConfig[:yale_accession_marc_export_s3_bucket] = 'aspace-yale-prod'
# Determines whether or not all fields are exported with a CSV export, or if only the columns that display on screen are exported (false = all columns, which was the default prior to ASpace 2.7)
AppConfig[:limit_csv_fields] = false
AppConfig[:iiif_viewer_url] = {
:default => 'https://collections.library.yale.edu/uv/uv.html#?manifest=',
'YCBA-RBM' => 'https://view.collections.yale.edu/uv3/?manifest=',
'YCBA-IA' => 'https://view.collections.yale.edu/uv3/?manifest='
}
# IIIF File Version criteria
AppConfig[:iiif_file_format_name] = 'iiif'
AppConfig[:iiif_use_statement] = 'text-json'
AppConfig[:iiif_xlink_show_attribute] = 'embed'
AppConfig[:search_csv_extra_nested_records] = ['payment_summary', 'payments']
AppConfig[:search_csv_max_nested_records] = 20
AppConfig[:container_management_labels] = [
{"institution_name" => {
"checked" => true,
"disabled" => false}},
{"repository_name" => {
"checked" => true,
"disabled" => false}},
{"resource_title" => {
"checked" => true,
"disabled" => false}},
{"series_id" => {
"checked" => true,
"disabled" => false}},
{"series_display" => {
"checked" => true,
"disabled" => false}},
{"resource_id" => {
"checked" => false,
"disabled" => false}},
{"agent_name" => {
"checked" => false,
"disabled" => false}},
{"type" => {
"checked" => true,
"disabled" => false}},
{"indicator" => {
"checked" => true,
"disabled" => true}},
{"barcode" => {
"checked" => false,
"disabled" => false}},
{"location" => {
"checked" => false,
"disabled" => false}},
{"location_barcode" => {
"checked" => false,
"disabled" => false}}
]
AppConfig[:container_management_labels_csv] = true
AppConfig[:container_management_labels_delim] = ', '
AppConfig[:container_management_labels_series] = 'Series '
AppConfig[:container_management_labels_pagesize] = {
"avery-5164" => {
"size" => "letter",
"margin" => "0.5in 0.125in"},
"dymo-30256" => {
"size" => "59mm 102mm",
"margin" => "5mm 1mm 5mm 1mm"}
}
AppConfig[:container_management_labels_autoscale] = {
"checked" => true,
"disabled" => false
}