arclight 0.4.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.eslintrc +11 -4
- data/.github/workflows/ruby.yml +37 -15
- data/.gitignore +1 -0
- data/.rspec +0 -1
- data/.rubocop.yml +498 -21
- data/.rubocop_todo.yml +69 -86
- data/.solr_wrapper +2 -1
- data/CONTRIBUTING.md +5 -5
- data/CONTRIBUTORS.md +1 -1
- data/Gemfile +15 -10
- data/README.md +20 -16
- data/app/assets/javascripts/arclight/arclight.js +4 -8
- data/app/assets/javascripts/arclight/oembed_controller.js +58 -0
- data/app/assets/javascripts/arclight/truncate_controller.js +27 -0
- data/app/assets/stylesheets/arclight/application.scss +2 -5
- data/app/assets/stylesheets/arclight/build.scss +4 -0
- data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +108 -130
- data/app/assets/stylesheets/arclight/modules/icons.scss +19 -3
- data/app/assets/stylesheets/arclight/modules/layout.scss +129 -99
- data/app/assets/stylesheets/arclight/modules/mastheads.scss +23 -96
- data/app/assets/stylesheets/arclight/modules/repositories.scss +2 -2
- data/app/assets/stylesheets/arclight/modules/repository_card.scss +4 -48
- data/app/assets/stylesheets/arclight/modules/search_form.scss +9 -0
- data/app/assets/stylesheets/arclight/modules/search_results.scss +95 -45
- data/app/assets/stylesheets/arclight/modules/show_collection.scss +5 -32
- data/app/assets/stylesheets/arclight/modules/truncator.scss +58 -0
- data/app/assets/stylesheets/arclight/variables.scss +7 -4
- data/app/components/arclight/access_component.html.erb +14 -0
- data/app/components/arclight/access_component.rb +25 -0
- data/app/components/arclight/bookmark_component.html.erb +25 -0
- data/app/components/arclight/bookmark_component.rb +9 -0
- data/app/components/arclight/breadcrumb_component.rb +50 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.html.erb +34 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.rb +25 -0
- data/app/components/arclight/collection_context_component.html.erb +12 -0
- data/app/components/arclight/collection_context_component.rb +27 -0
- data/app/components/arclight/collection_info_component.html.erb +28 -0
- data/app/components/arclight/collection_info_component.rb +26 -0
- data/app/components/arclight/collection_sidebar_component.html.erb +15 -0
- data/app/components/arclight/collection_sidebar_component.rb +39 -0
- data/app/{views/catalog/_search_results_repository.html.erb → components/arclight/constraints_component.html.erb} +2 -1
- data/app/components/arclight/constraints_component.rb +17 -0
- data/app/components/arclight/document_collection_context_component.html.erb +29 -0
- data/app/components/arclight/document_collection_context_component.rb +28 -0
- data/app/components/arclight/document_collection_hierarchy_component.html.erb +50 -0
- data/app/components/arclight/document_collection_hierarchy_component.rb +62 -0
- data/app/components/arclight/document_component.html.erb +39 -0
- data/app/components/arclight/document_component.rb +49 -0
- data/app/components/arclight/document_components_hierarchy_component.html.erb +20 -0
- data/app/components/arclight/document_components_hierarchy_component.rb +34 -0
- data/app/components/arclight/document_download_component.html.erb +24 -0
- data/app/components/arclight/document_download_component.rb +71 -0
- data/app/components/arclight/embed_component.html.erb +10 -0
- data/app/components/arclight/embed_component.rb +43 -0
- data/app/components/arclight/expand_hierarchy_button_component.html.erb +5 -0
- data/app/components/arclight/expand_hierarchy_button_component.rb +16 -0
- data/app/components/arclight/group_component.html.erb +34 -0
- data/app/components/arclight/group_component.rb +23 -0
- data/app/components/arclight/header_component.html.erb +5 -0
- data/app/components/arclight/header_component.rb +10 -0
- data/app/components/arclight/index_metadata_field_component.html.erb +16 -0
- data/app/components/arclight/index_metadata_field_component.rb +20 -0
- data/app/components/arclight/masthead_component.html.erb +17 -0
- data/app/components/arclight/masthead_component.rb +10 -0
- data/app/components/arclight/metadata_section_component.html.erb +13 -0
- data/app/components/arclight/metadata_section_component.rb +22 -0
- data/app/components/arclight/oembed_viewer_component.html.erb +5 -0
- data/app/components/arclight/oembed_viewer_component.rb +16 -0
- data/app/components/arclight/online_content_filter_component.html.erb +15 -0
- data/app/components/arclight/online_content_filter_component.rb +17 -0
- data/app/components/arclight/online_status_indicator_component.rb +19 -0
- data/app/components/arclight/repository_breadcrumb_component.html.erb +10 -0
- data/app/components/arclight/repository_breadcrumb_component.rb +17 -0
- data/app/components/arclight/repository_location_component.html.erb +20 -0
- data/app/components/arclight/repository_location_component.rb +10 -0
- data/app/components/arclight/search_bar_component.html.erb +27 -0
- data/app/components/arclight/search_bar_component.rb +32 -0
- data/app/components/arclight/search_result_breadcrumbs_component.html.erb +6 -0
- data/app/components/arclight/search_result_breadcrumbs_component.rb +37 -0
- data/app/components/arclight/search_result_component.html.erb +20 -0
- data/app/components/arclight/search_result_component.rb +18 -0
- data/app/components/arclight/search_result_title_component.html.erb +15 -0
- data/app/components/arclight/search_result_title_component.rb +15 -0
- data/app/components/arclight/sidebar_component.html.erb +9 -0
- data/app/components/arclight/sidebar_component.rb +19 -0
- data/app/components/arclight/upper_metadata_layout_component.rb +10 -0
- data/app/components/blacklight/icons/bookmark_component.rb +12 -0
- data/app/components/blacklight/icons/collection_component.rb +14 -0
- data/app/components/blacklight/icons/compact_component.rb +12 -0
- data/app/components/blacklight/icons/container_component.rb +14 -0
- data/app/components/blacklight/icons/ead_component.rb +12 -0
- data/app/components/blacklight/icons/file_component.rb +14 -0
- data/app/components/blacklight/icons/folder_component.rb +12 -0
- data/app/components/blacklight/icons/online_component.rb +15 -0
- data/app/components/blacklight/icons/pdf_component.rb +12 -0
- data/app/components/blacklight/icons/repository_component.rb +12 -0
- data/app/controllers/arclight/repositories_controller.rb +4 -4
- data/app/{controllers/concerns → helpers}/arclight/ead_format_helpers.rb +91 -7
- data/app/helpers/arclight/field_config_helpers.rb +26 -0
- data/app/helpers/arclight_helper.rb +24 -251
- data/app/models/arclight/document_downloads.rb +12 -15
- data/app/models/arclight/parent.rb +6 -8
- data/app/models/arclight/parents.rb +7 -4
- data/app/models/arclight/requests/aeon_external_request.rb +1 -1
- data/app/models/arclight/requests/aeon_web_ead.rb +8 -3
- data/app/models/arclight/requests/google_form.rb +8 -3
- data/app/models/concerns/arclight/catalog.rb +25 -15
- data/app/models/concerns/arclight/search_behavior.rb +12 -26
- data/app/models/concerns/arclight/solr_document.rb +80 -73
- data/app/presenters/arclight/show_presenter.rb +34 -7
- data/app/views/arclight/_requests.html.erb +2 -2
- data/app/views/arclight/repositories/_repository.html.erb +21 -40
- data/app/views/arclight/repositories/index.html.erb +3 -1
- data/app/views/arclight/repositories/show.html.erb +4 -6
- data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +4 -5
- data/app/views/arclight/requests/_aeon_web_ead.html.erb +3 -4
- data/app/views/arclight/requests/_google_form.html.erb +4 -6
- data/app/views/catalog/_document_list.html.erb +8 -0
- data/app/views/catalog/_group.html.erb +2 -19
- data/app/views/catalog/_group_toggle.html.erb +1 -1
- data/app/views/catalog/_search_results_header.html.erb +3 -0
- data/app/views/catalog/hierarchy.html.erb +19 -0
- data/app/views/catalog/index.html.erb +16 -7
- data/app/views/shared/_breadcrumbs.html.erb +2 -14
- data/app/views/shared/_main_menu_links.html.erb +1 -1
- data/arclight.gemspec +16 -14
- data/config/breadcrumbs.rb +24 -0
- data/config/i18n-tasks.yml +9 -8
- data/config/importmap.rb +3 -0
- data/config/locales/arclight.en.yml +31 -30
- data/config/routes.rb +1 -1
- data/docker-compose.yml +16 -0
- data/lib/arclight/digital_object.rb +2 -1
- data/lib/arclight/engine.rb +18 -37
- data/lib/arclight/exceptions.rb +1 -0
- data/lib/arclight/hash_absolute_xpath.rb +2 -1
- data/lib/arclight/normalized_date.rb +5 -10
- data/lib/arclight/normalized_id.rb +6 -2
- data/lib/arclight/normalized_title.rb +2 -0
- data/lib/arclight/repository.rb +46 -57
- data/lib/arclight/routes/hierarchy.rb +19 -0
- data/lib/arclight/routes.rb +8 -0
- data/lib/arclight/traject/ead2_component_config.rb +335 -0
- data/lib/arclight/traject/ead2_config.rb +120 -299
- data/lib/arclight/version.rb +1 -1
- data/lib/arclight/year_range.rb +4 -3
- data/lib/arclight.rb +6 -1
- data/lib/generators/arclight/install_generator.rb +94 -21
- data/lib/generators/arclight/templates/arclight.scss +6 -3
- data/lib/generators/arclight/templates/catalog_controller.rb +193 -165
- data/lib/generators/arclight/templates/config/locales/arclight.en.yml +61 -0
- data/lib/generators/arclight/templates/config/repositories.yml +22 -29
- data/lib/tasks/index.rake +14 -17
- data/package.json +13 -14
- data/solr/conf/schema.xml +49 -39
- data/solr/conf/solrconfig.xml +78 -58
- data/tasks/arclight.rake +17 -9
- data/template.rb +6 -7
- metadata +149 -123
- data/.babelrc +0 -3
- data/app/assets/javascripts/arclight/collection_navigation.js +0 -100
- data/app/assets/javascripts/arclight/collection_scrollspy.js +0 -6
- data/app/assets/javascripts/arclight/context_navigation.js +0 -351
- data/app/assets/javascripts/arclight/oembed_viewer.js +0 -46
- data/app/assets/javascripts/arclight/truncator.js.erb +0 -29
- data/app/assets/stylesheets/arclight/bootstrap_overrides.scss +0 -26
- data/app/assets/stylesheets/arclight/modules/context_navigation.scss +0 -75
- data/app/controllers/concerns/arclight/field_config_helpers.rb +0 -102
- data/app/factories/blacklight_field_configuration_factory.rb +0 -30
- data/app/views/arclight/repositories/_in_person_repository.html.erb +0 -19
- data/app/views/arclight/repositories/_repository_contact.html.erb +0 -9
- data/app/views/arclight/viewers/_oembed.html.erb +0 -8
- data/app/views/catalog/_access_contents.html.erb +0 -15
- data/app/views/catalog/_arclight_abstract_or_scope.html.erb +0 -5
- data/app/views/catalog/_arclight_bookmark_control.html.erb +0 -38
- data/app/views/catalog/_arclight_document_header_icon.html.erb +0 -1
- data/app/views/catalog/_arclight_document_index_header.html.erb +0 -13
- data/app/views/catalog/_arclight_document_index_header_hierarchy_default.html.erb +0 -0
- data/app/views/catalog/_arclight_document_index_header_online_contents_default.html.erb +0 -0
- data/app/views/catalog/_arclight_index_compact_default.html.erb +0 -22
- data/app/views/catalog/_arclight_index_default.html.erb +0 -45
- data/app/views/catalog/_arclight_index_group_document_compact_default.html.erb +0 -19
- data/app/views/catalog/_arclight_index_group_document_default.html.erb +0 -18
- data/app/views/catalog/_arclight_online_content_indicator.html.erb +0 -3
- data/app/views/catalog/_arclight_rangelimit.html.erb +0 -24
- data/app/views/catalog/_arclight_viewer_default.html.erb +0 -1
- data/app/views/catalog/_collection_contents.html.erb +0 -4
- data/app/views/catalog/_collection_context.html.erb +0 -15
- data/app/views/catalog/_collection_context_nav.html.erb +0 -12
- data/app/views/catalog/_collection_online_contents.html.erb +0 -17
- data/app/views/catalog/_component_context.html.erb +0 -5
- data/app/views/catalog/_containers.html.erb +0 -3
- data/app/views/catalog/_context_card.html.erb +0 -27
- data/app/views/catalog/_context_sidebar.html.erb +0 -8
- data/app/views/catalog/_custom_metadata.html.erb +0 -16
- data/app/views/catalog/_document_downloads.html.erb +0 -14
- data/app/views/catalog/_group_header_compact_default.html.erb +0 -15
- data/app/views/catalog/_group_header_default.html.erb +0 -20
- data/app/views/catalog/_home.html.erb +0 -1
- data/app/views/catalog/_index_breadcrumb_default.html.erb +0 -6
- data/app/views/catalog/_index_collection_context_default.html.erb +0 -53
- data/app/views/catalog/_index_default.html.erb +0 -17
- data/app/views/catalog/_index_header.html.erb +0 -7
- data/app/views/catalog/_index_header_online_contents_default.html.erb +0 -1
- data/app/views/catalog/_index_online_contents_default.html.erb +0 -6
- data/app/views/catalog/_online_content_label.html.erb +0 -5
- data/app/views/catalog/_search_form.html.erb +0 -34
- data/app/views/catalog/_search_results.html.erb +0 -28
- data/app/views/catalog/_show_actions_box_default.html.erb +0 -27
- data/app/views/catalog/_show_breadcrumbs_default.html.erb +0 -6
- data/app/views/catalog/_show_collection.html.erb +0 -66
- data/app/views/catalog/_show_default.html.erb +0 -70
- data/app/views/catalog/_show_upper_metadata_collection.html.erb +0 -1
- data/app/views/catalog/_show_upper_metadata_default.html.erb +0 -14
- data/app/views/catalog/_sort_and_per_page.html.erb +0 -8
- data/app/views/catalog/_within_collection_dropdown.html.erb +0 -26
- data/app/views/layouts/catalog_result.html.erb +0 -7
- data/app/views/shared/_context_sidebar.html.erb +0 -8
- data/app/views/shared/_header_navbar.html.erb +0 -61
- data/app/views/shared/_show_breadcrumbs.html.erb +0 -27
- data/lib/arclight/viewer.rb +0 -45
- data/lib/arclight/viewers/oembed.rb +0 -57
- data/solr/conf/scripts.conf +0 -24
- data/vendor/assets/javascripts/responsiveTruncator.js +0 -69
- data/vendor/assets/javascripts/stickyfill.js +0 -480
- /data/app/assets/images/{blacklight → arclight}/logo.png +0 -0
|
@@ -1,50 +1,43 @@
|
|
|
1
1
|
nlm:
|
|
2
2
|
name: 'National Library of Medicine. History of Medicine Division'
|
|
3
3
|
description: 'NLM’s History of Medicine Division collects, preserves, makes available, and interprets for diverse audiences one of the world’s richest collections of historical material related to human health and disease.'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
phone: ''
|
|
12
|
-
contact_info: 'hmdref@nlm.nih.gov'
|
|
13
|
-
thumbnail_url: "https://collections.nlm.nih.gov/pageturnerserver/ajaxp?theurl=http://localhost:8080/fedora/get/nlm:nlmuid-101421040-img/THUMB"
|
|
4
|
+
contact_html: |
|
|
5
|
+
<div class="al-repository-contact-info"><a href="mailto:hmdref@nlm.nih.gov">hmdref@nlm.nih.gov</a></div>
|
|
6
|
+
location_html: |
|
|
7
|
+
<div class="al-repository-street-address-building">Building 38, Room 1E-21</div>
|
|
8
|
+
<div class="al-repository-street-address-address1">8600 Rockville Pike</div>
|
|
9
|
+
<div class="al-repository-street-address-city_state_zip_country">Bethesda, MD 20894, USA</div>
|
|
10
|
+
thumbnail_url: "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/United_States_National_Library_of_Medicine_1999.jpg/500px-United_States_National_Library_of_Medicine_1999.jpg"
|
|
14
11
|
request_types:
|
|
15
12
|
google_form:
|
|
16
13
|
request_url: 'https://docs.google.com/a/stanford.edu/forms/d/e/1FAIpQLSeOamhY_IcFw4sPnz0ddwWWkrPaHbM5wp7JVbOLOL_mIusEyw/viewform'
|
|
17
14
|
request_mappings: "document_url=entry.1980510262&collection_name=entry.619150170&collection_creator=entry.14428541&eadid=entry.996397105&containers=entry.1125277048&title=entry.862815208"
|
|
15
|
+
|
|
18
16
|
sul-spec:
|
|
19
17
|
name: 'Stanford University Libraries. Special Collections and University Archives'
|
|
20
18
|
visit_note: 'Special Collections and University Archives materials are stored offsite and must be paged 36 hours in advance.'
|
|
21
19
|
description: 'The Special Collections and University Archives Department of Stanford University Libraries is committed to acquiring, preserving, and providing access to primary source materials that support the research needs of the Stanford community and beyond. There are three distinct divisions in our department: Manuscripts, Rare Books and University Archives. We welcome all students, scholars and members of the general public to the Field Reading Room. Learn more about using and accessing our collections.'
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
contact_info: 'specialcollections@stanford.edu'
|
|
31
|
-
thumbnail_url: 'https://library.stanford.edu/sites/default/files/styles/150x150/public/collection/image/Collections-Super-Enlight.jpg'
|
|
20
|
+
contact_html: |
|
|
21
|
+
<div class="al-repository-contact-phone">(650) 725-1022</div>
|
|
22
|
+
<div class="al-repository-contact-info"><a href="mailto:specialcollections@stanford.edu">specialcollections@stanford.edu</a></div>
|
|
23
|
+
location_html: |
|
|
24
|
+
<div class="al-repository-street-address-building">Green Library</div>
|
|
25
|
+
<div class="al-repository-street-address-address1">557 Escondido Mall</div>
|
|
26
|
+
<div class="al-repository-street-address-city_state_zip_country">Stanford, CA 94305, USA</div>
|
|
27
|
+
thumbnail_url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Stanford_University_Green_Library_Bing_Wing.jpg/500px-Stanford_University_Green_Library_Bing_Wing.jpg'
|
|
32
28
|
request_types:
|
|
33
29
|
aeon_web_ead:
|
|
34
30
|
request_url: 'https://sample.request.com'
|
|
35
31
|
request_mappings: 'Action=10&Form=31&Value=ead_url'
|
|
32
|
+
|
|
36
33
|
umich-bhl:
|
|
37
34
|
name: 'University of Michigan. Bentley Historical Library'
|
|
38
35
|
description: 'The Bentley Historical Library collects the materials for and promotes the study of the histories of two great, intertwined institutions, the State of Michigan and the University of Michigan. The Library is open without fee to the public, and we welcome researchers regardless of academic or professional affiliation.'
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
zip: '48109-2113'
|
|
45
|
-
country: 'USA'
|
|
46
|
-
phone: ''
|
|
47
|
-
contact_info: 'bentley.ref@umich.edu'
|
|
36
|
+
contact_html: |
|
|
37
|
+
<div class="al-repository-contact-info"><a href="mailto:bentley.ref@umich.edu">bentley.ref@umich.edu</a></div>
|
|
38
|
+
location_html: |
|
|
39
|
+
<div class="al-repository-street-address-address1">1150 Beal Ave</div>
|
|
40
|
+
<div class="al-repository-street-address-city_state_zip_country">Ann Arbor, MI 48109-2113, USA</div>
|
|
48
41
|
thumbnail_url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Bhlexterior.jpg/150px-Bhlexterior.jpg'
|
|
49
42
|
request_types:
|
|
50
43
|
aeon_external_request_endpoint:
|
data/lib/tasks/index.rake
CHANGED
|
@@ -18,26 +18,23 @@ require 'benchmark'
|
|
|
18
18
|
#
|
|
19
19
|
namespace :arclight do
|
|
20
20
|
desc 'Index an EAD document, use FILE=<path/to/ead.xml> and REPOSITORY_ID=<myid>'
|
|
21
|
-
|
|
21
|
+
# We need :environment to have access to the Blacklight confg
|
|
22
|
+
task index: :environment do
|
|
22
23
|
raise 'Please specify your EAD document, ex. FILE=<path/to/ead.xml>' unless ENV['FILE']
|
|
23
24
|
|
|
24
|
-
print "Loading #{ENV
|
|
25
|
-
solr_url =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
elapsed_time = Benchmark.realtime {
|
|
31
|
-
`bundle exec traject -u #{solr_url} -i xml -c #{Arclight::Engine.root}/lib/arclight/traject/ead2_config.rb #{ENV['FILE']}`
|
|
32
|
-
}
|
|
33
|
-
print "Indexed #{ENV['FILE']} (in #{elapsed_time.round(3)} secs).\n"
|
|
25
|
+
print "Loading #{ENV.fetch('FILE', nil)} into index...\n"
|
|
26
|
+
solr_url = ENV.fetch('SOLR_URL', Blacklight.default_index.connection.base_uri)
|
|
27
|
+
elapsed_time = Benchmark.realtime do
|
|
28
|
+
`bundle exec traject -u #{solr_url} -i xml -c #{Arclight::Engine.root}/lib/arclight/traject/ead2_config.rb #{ENV.fetch('FILE', nil)}`
|
|
29
|
+
end
|
|
30
|
+
print "Indexed #{ENV.fetch('FILE', nil)} (in #{elapsed_time.round(3)} secs).\n"
|
|
34
31
|
end
|
|
35
32
|
|
|
36
33
|
desc 'Index a directory of EADs, use DIR=<path/to/directory> and REPOSITORY_ID=<myid>'
|
|
37
34
|
task :index_dir do
|
|
38
35
|
raise 'Please specify your directory, ex. DIR=<path/to/directory>' unless ENV['DIR']
|
|
39
36
|
|
|
40
|
-
Dir.glob(File.join(ENV
|
|
37
|
+
Dir.glob(File.join(ENV.fetch('DIR', nil), '*.xml')).each do |file|
|
|
41
38
|
system("rake arclight:index FILE=#{file}")
|
|
42
39
|
end
|
|
43
40
|
end
|
|
@@ -46,7 +43,7 @@ namespace :arclight do
|
|
|
46
43
|
task :index_url do
|
|
47
44
|
raise 'Please specify your EAD document, ex. URL=<http[s]://domain/path/to/ead.xml>' unless ENV['URL']
|
|
48
45
|
|
|
49
|
-
ead = Nokogiri::XML(open(ENV
|
|
46
|
+
ead = Nokogiri::XML(open(ENV.fetch('URL', nil)))
|
|
50
47
|
tmp = Tempfile.new(["#{Time.now.to_i}-", '.xml'], encoding: 'utf-8')
|
|
51
48
|
begin
|
|
52
49
|
tmp.write ead
|
|
@@ -64,15 +61,15 @@ namespace :arclight do
|
|
|
64
61
|
task :index_url_batch do
|
|
65
62
|
raise 'Please specify your URLs file, ex. BATCH=<path/to/urls.txt>' unless ENV['BATCH']
|
|
66
63
|
|
|
67
|
-
File.open(ENV
|
|
64
|
+
File.open(ENV.fetch('BATCH', nil)).each_line do |l|
|
|
68
65
|
ENV['URL'] = l.chomp
|
|
69
66
|
next if ENV['URL'].empty?
|
|
70
67
|
|
|
71
|
-
unless ENV
|
|
72
|
-
puts "Skipping invalid looking url #{ENV
|
|
68
|
+
unless ENV.fetch('URL', nil) =~ /\A#{URI::DEFAULT_PARSER.make_regexp(%w[http https])}\z/
|
|
69
|
+
puts "Skipping invalid looking url #{ENV.fetch('URL', nil)}"
|
|
73
70
|
next
|
|
74
71
|
end
|
|
75
|
-
puts "Indexing #{ENV
|
|
72
|
+
puts "Indexing #{ENV.fetch('URL', nil)}"
|
|
76
73
|
Rake::Task['arclight:index_url'].invoke
|
|
77
74
|
Rake::Task['arclight:index_url'].reenable
|
|
78
75
|
end
|
data/package.json
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arclight",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"@babel/plugin-external-helpers": "^7.2.0",
|
|
8
|
-
"@babel/plugin-transform-modules-umd": "^7.2.0",
|
|
9
|
-
"@babel/preset-env": "^7.5.5"
|
|
10
|
-
},
|
|
3
|
+
"version": "1.6.0",
|
|
4
|
+
"description": "The frontend for arclight",
|
|
5
|
+
"main": "app/assets/javascript/arclight/arclight.js",
|
|
6
|
+
"files": ["app/assets"],
|
|
11
7
|
"devDependencies": {
|
|
12
|
-
"eslint": "^
|
|
13
|
-
"eslint-config-airbnb-base": "^
|
|
14
|
-
"eslint-plugin-import": "^2.2.0"
|
|
8
|
+
"eslint": "^8.26.0",
|
|
9
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
10
|
+
"eslint-plugin-import": "^2.2.0",
|
|
11
|
+
"sass": "^1.59.3",
|
|
12
|
+
"bootstrap": "^5.2.0"
|
|
15
13
|
},
|
|
16
14
|
"scripts": {
|
|
15
|
+
"build": "sass ./app/assets/stylesheets/arclight/build.scss:./app/assets/builds/arclight.css --no-source-map --load-path=node_modules",
|
|
17
16
|
"lint": "eslint './app/assets/javascripts/**/*.{js,es6}'",
|
|
18
17
|
"lint:fix": "eslint --fix './app/assets/javascripts/**/*.{js,es6}'",
|
|
19
18
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
20
19
|
},
|
|
21
20
|
"repository": {
|
|
22
21
|
"type": "git",
|
|
23
|
-
"url": "
|
|
22
|
+
"url": "https://github.com/projectblacklight/arclight.git"
|
|
24
23
|
},
|
|
25
24
|
"author": "",
|
|
26
25
|
"license": "Apache-2.0",
|
|
27
26
|
"bugs": {
|
|
28
|
-
"url": "https://github.com/
|
|
27
|
+
"url": "https://github.com/projectblacklight/arclight/issues"
|
|
29
28
|
},
|
|
30
|
-
"homepage": "https://
|
|
29
|
+
"homepage": "https://library.stanford.edu/projects/arclight"
|
|
31
30
|
}
|
data/solr/conf/schema.xml
CHANGED
|
@@ -150,7 +150,8 @@
|
|
|
150
150
|
<analyzer type="index">
|
|
151
151
|
<tokenizer class="solr.WhitespaceTokenizerFactory" />
|
|
152
152
|
<filter class="solr.KeywordRepeatFilterFactory" />
|
|
153
|
-
<filter class="solr.WordDelimiterGraphFilterFactory"/>
|
|
153
|
+
<filter class="solr.WordDelimiterGraphFilterFactory" />
|
|
154
|
+
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" />
|
|
154
155
|
<filter class="solr.EnglishPossessiveFilterFactory"/>
|
|
155
156
|
<filter class="solr.ICUFoldingFilterFactory" />
|
|
156
157
|
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
|
|
@@ -162,7 +163,7 @@
|
|
|
162
163
|
<tokenizer class="solr.WhitespaceTokenizerFactory" />
|
|
163
164
|
<filter class="solr.KeywordRepeatFilterFactory" />
|
|
164
165
|
<filter class="solr.WordDelimiterGraphFilterFactory"/>
|
|
165
|
-
<filter class="solr.
|
|
166
|
+
<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" />
|
|
166
167
|
<filter class="solr.ICUFoldingFilterFactory" />
|
|
167
168
|
<filter class="solr.EnglishPossessiveFilterFactory"/>
|
|
168
169
|
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
|
|
@@ -190,7 +191,6 @@
|
|
|
190
191
|
catenateAll="1"
|
|
191
192
|
/>
|
|
192
193
|
<filter class="solr.ICUFoldingFilterFactory" />
|
|
193
|
-
<filter class="solr.WordDelimiterGraphFilterFactory"/>
|
|
194
194
|
</analyzer>
|
|
195
195
|
</fieldType>
|
|
196
196
|
|
|
@@ -244,8 +244,8 @@
|
|
|
244
244
|
</analyzer>
|
|
245
245
|
</fieldType>
|
|
246
246
|
|
|
247
|
-
<!-- A specialized field for geospatial search
|
|
248
|
-
<fieldType name="location" class="solr.
|
|
247
|
+
<!-- A specialized field for geospatial search filters and distance sorting. -->
|
|
248
|
+
<fieldType name="location" class="solr.LatLonPointSpatialField" docValues="true" />
|
|
249
249
|
|
|
250
250
|
<fieldType name="_nest_path_" class="solr.NestPathField" />
|
|
251
251
|
|
|
@@ -280,9 +280,9 @@
|
|
|
280
280
|
<field name="id" type="string" indexed="true" stored="true" required="true" />
|
|
281
281
|
<field name="_version_" type="plong" indexed="true" stored="true" multiValued="false" />
|
|
282
282
|
<field name="timestamp" type="pdate" indexed="true" stored="true" default="NOW" multiValued="false"/>
|
|
283
|
-
<!-- default, catch all search field -->
|
|
283
|
+
<!-- default, catch all search field, also used for search term highlighting (requires stored="true") -->
|
|
284
284
|
<field name="text" type="text" indexed="true" stored="true" multiValued="true"/>
|
|
285
|
-
<field name="unitid_identifier_match" type="identifier_match" indexed="true" multiValued="true" />
|
|
285
|
+
<field name="unitid_identifier_match" type="identifier_match" indexed="true" stored="false" multiValued="true" />
|
|
286
286
|
|
|
287
287
|
<field name="_root_" type="string" indexed="true" stored="true" docValues="false" />
|
|
288
288
|
<field name="_nest_parent_" type="string" indexed="true" stored="true"/>
|
|
@@ -307,7 +307,9 @@
|
|
|
307
307
|
unknown fields indexed and/or stored by default -->
|
|
308
308
|
<!--dynamicField name="*" type="ignored" multiValued="true" /-->
|
|
309
309
|
|
|
310
|
+
<!-- To play nice with atomic updates, only use non-stored fields for copyFields -->
|
|
310
311
|
<dynamicField name="*_tesim" type="text_en" stored="true" indexed="true" multiValued="true" />
|
|
312
|
+
<dynamicField name="*_tesm" type="text_en" stored="true" indexed="false" multiValued="true" />
|
|
311
313
|
<dynamicField name="*_teim" type="text_en" stored="false" indexed="true" multiValued="true" />
|
|
312
314
|
<dynamicField name="*_si" type="string" stored="false" indexed="true" multiValued="false" />
|
|
313
315
|
<dynamicField name="*_sim" type="string" stored="false" indexed="true" multiValued="true" />
|
|
@@ -315,7 +317,9 @@
|
|
|
315
317
|
<dynamicField name="*_ssi" type="string" stored="true" indexed="true" multiValued="false" />
|
|
316
318
|
<dynamicField name="*_ssim" type="string" stored="true" indexed="true" multiValued="true" />
|
|
317
319
|
<dynamicField name="*_isim" type="pint" stored="true" indexed="true" multiValued="true" />
|
|
320
|
+
<dynamicField name="*_is" type="pint" stored="true" indexed="false" multiValued="false" />
|
|
318
321
|
<dynamicField name="*_ii" type="pint" stored="false" indexed="true" multiValued="false" />
|
|
322
|
+
<dynamicField name="*_isi" type="pint" stored="true" indexed="true" multiValued="false" />
|
|
319
323
|
</fields>
|
|
320
324
|
|
|
321
325
|
<!-- Field to use to determine and enforce document uniqueness.
|
|
@@ -330,42 +334,48 @@
|
|
|
330
334
|
<!-- Copy Fields -->
|
|
331
335
|
|
|
332
336
|
<!-- field-based searches -->
|
|
333
|
-
<copyField source="normalized_title_ssm" dest="
|
|
334
|
-
<copyField source="
|
|
335
|
-
<copyField source="names_ssim" dest="
|
|
336
|
-
<copyField source="access_subjects_ssim" dest="
|
|
337
|
+
<copyField source="normalized_title_ssm" dest="normalized_title_teim"/>
|
|
338
|
+
<copyField source="places_ssim" dest="place_teim"/>
|
|
339
|
+
<copyField source="names_ssim" dest="name_teim"/>
|
|
340
|
+
<copyField source="access_subjects_ssim" dest="subject_teim"/>
|
|
341
|
+
<copyField source="containers_ssim" dest="container_teim" />
|
|
337
342
|
|
|
338
343
|
<!-- The catch all `text` field -->
|
|
339
344
|
<!-- grab the fielded searches -->
|
|
340
345
|
<copyField source="normalized_title_ssm" dest="text" />
|
|
341
|
-
<copyField source="
|
|
346
|
+
<copyField source="places_ssim" dest="text" />
|
|
342
347
|
<copyField source="names_ssim" dest="text" />
|
|
343
348
|
<copyField source="access_subjects_ssim" dest="text" />
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
<copyField source="
|
|
348
|
-
<copyField source="
|
|
349
|
-
<copyField source="
|
|
350
|
-
<copyField source="
|
|
351
|
-
<copyField source="
|
|
352
|
-
<copyField source="
|
|
353
|
-
<copyField source="
|
|
354
|
-
<copyField source="
|
|
355
|
-
<copyField source="
|
|
356
|
-
<copyField source="
|
|
357
|
-
<copyField source="
|
|
358
|
-
<copyField source="
|
|
359
|
-
<copyField source="
|
|
360
|
-
<copyField source="
|
|
361
|
-
<copyField source="
|
|
362
|
-
<copyField source="
|
|
363
|
-
<copyField source="
|
|
364
|
-
<copyField source="
|
|
365
|
-
<copyField source="
|
|
366
|
-
<copyField source="
|
|
367
|
-
<copyField source="
|
|
368
|
-
<copyField source="
|
|
349
|
+
<copyField source="containers_ssim" dest="text" />
|
|
350
|
+
|
|
351
|
+
<!-- grab the searchable notes (SEARCHABLE_NOTES_FIELDS) -->
|
|
352
|
+
<copyField source="accessrestrict_tesim" dest="text" />
|
|
353
|
+
<copyField source="accruals_tesim" dest="text" />
|
|
354
|
+
<copyField source="acqinfo_tesim" dest="text" />
|
|
355
|
+
<copyField source="altformavail_tesim" dest="text" />
|
|
356
|
+
<copyField source="appraisal_tesim" dest="text" />
|
|
357
|
+
<copyField source="arrangement_tesim" dest="text" />
|
|
358
|
+
<copyField source="bibliography_tesim" dest="text" />
|
|
359
|
+
<copyField source="bioghist_tesim" dest="text" />
|
|
360
|
+
<copyField source="custodhist_tesim" dest="text" />
|
|
361
|
+
<copyField source="fileplan_tesim" dest="text" />
|
|
362
|
+
<copyField source="indexes_tesim" dest="text" />
|
|
363
|
+
<copyField source="language_ssim" dest="text" />
|
|
364
|
+
<copyField source="odd_tesim" dest="text" />
|
|
365
|
+
<copyField source="originalsloc_tesim" dest="text" />
|
|
366
|
+
<copyField source="parent_unittitles_tesim" dest="text" />
|
|
367
|
+
<copyField source="physdesc_tesim" dest="text" />
|
|
368
|
+
<copyField source="phystech_tesim" dest="text" />
|
|
369
|
+
<copyField source="processinfo_tesim" dest="text" />
|
|
370
|
+
<copyField source="relatedmaterial_tesim" dest="text" />
|
|
371
|
+
<copyField source="scopecontent_tesim" dest="text" />
|
|
372
|
+
<copyField source="separatedmaterial_tesim" dest="text" />
|
|
373
|
+
<copyField source="userestrict_tesim" dest="text" />
|
|
374
|
+
<!-- did searchable notes (DID_SEARCHABLE_NOTES_FIELDS) -->
|
|
375
|
+
<copyField source="abstract_tesim" dest="text" />
|
|
376
|
+
<copyField source="materialspec_tesim" dest="text" />
|
|
377
|
+
<copyField source="physloc_tesim" dest="text" />
|
|
378
|
+
<copyField source="note_tesim" dest="text" />
|
|
369
379
|
<!-- grab structured data that's important -->
|
|
370
380
|
<copyField source="unitid_ssm" dest="text" />
|
|
371
381
|
<copyField source="unitid_ssm" dest="unitid_identifier_match" />
|
|
@@ -381,9 +391,9 @@
|
|
|
381
391
|
|
|
382
392
|
<!-- for suggestions -->
|
|
383
393
|
<copyField source="normalized_title_ssm" dest="suggest"/>
|
|
384
|
-
<copyField source="
|
|
394
|
+
<copyField source="collection_ssim" dest="suggest"/>
|
|
385
395
|
<copyField source="names_ssim" dest="suggest"/>
|
|
386
|
-
<copyField source="
|
|
396
|
+
<copyField source="repository_ssim" dest="suggest"/>
|
|
387
397
|
<copyField source="places_ssim" dest="suggest"/>
|
|
388
398
|
<copyField source="access_subjects_ssim" dest="suggest"/>
|
|
389
399
|
|
data/solr/conf/solrconfig.xml
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
-->
|
|
31
31
|
<luceneMatchVersion>8.2.0</luceneMatchVersion>
|
|
32
32
|
|
|
33
|
+
<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
|
|
33
34
|
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
|
|
34
35
|
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
|
|
35
36
|
|
|
@@ -74,7 +75,15 @@
|
|
|
74
75
|
<int name="rows">10</int>
|
|
75
76
|
|
|
76
77
|
<str name="q.alt">*:*</str>
|
|
77
|
-
|
|
78
|
+
|
|
79
|
+
<!-- Minimum Should Match parameter (mm) -->
|
|
80
|
+
<str name="mm">4<90%</str>
|
|
81
|
+
<!-- 1-4 term query, all must match
|
|
82
|
+
5+ term query, 90% must match; rounded down, so e.g.:
|
|
83
|
+
* 5-10 term query, all but one must match
|
|
84
|
+
* 11-20 term query, all but two must match
|
|
85
|
+
* 21-29 term query, all but three must match, etc.
|
|
86
|
+
-->
|
|
78
87
|
|
|
79
88
|
<!-- this qf and pf are used by default, if not otherwise specified by
|
|
80
89
|
client. The default blacklight_config will use these for the
|
|
@@ -84,95 +93,106 @@
|
|
|
84
93
|
http://wiki.apache.org/solr/LocalParams
|
|
85
94
|
-->
|
|
86
95
|
|
|
96
|
+
<!-- In general, matches using the pf parameter should be boosted higher
|
|
97
|
+
than qf, so the proximity of multiple search terms in the matching
|
|
98
|
+
documents is significant in relevance scoring. See:
|
|
99
|
+
https://solr.apache.org/guide/solr/latest/query-guide/dismax-query-parser.html#pf-phrase-fields-parameter
|
|
100
|
+
-->
|
|
87
101
|
<str name="qf">
|
|
88
102
|
collection_title_tesim^150
|
|
89
103
|
title_tesim^100
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
104
|
+
normalized_title_teim^100
|
|
105
|
+
unitid_identifier_match^40
|
|
106
|
+
name_teim^10
|
|
107
|
+
place_teim^10
|
|
108
|
+
subject_teim^2
|
|
109
|
+
id
|
|
110
|
+
ead_ssi
|
|
111
|
+
ref_ssm
|
|
112
|
+
unitid_ssm
|
|
113
|
+
container_teim
|
|
114
|
+
parent_unittitles_tesim
|
|
94
115
|
text
|
|
95
116
|
</str>
|
|
96
117
|
<str name="pf">
|
|
97
|
-
collection_title_tesim^
|
|
98
|
-
title_tesim^
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
118
|
+
collection_title_tesim^300
|
|
119
|
+
title_tesim^200
|
|
120
|
+
normalized_title_teim^200
|
|
121
|
+
unitid_identifier_match^80
|
|
122
|
+
name_teim^20
|
|
123
|
+
place_teim^20
|
|
124
|
+
subject_teim^5
|
|
125
|
+
id^2
|
|
126
|
+
ead_ssi^2
|
|
127
|
+
ref_ssm^2
|
|
128
|
+
unitid_ssm^2
|
|
129
|
+
container_teim^2
|
|
130
|
+
parent_unittitles_tesim^2
|
|
131
|
+
text^2
|
|
104
132
|
</str>
|
|
105
133
|
|
|
134
|
+
<str name="qf_container">
|
|
135
|
+
container_teim
|
|
136
|
+
</str>
|
|
137
|
+
<str name="pf_container">
|
|
138
|
+
container_teim^2
|
|
139
|
+
</str>
|
|
140
|
+
<str name="qf_identifier">
|
|
141
|
+
id
|
|
142
|
+
ead_ssi
|
|
143
|
+
ref_ssm
|
|
144
|
+
unitid_ssm
|
|
145
|
+
unitid_identifier_match
|
|
146
|
+
</str>
|
|
147
|
+
<str name="pf_identifier">
|
|
148
|
+
id^2
|
|
149
|
+
ead_ssi^2
|
|
150
|
+
ref_ssm^2
|
|
151
|
+
unitid_ssm^2
|
|
152
|
+
unitid_identifier_match^2
|
|
153
|
+
</str>
|
|
106
154
|
<str name="qf_name">
|
|
107
|
-
|
|
155
|
+
name_teim
|
|
108
156
|
</str>
|
|
109
157
|
<str name="pf_name">
|
|
110
|
-
|
|
158
|
+
name_teim^2
|
|
111
159
|
</str>
|
|
112
160
|
<str name="qf_place">
|
|
113
|
-
|
|
161
|
+
place_teim
|
|
114
162
|
</str>
|
|
115
163
|
<str name="pf_place">
|
|
116
|
-
|
|
164
|
+
place_teim^2
|
|
117
165
|
</str>
|
|
118
166
|
<str name="qf_subject">
|
|
119
|
-
|
|
167
|
+
subject_teim
|
|
120
168
|
</str>
|
|
121
169
|
<str name="pf_subject">
|
|
122
|
-
|
|
170
|
+
subject_teim^2
|
|
123
171
|
</str>
|
|
124
172
|
<str name="qf_title">
|
|
125
173
|
title_tesim
|
|
174
|
+
normalized_title_teim
|
|
126
175
|
</str>
|
|
127
176
|
<str name="pf_title">
|
|
128
|
-
title_tesim
|
|
177
|
+
title_tesim^2
|
|
178
|
+
normalized_title_teim^2
|
|
129
179
|
</str>
|
|
130
180
|
|
|
131
181
|
<int name="ps">3</int>
|
|
132
182
|
<float name="tie">0.01</float>
|
|
133
183
|
|
|
134
|
-
<str name="fl">
|
|
135
|
-
id,
|
|
136
|
-
score,
|
|
137
|
-
abstract_ssm,
|
|
138
|
-
accessrestrict_ssm,
|
|
139
|
-
child_component_count_isim,
|
|
140
|
-
collection_ssm,
|
|
141
|
-
collection_unitid_ssm,
|
|
142
|
-
containers_ssim,
|
|
143
|
-
creator_ssm,
|
|
144
|
-
extent_ssm,
|
|
145
|
-
geogname_ssm,
|
|
146
|
-
has_online_content_ssim,
|
|
147
|
-
language_ssm,
|
|
148
|
-
level_ssm,
|
|
149
|
-
repository_ssm,
|
|
150
|
-
scopecontent_ssm,
|
|
151
|
-
title_ssm,
|
|
152
|
-
normalized_title_ssm,
|
|
153
|
-
normalized_date_ssm,
|
|
154
|
-
unitid_ssm,
|
|
155
|
-
parent_ssim,
|
|
156
|
-
parent_unittitles_ssm,
|
|
157
|
-
ead_ssi,
|
|
158
|
-
ref_ssm,
|
|
159
|
-
component_level_isim,
|
|
160
|
-
parent_access_restrict_ssm,
|
|
161
|
-
parent_access_terms_ssm,
|
|
162
|
-
names_coll_ssim
|
|
163
|
-
places_ssim
|
|
164
|
-
</str>
|
|
184
|
+
<str name="fl">*</str>
|
|
165
185
|
|
|
166
186
|
<str name="facet">true</str>
|
|
167
187
|
<str name="facet.mincount">1</str>
|
|
168
|
-
<str name="facet.field">
|
|
169
|
-
<str name="facet.field">
|
|
170
|
-
<str name="facet.field">
|
|
171
|
-
<str name="facet.field">
|
|
172
|
-
<str name="facet.field">
|
|
173
|
-
<str name="facet.field">
|
|
174
|
-
<str name="facet.field">
|
|
175
|
-
<str name="facet.field">
|
|
188
|
+
<str name="facet.field">level_ssim</str>
|
|
189
|
+
<str name="facet.field">creator_ssim</str>
|
|
190
|
+
<str name="facet.field">date_range_isim</str>
|
|
191
|
+
<str name="facet.field">names_ssim</str>
|
|
192
|
+
<str name="facet.field">geogname_ssim</str>
|
|
193
|
+
<str name="facet.field">access_subjects_ssim</str>
|
|
194
|
+
<str name="facet.field">repository_ssim</str>
|
|
195
|
+
<str name="facet.field">collection_ssim</str>
|
|
176
196
|
|
|
177
197
|
<str name="spellcheck">true</str>
|
|
178
198
|
<str name="spellcheck.dictionary">default</str>
|
data/tasks/arclight.rake
CHANGED
|
@@ -7,13 +7,20 @@ require 'arclight'
|
|
|
7
7
|
|
|
8
8
|
class DependencyNotInstalled < StandardError; end
|
|
9
9
|
|
|
10
|
+
# Build with our opinionated defaults if none are provided.
|
|
11
|
+
rails_options = ENV.fetch('ENGINE_CART_RAILS_OPTIONS', '')
|
|
12
|
+
rails_options = "#{rails_options} -a propshaft" unless rails_options.match?(/-a\s|--asset-pipeline/)
|
|
13
|
+
rails_options = "#{rails_options} -j importmap" unless rails_options.match?(/-j\s|--javascript/)
|
|
14
|
+
rails_options = "#{rails_options} --css bootstrap" unless rails_options.match?(/--css/)
|
|
15
|
+
ENV['ENGINE_CART_RAILS_OPTIONS'] = rails_options
|
|
16
|
+
|
|
10
17
|
desc 'Run test suite'
|
|
11
18
|
task ci: %w[arclight:generate] do
|
|
12
19
|
SolrWrapper.wrap do |solr|
|
|
13
20
|
solr.with_collection do
|
|
14
21
|
Rake::Task['arclight:seed'].invoke
|
|
15
22
|
within_test_app do
|
|
16
|
-
|
|
23
|
+
system 'bin/rake spec:prepare'
|
|
17
24
|
end
|
|
18
25
|
Rake::Task['spec'].invoke
|
|
19
26
|
end
|
|
@@ -47,7 +54,7 @@ namespace :arclight do
|
|
|
47
54
|
solr.with_collection do
|
|
48
55
|
Rake::Task['arclight:seed'].invoke
|
|
49
56
|
within_test_app do
|
|
50
|
-
system "
|
|
57
|
+
system "bin/dev #{args[:rails_server_args]}"
|
|
51
58
|
end
|
|
52
59
|
end
|
|
53
60
|
end
|
|
@@ -56,16 +63,17 @@ namespace :arclight do
|
|
|
56
63
|
desc 'Seed fixture data to Solr'
|
|
57
64
|
task :seed do
|
|
58
65
|
puts 'Seeding index with data from spec/fixtures/ead...'
|
|
59
|
-
Dir.glob('spec/fixtures/ead/*.xml').each do |file|
|
|
60
|
-
system("FILE=#{file} rake arclight:index") # no REPOSITORY_ID
|
|
61
|
-
end
|
|
62
66
|
Dir.glob('spec/fixtures/ead/*').each do |dir|
|
|
63
67
|
next unless File.directory?(dir)
|
|
64
68
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
within_test_app do
|
|
70
|
+
# Sets the REPOSITORY_ID to the name of the file's containing directory
|
|
71
|
+
system("REPOSITORY_ID=#{File.basename(dir)} " \
|
|
72
|
+
"REPOSITORY_FILE=#{Arclight::Engine.root}/spec/fixtures/config/repositories.yml " \
|
|
73
|
+
"DIR=#{Arclight::Engine.root}/#{dir} " \
|
|
74
|
+
'SOLR_URL=http://127.0.0.1:8983/solr/blacklight-core ' \
|
|
75
|
+
'rake arclight:index_dir')
|
|
76
|
+
end
|
|
69
77
|
end
|
|
70
78
|
end
|
|
71
79
|
end
|
data/template.rb
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
gem 'arclight'
|
|
4
|
-
gem 'blacklight_range_limit', '~> 7.1'
|
|
3
|
+
gem 'arclight'
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
after_bundle do
|
|
6
|
+
generate 'blacklight:install', '--devise'
|
|
7
|
+
generate 'arclight:install', '-f'
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
rake 'db:migrate'
|
|
9
|
+
rake 'db:migrate'
|
|
10
|
+
end
|