blacklight-spotlight 3.2.0 → 3.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (352) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/app/assets/stylesheets/spotlight/_breadcrumbs.scss +2 -4
  4. data/app/builders/spotlight/bootstrap_breadcrumbs_builder.rb +2 -2
  5. data/app/controllers/concerns/spotlight/controller.rb +13 -12
  6. data/app/controllers/spotlight/attachments_controller.rb +1 -1
  7. data/app/controllers/spotlight/custom_search_fields_controller.rb +1 -1
  8. data/app/controllers/spotlight/pages_controller.rb +2 -2
  9. data/app/controllers/spotlight/roles_controller.rb +1 -1
  10. data/app/controllers/spotlight/searches_controller.rb +6 -1
  11. data/app/helpers/spotlight/application_helper.rb +1 -1
  12. data/app/helpers/spotlight/main_app_helpers.rb +1 -1
  13. data/app/helpers/spotlight/pages_helper.rb +12 -0
  14. data/app/helpers/spotlight/title_helper.rb +0 -2
  15. data/app/mailers/spotlight/confirmation_mailer.rb +2 -1
  16. data/app/models/sir_trevor_rails/block.rb +85 -0
  17. data/app/models/sir_trevor_rails/blocks/displayable.rb +1 -1
  18. data/app/models/spotlight/contact_email.rb +1 -1
  19. data/app/models/spotlight/page_configurations.rb +1 -1
  20. data/app/models/spotlight/page_content/sir_trevor.rb +13 -4
  21. data/app/models/translation.rb +18 -0
  22. data/app/services/spotlight/exhibit_import_export_service.rb +1 -1
  23. data/app/views/shared/_site_sidebar.html.erb +1 -1
  24. data/app/views/spotlight/catalog/admin.html.erb +1 -1
  25. data/app/views/spotlight/confirmation_mailer/confirmation_instructions.html.erb +3 -3
  26. data/app/views/spotlight/exhibits/_import.html.erb +1 -1
  27. data/app/views/spotlight/exhibits/_languages.html.erb +2 -2
  28. data/app/views/spotlight/filters/_form.html.erb +1 -1
  29. data/app/views/spotlight/resources/upload/_form.html.erb +1 -1
  30. data/app/views/spotlight/search_configurations/_document_index_view_types.html.erb +1 -1
  31. data/app/views/spotlight/search_configurations/_facet_metadata.html.erb +4 -2
  32. data/app/views/spotlight/search_configurations/_facets.html.erb +1 -1
  33. data/app/views/spotlight/searches/_form.html.erb +1 -1
  34. data/app/views/spotlight/sir_trevor/blocks/_video_block.html.erb +5 -0
  35. data/app/views/spotlight/translations/_browse_categories.html.erb +1 -1
  36. data/app/views/spotlight/translations/_groups.html.erb +1 -1
  37. data/app/views/spotlight/translations/_import.html.erb +1 -1
  38. data/app/views/spotlight/translations/_metadata.html.erb +1 -1
  39. data/app/views/spotlight/translations/_search_fields.html.erb +1 -1
  40. data/config/i18n-tasks.yml +2 -1
  41. data/config/locales/spotlight.de.yml +40 -0
  42. data/config/locales/spotlight.en.yml +12 -3
  43. data/lib/generators/spotlight/install_generator.rb +40 -2
  44. data/lib/generators/spotlight/templates/config/initializers/translation.rb +15 -13
  45. data/lib/generators/spotlight/templates/solr/config/schema.xml +32 -50
  46. data/lib/generators/spotlight/templates/solr/config/solrconfig.xml +14 -12
  47. data/lib/spotlight/engine.rb +4 -2
  48. data/lib/spotlight/version.rb +1 -1
  49. data/lib/tasks/spotlight_tasks.rake +40 -5
  50. metadata +110 -621
  51. data/lib/generators/spotlight/templates/config/initializers/sir_trevor_rails.rb +0 -10
  52. data/spec/controllers/application_controller_spec.rb +0 -30
  53. data/spec/controllers/spotlight/about_pages_controller_spec.rb +0 -241
  54. data/spec/controllers/spotlight/admin_users_controller_spec.rb +0 -53
  55. data/spec/controllers/spotlight/appearances_controller_spec.rb +0 -88
  56. data/spec/controllers/spotlight/application_controller_spec.rb +0 -11
  57. data/spec/controllers/spotlight/attachments_controller_spec.rb +0 -28
  58. data/spec/controllers/spotlight/browse_controller_spec.rb +0 -133
  59. data/spec/controllers/spotlight/bulk_actions_controller_spec.rb +0 -124
  60. data/spec/controllers/spotlight/bulk_updates_controller_spec.rb +0 -77
  61. data/spec/controllers/spotlight/catalog_controller_spec.rb +0 -552
  62. data/spec/controllers/spotlight/confirmations_controller_spec.rb +0 -38
  63. data/spec/controllers/spotlight/contact_email_controller_spec.rb +0 -65
  64. data/spec/controllers/spotlight/contact_forms_controller_spec.rb +0 -38
  65. data/spec/controllers/spotlight/contacts_controller_spec.rb +0 -103
  66. data/spec/controllers/spotlight/custom_fields_controller_spec.rb +0 -62
  67. data/spec/controllers/spotlight/custom_search_fields_controller_spec.rb +0 -62
  68. data/spec/controllers/spotlight/dashboards_controller_spec.rb +0 -68
  69. data/spec/controllers/spotlight/exhibits_controller_spec.rb +0 -216
  70. data/spec/controllers/spotlight/feature_pages_controller_spec.rb +0 -251
  71. data/spec/controllers/spotlight/featured_images_controller_spec.rb +0 -77
  72. data/spec/controllers/spotlight/filters_controller_spec.rb +0 -72
  73. data/spec/controllers/spotlight/groups_controller_spec.rb +0 -103
  74. data/spec/controllers/spotlight/home_pages_controller_spec.rb +0 -126
  75. data/spec/controllers/spotlight/job_trackers_controller_spec.rb +0 -37
  76. data/spec/controllers/spotlight/languages_controller_spec.rb +0 -70
  77. data/spec/controllers/spotlight/metadata_configurations_controller_spec.rb +0 -93
  78. data/spec/controllers/spotlight/pages_controller_spec.rb +0 -50
  79. data/spec/controllers/spotlight/resources/csv_upload_controller_spec.rb +0 -71
  80. data/spec/controllers/spotlight/resources/upload_controller_spec.rb +0 -55
  81. data/spec/controllers/spotlight/resources_controller_spec.rb +0 -85
  82. data/spec/controllers/spotlight/roles_controller_spec.rb +0 -141
  83. data/spec/controllers/spotlight/search_configurations_controller_spec.rb +0 -141
  84. data/spec/controllers/spotlight/searches_controller_spec.rb +0 -195
  85. data/spec/controllers/spotlight/sites_controller_spec.rb +0 -67
  86. data/spec/controllers/spotlight/solr_controller_spec.rb +0 -116
  87. data/spec/controllers/spotlight/tags_controller_spec.rb +0 -56
  88. data/spec/controllers/spotlight/translations_controller_spec.rb +0 -132
  89. data/spec/controllers/spotlight/versions_controller_spec.rb +0 -56
  90. data/spec/controllers/spotlight/view_configurations_controller_spec.rb +0 -35
  91. data/spec/examples.txt +0 -1506
  92. data/spec/factories/bulk_updates.rb +0 -21
  93. data/spec/factories/contact_emails.rb +0 -8
  94. data/spec/factories/contact_images.rb +0 -8
  95. data/spec/factories/contacts.rb +0 -11
  96. data/spec/factories/custom_fields.rb +0 -9
  97. data/spec/factories/custom_search_fields.rb +0 -9
  98. data/spec/factories/exhibit_thumbnails.rb +0 -8
  99. data/spec/factories/exhibits.rb +0 -17
  100. data/spec/factories/featured_images.rb +0 -16
  101. data/spec/factories/group.rb +0 -17
  102. data/spec/factories/job_trackers.rb +0 -11
  103. data/spec/factories/language.rb +0 -8
  104. data/spec/factories/main_navigation.rb +0 -9
  105. data/spec/factories/pages.rb +0 -34
  106. data/spec/factories/resources.rb +0 -14
  107. data/spec/factories/roles.rb +0 -9
  108. data/spec/factories/searches.rb +0 -33
  109. data/spec/factories/tags.rb +0 -14
  110. data/spec/factories/translation.rb +0 -8
  111. data/spec/factories/users.rb +0 -50
  112. data/spec/features/about_page_spec.rb +0 -46
  113. data/spec/features/add_contacts_spec.rb +0 -63
  114. data/spec/features/add_custom_field_metadata_spec.rb +0 -88
  115. data/spec/features/add_iiif_manifest_spec.rb +0 -46
  116. data/spec/features/add_items_spec.rb +0 -135
  117. data/spec/features/autocomplete_typeahead_spec.rb +0 -88
  118. data/spec/features/browse_category_admin_spec.rb +0 -163
  119. data/spec/features/browse_category_navigation_spec.rb +0 -44
  120. data/spec/features/browse_category_spec.rb +0 -158
  121. data/spec/features/bulk_actions_spec.rb +0 -72
  122. data/spec/features/catalog_spec.rb +0 -57
  123. data/spec/features/confirm_email_spec.rb +0 -21
  124. data/spec/features/create_exhibit_spec.rb +0 -65
  125. data/spec/features/create_page_spec.rb +0 -21
  126. data/spec/features/dashboard_spec.rb +0 -34
  127. data/spec/features/edit_contact_spec.rb +0 -21
  128. data/spec/features/edit_search_fields_spec.rb +0 -79
  129. data/spec/features/exhibit_masthead_spec.rb +0 -112
  130. data/spec/features/exhibit_themes_spec.rb +0 -28
  131. data/spec/features/exhibits/add_tags_spec.rb +0 -35
  132. data/spec/features/exhibits/administration_spec.rb +0 -141
  133. data/spec/features/exhibits/custom_metadata_fields_spec.rb +0 -97
  134. data/spec/features/exhibits/custom_search_fields_spec.rb +0 -55
  135. data/spec/features/exhibits/edit_metadata_fields_spec.rb +0 -49
  136. data/spec/features/exhibits/language_create_edit_spec.rb +0 -59
  137. data/spec/features/exhibits/translation_editing_spec.rb +0 -463
  138. data/spec/features/exhibits_index_spec.rb +0 -55
  139. data/spec/features/feature_page_spec.rb +0 -155
  140. data/spec/features/home_page_spec.rb +0 -102
  141. data/spec/features/import_exhibit_spec.rb +0 -58
  142. data/spec/features/item_admin_spec.rb +0 -59
  143. data/spec/features/javascript/about_page_admin_spec.rb +0 -21
  144. data/spec/features/javascript/block_controls_spec.rb +0 -42
  145. data/spec/features/javascript/blocks/browse_group_categories_block_spec.rb +0 -64
  146. data/spec/features/javascript/blocks/featured_browse_categories_block_spec.rb +0 -46
  147. data/spec/features/javascript/blocks/featured_pages_block_spec.rb +0 -61
  148. data/spec/features/javascript/blocks/link_to_search_block_spec.rb +0 -46
  149. data/spec/features/javascript/blocks/rule_block_spec.rb +0 -23
  150. data/spec/features/javascript/blocks/search_result_block_spec.rb +0 -47
  151. data/spec/features/javascript/blocks/solr_documents_block_spec.rb +0 -230
  152. data/spec/features/javascript/blocks/solr_documents_carousel_block_spec.rb +0 -29
  153. data/spec/features/javascript/blocks/uploaded_items_block_spec.rb +0 -94
  154. data/spec/features/javascript/browse_group_admin_spec.rb +0 -45
  155. data/spec/features/javascript/edit_in_place_spec.rb +0 -93
  156. data/spec/features/javascript/feature_page_admin_spec.rb +0 -140
  157. data/spec/features/javascript/home_page_edit_spec.rb +0 -34
  158. data/spec/features/javascript/locale_selector_spec.rb +0 -66
  159. data/spec/features/javascript/metadata_admin_spec.rb +0 -41
  160. data/spec/features/javascript/multi_image_select_spec.rb +0 -50
  161. data/spec/features/javascript/reindex_monitor_spec.rb +0 -23
  162. data/spec/features/javascript/roles_admin_spec.rb +0 -38
  163. data/spec/features/javascript/search_config_admin_spec.rb +0 -140
  164. data/spec/features/javascript/search_context_spec.rb +0 -88
  165. data/spec/features/main_navigation_spec.rb +0 -96
  166. data/spec/features/metadata_admin_spec.rb +0 -18
  167. data/spec/features/report_a_problem_spec.rb +0 -62
  168. data/spec/features/site_masthead_spec.rb +0 -91
  169. data/spec/features/site_users_management_spec.rb +0 -74
  170. data/spec/features/slideshow_spec.rb +0 -21
  171. data/spec/features/translation_scope_spec.rb +0 -27
  172. data/spec/fixtures/800x600.png +0 -0
  173. data/spec/fixtures/avatar.png +0 -0
  174. data/spec/fixtures/bulk-update-template.csv +0 -57
  175. data/spec/fixtures/csv-upload-fixture.csv +0 -4
  176. data/spec/fixtures/gk446cj2442-manifest.json +0 -58
  177. data/spec/fixtures/iiif_responses.rb +0 -312
  178. data/spec/fixtures/json-upload-fixture.json +0 -3
  179. data/spec/fixtures/sample_solr_documents.yml +0 -9385
  180. data/spec/fixtures/updated-bulk-update-template-no-cols.csv +0 -4
  181. data/spec/fixtures/updated-bulk-update-template-w-tags.csv +0 -4
  182. data/spec/fixtures/updated-bulk-update-template.csv +0 -4
  183. data/spec/helpers/spotlight/application_helper_spec.rb +0 -196
  184. data/spec/helpers/spotlight/browse_helper_spec.rb +0 -13
  185. data/spec/helpers/spotlight/crop_helper_spec.rb +0 -11
  186. data/spec/helpers/spotlight/crud_link_helpers_spec.rb +0 -163
  187. data/spec/helpers/spotlight/languages_helper_spec.rb +0 -79
  188. data/spec/helpers/spotlight/main_app_helpers_spec.rb +0 -101
  189. data/spec/helpers/spotlight/masthead_helper_spec.rb +0 -51
  190. data/spec/helpers/spotlight/meta_helper_spec.rb +0 -33
  191. data/spec/helpers/spotlight/navbar_helper_spec.rb +0 -24
  192. data/spec/helpers/spotlight/pages_helper_spec.rb +0 -123
  193. data/spec/helpers/spotlight/roles_helper_spec.rb +0 -7
  194. data/spec/helpers/spotlight/search_configurations_helper_spec.rb +0 -23
  195. data/spec/helpers/spotlight/title_helper_spec.rb +0 -64
  196. data/spec/helpers/spotlight/translations_helper_spec.rb +0 -16
  197. data/spec/i18n_spec.rb +0 -28
  198. data/spec/jobs/spotlight/add_tags_job_spec.rb +0 -34
  199. data/spec/jobs/spotlight/add_uploads_from_csv_spec.rb +0 -58
  200. data/spec/jobs/spotlight/change_visibility_job_spec.rb +0 -30
  201. data/spec/jobs/spotlight/default_thumbnail_job_spec.rb +0 -14
  202. data/spec/jobs/spotlight/process_bulk_updates_csv_job_spec.rb +0 -86
  203. data/spec/jobs/spotlight/reindex_exhibit_job_spec.rb +0 -43
  204. data/spec/jobs/spotlight/reindex_job_spec.rb +0 -79
  205. data/spec/jobs/spotlight/remove_tags_job_spec.rb +0 -39
  206. data/spec/jobs/spotlight/rename_sidecar_field_job_spec.rb +0 -33
  207. data/spec/lib/migration/iiif_spec.rb +0 -91
  208. data/spec/lib/migration/page_language_spec.rb +0 -25
  209. data/spec/lib/spotlight/catalog_spec.rb +0 -0
  210. data/spec/lib/spotlight/controller_spec.rb +0 -102
  211. data/spec/lib/spotlight/upload_field_config_spec.rb +0 -40
  212. data/spec/mailers/spotlight/indexing_complete_mailer_spec.rb +0 -42
  213. data/spec/models/sir_trevor_rails/blocks/browse_block_spec.rb +0 -42
  214. data/spec/models/sir_trevor_rails/blocks/browse_group_categories_block_spec.rb +0 -41
  215. data/spec/models/sir_trevor_rails/blocks/featured_pages_block_spec.rb +0 -50
  216. data/spec/models/sir_trevor_rails/blocks/search_results_block_spec.rb +0 -23
  217. data/spec/models/sir_trevor_rails/blocks/solr_documents_block_spec.rb +0 -59
  218. data/spec/models/sir_trevor_rails/blocks/textable_spec.rb +0 -42
  219. data/spec/models/solr_document_spec.rb +0 -214
  220. data/spec/models/spotlight/ability_spec.rb +0 -118
  221. data/spec/models/spotlight/about_page_spec.rb +0 -19
  222. data/spec/models/spotlight/access_controls_enforcement_search_builder_spec.rb +0 -82
  223. data/spec/models/spotlight/analytics/ga_spec.rb +0 -22
  224. data/spec/models/spotlight/background_job_progress_spec.rb +0 -137
  225. data/spec/models/spotlight/blacklight_configuration_spec.rb +0 -649
  226. data/spec/models/spotlight/browse_category_search_builder_spec.rb +0 -49
  227. data/spec/models/spotlight/contact_email_spec.rb +0 -48
  228. data/spec/models/spotlight/contact_form_spec.rb +0 -94
  229. data/spec/models/spotlight/contact_image_spec.rb +0 -11
  230. data/spec/models/spotlight/contact_spec.rb +0 -38
  231. data/spec/models/spotlight/custom_field_spec.rb +0 -204
  232. data/spec/models/spotlight/custom_search_field_spec.rb +0 -56
  233. data/spec/models/spotlight/custom_translation_extension_spec.rb +0 -24
  234. data/spec/models/spotlight/exhibit_spec.rb +0 -383
  235. data/spec/models/spotlight/exhibit_thumbnail_spec.rb +0 -10
  236. data/spec/models/spotlight/feature_page_spec.rb +0 -87
  237. data/spec/models/spotlight/featured_image_spec.rb +0 -110
  238. data/spec/models/spotlight/field_metadata_spec.rb +0 -58
  239. data/spec/models/spotlight/filter_spec.rb +0 -19
  240. data/spec/models/spotlight/group_spec.rb +0 -19
  241. data/spec/models/spotlight/home_page_spec.rb +0 -38
  242. data/spec/models/spotlight/language_spec.rb +0 -42
  243. data/spec/models/spotlight/main_navigation_spec.rb +0 -19
  244. data/spec/models/spotlight/masthead_spec.rb +0 -45
  245. data/spec/models/spotlight/page_configurations_spec.rb +0 -45
  246. data/spec/models/spotlight/page_spec.rb +0 -303
  247. data/spec/models/spotlight/resource_spec.rb +0 -137
  248. data/spec/models/spotlight/resources/iiif_harvester_spec.rb +0 -52
  249. data/spec/models/spotlight/resources/iiif_manifest_spec.rb +0 -178
  250. data/spec/models/spotlight/resources/iiif_service_spec.rb +0 -57
  251. data/spec/models/spotlight/resources/upload_spec.rb +0 -71
  252. data/spec/models/spotlight/resources/web_spec.rb +0 -25
  253. data/spec/models/spotlight/role_spec.rb +0 -51
  254. data/spec/models/spotlight/search_spec.rb +0 -125
  255. data/spec/models/spotlight/site_spec.rb +0 -9
  256. data/spec/models/spotlight/sitemap_spec.rb +0 -113
  257. data/spec/models/spotlight/solr_document/atomic_updates_spec.rb +0 -56
  258. data/spec/models/spotlight/solr_document/uploaded_resource_spec.rb +0 -38
  259. data/spec/models/spotlight/solr_document_sidecar_spec.rb +0 -48
  260. data/spec/models/spotlight/user_spec.rb +0 -26
  261. data/spec/models/translation_spec.rb +0 -14
  262. data/spec/presenters/spotlight/iiif_manifest_presenter_spec.rb +0 -132
  263. data/spec/routing/spotlight/exhibit_catalog_spec.rb +0 -34
  264. data/spec/routing/spotlight/featured_images_spec.rb +0 -23
  265. data/spec/routing/spotlight/pages_routing_spec.rb +0 -42
  266. data/spec/services/spotlight/bulk_updates_csv_template_service_spec.rb +0 -26
  267. data/spec/services/spotlight/carrierwave_file_resolver_spec.rb +0 -16
  268. data/spec/services/spotlight/clone_translated_page_from_locale_spec.rb +0 -30
  269. data/spec/services/spotlight/etl/context_spec.rb +0 -66
  270. data/spec/services/spotlight/etl/executor_spec.rb +0 -149
  271. data/spec/services/spotlight/etl/pipeline_spec.rb +0 -22
  272. data/spec/services/spotlight/etl/solr_loader_spec.rb +0 -76
  273. data/spec/services/spotlight/etl/step_spec.rb +0 -70
  274. data/spec/services/spotlight/exhibit_import_export_service_spec.rb +0 -569
  275. data/spec/services/spotlight/iiif_resource_resolver_spec.rb +0 -94
  276. data/spec/services/spotlight/invite_users_service_spec.rb +0 -47
  277. data/spec/spec_helper.rb +0 -147
  278. data/spec/support/controllers/engine_helpers.rb +0 -9
  279. data/spec/support/disable_friendly_id_deprecation_warnings.rb +0 -11
  280. data/spec/support/features/capybara_default_max_wait_metadata_helper.rb +0 -20
  281. data/spec/support/features/test_features_helpers.rb +0 -92
  282. data/spec/support/helpers/controller_level_helpers.rb +0 -25
  283. data/spec/support/stub_iiif_response.rb +0 -26
  284. data/spec/support/views/test_view_helpers.rb +0 -20
  285. data/spec/test_app_templates/Gemfile.extra +0 -2
  286. data/spec/test_app_templates/carrierwave.rb +0 -8
  287. data/spec/test_app_templates/catalog_controller.rb +0 -108
  288. data/spec/test_app_templates/fixture.css +0 -0
  289. data/spec/test_app_templates/fixture.png +0 -0
  290. data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -69
  291. data/spec/test_app_templates/spotlight_test.rake +0 -14
  292. data/spec/uploaders/spotlight/attachment_uploader_spec.rb +0 -27
  293. data/spec/uploaders/spotlight/featured_image_uploader_spec.rb +0 -33
  294. data/spec/views/shared/_analytics.html.erb_spec.rb +0 -17
  295. data/spec/views/shared/_exhibit_navbar.html.erb_spec.rb +0 -127
  296. data/spec/views/shared/_header_navbar.html.erb_spec.rb +0 -12
  297. data/spec/views/shared/_masthead.html.erb_spec.rb +0 -91
  298. data/spec/views/shared/_user_util_links.html.erb_spec.rb +0 -102
  299. data/spec/views/spotlight/about_pages/_empty.html.erb_spec.rb +0 -28
  300. data/spec/views/spotlight/about_pages/_sidebar.html.erb_spec.rb +0 -24
  301. data/spec/views/spotlight/about_pages/index.html.erb_spec.rb +0 -69
  302. data/spec/views/spotlight/browse/_search.html.erb_spec.rb +0 -30
  303. data/spec/views/spotlight/browse/index.html.erb_spec.rb +0 -22
  304. data/spec/views/spotlight/browse/show.html.erb_spec.rb +0 -65
  305. data/spec/views/spotlight/catalog/_edit_default.html.erb_spec.rb +0 -63
  306. data/spec/views/spotlight/catalog/admin.html.erb_spec.rb +0 -39
  307. data/spec/views/spotlight/catalog/edit.html.erb_spec.rb +0 -20
  308. data/spec/views/spotlight/contacts/edit.html.erb_spec.rb +0 -43
  309. data/spec/views/spotlight/dashboards/_analytics.html.erb_spec.rb +0 -45
  310. data/spec/views/spotlight/dashboards/_reindexing_activity.html.erb_spec.rb +0 -94
  311. data/spec/views/spotlight/dashboards/analytics.html.erb_spec.rb +0 -33
  312. data/spec/views/spotlight/exhibits/_exhibit_card.html.erb_spec.rb +0 -46
  313. data/spec/views/spotlight/exhibits/_form.html.erb_spec.rb +0 -38
  314. data/spec/views/spotlight/exhibits/edit.html.erb_spec.rb +0 -29
  315. data/spec/views/spotlight/exhibits/index.html.erb_spec.rb +0 -140
  316. data/spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb +0 -28
  317. data/spec/views/spotlight/feature_pages/_sidebar.html.erb_spec.rb +0 -45
  318. data/spec/views/spotlight/featured_images/_form.html.erb_spec.rb +0 -32
  319. data/spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb +0 -32
  320. data/spec/views/spotlight/home_pages/_empty.html.erb_spec.rb +0 -28
  321. data/spec/views/spotlight/home_pages/_sidebar.html.erb_spec.rb +0 -12
  322. data/spec/views/spotlight/job_trackers/show.html.erb_spec.rb +0 -65
  323. data/spec/views/spotlight/metadata_configurations/_metadata_field.html.erb_spec.rb +0 -30
  324. data/spec/views/spotlight/metadata_configurations/edit.html.erb_spec.rb +0 -23
  325. data/spec/views/spotlight/pages/_form.html.erb_spec.rb +0 -20
  326. data/spec/views/spotlight/pages/edit.html.erb_spec.rb +0 -68
  327. data/spec/views/spotlight/pages/index.html.erb_spec.rb +0 -42
  328. data/spec/views/spotlight/pages/new.html.erb_spec.rb +0 -21
  329. data/spec/views/spotlight/pages/show.html.erb_spec.rb +0 -84
  330. data/spec/views/spotlight/resources/_external_resources_form.html.erb_spec.rb +0 -36
  331. data/spec/views/spotlight/resources/new.html.erb_spec.rb +0 -30
  332. data/spec/views/spotlight/roles/index.html.erb_spec.rb +0 -30
  333. data/spec/views/spotlight/search_configurations/_facet_metadata.html.erb_spec.rb +0 -32
  334. data/spec/views/spotlight/search_configurations/_facets.html.erb_spec.rb +0 -54
  335. data/spec/views/spotlight/search_configurations/_search_fields.html.erb_spec.rb +0 -54
  336. data/spec/views/spotlight/search_configurations/_sort.html.erb_spec.rb +0 -40
  337. data/spec/views/spotlight/searches/_search.html.erb_spec.rb +0 -37
  338. data/spec/views/spotlight/searches/edit.html.erb_spec.rb +0 -40
  339. data/spec/views/spotlight/searches/index.html.erb_spec.rb +0 -33
  340. data/spec/views/spotlight/sir_trevor/blocks/_browse_block.html.erb_spec.rb +0 -20
  341. data/spec/views/spotlight/sir_trevor/blocks/_iframe_block.html.erb_spec.rb +0 -20
  342. data/spec/views/spotlight/sir_trevor/blocks/_link_to_search_block.html.erb_spec.rb +0 -20
  343. data/spec/views/spotlight/sir_trevor/blocks/_rule_block.html.erb_spec.rb +0 -10
  344. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_block.html.erb_spec.rb +0 -43
  345. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_carousel_block.html.erb_spec.rb +0 -34
  346. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_embed_block.html.erb_spec.rb +0 -53
  347. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_features_block.html.erb_spec.rb +0 -54
  348. data/spec/views/spotlight/sir_trevor/blocks/_solr_documents_grid_block.html.erb_spec.rb +0 -42
  349. data/spec/views/spotlight/sites/edit_exhibits.html.erb_spec.rb +0 -25
  350. data/spec/views/spotlight/tags/index.html.erb_spec.rb +0 -28
  351. data/spec/views/spotlight/translations/_import.html.erb_spec.rb +0 -24
  352. data/spec/views/spotlight/translations/_page.html.erb_spec.rb +0 -76
@@ -1,91 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- describe 'Add and update the site masthead', type: :feature do
4
- let(:user) { FactoryBot.create(:site_admin) }
5
-
6
- before { login_as user }
7
-
8
- it 'updates site masthead options' do
9
- visit spotlight.edit_site_path
10
-
11
- click_link 'Site masthead'
12
-
13
- within '#site-masthead' do
14
- check 'Show background image in masthead'
15
- # attach_file('site_masthead_attributes_image', File.absolute_path(File.join(FIXTURES_PATH, 'avatar.png')))
16
- # The JS fills in these fields:
17
- find('#site_masthead_attributes_iiif_tilesource', visible: false).set 'http://test.host/images/7'
18
- find('#site_masthead_attributes_iiif_region', visible: false).set '0,0,100,200'
19
- end
20
-
21
- click_button 'Save changes'
22
-
23
- expect(page).to have_content('The site was successfully updated.')
24
-
25
- visit spotlight.edit_site_path
26
- click_link 'Site masthead'
27
-
28
- within '#site-masthead' do
29
- expect(page).to have_checked_field 'Show background image in masthead'
30
- end
31
- end
32
-
33
- it 'idempotently updates the site masthead options' do
34
- visit spotlight.edit_site_path
35
-
36
- click_link 'Site masthead'
37
-
38
- within '#site-masthead' do
39
- check 'Show background image in masthead'
40
- # attach_file('site_masthead_attributes_image', File.absolute_path(File.join(FIXTURES_PATH, 'avatar.png')))
41
- # The JS fills in these fields:
42
- find('#site_masthead_attributes_iiif_tilesource', visible: false).set 'http://test.host/images/7'
43
- find('#site_masthead_attributes_iiif_region', visible: false).set '0,0,100,200'
44
- end
45
-
46
- click_button 'Save changes'
47
-
48
- expect(page).to have_content('The site was successfully updated.')
49
-
50
- visit spotlight.edit_site_path
51
- click_link 'Site masthead'
52
- click_button 'Save changes'
53
- expect(page).to have_css('.image-masthead .background-container')
54
- end
55
-
56
- it 'displays a masthead image when one is uploaded and configured' do
57
- visit spotlight.edit_site_path
58
-
59
- expect(page).not_to have_css('.image-masthead')
60
-
61
- click_link 'Site masthead'
62
-
63
- within '#site-masthead' do
64
- check 'Show background image in masthead'
65
-
66
- # attach_file('site_masthead_attributes_image', File.absolute_path(File.join(FIXTURES_PATH, 'avatar.png')))
67
- find('#site_masthead_attributes_iiif_tilesource', visible: false).set 'http://test.host/images/7'
68
- find('#site_masthead_attributes_iiif_region', visible: false).set '0,0,100,200'
69
- end
70
-
71
- click_button 'Save changes'
72
- expect(page).to have_content('The site was successfully updated.')
73
- expect(page).to have_css('.image-masthead .background-container')
74
- end
75
-
76
- it 'does not display an uploaded masthead if configured to not display' do
77
- visit spotlight.edit_site_path
78
-
79
- expect(page).not_to have_css('.image-masthead')
80
-
81
- click_link 'Site masthead'
82
-
83
- within '#site-masthead' do
84
- attach_file('site_masthead_attributes_file', File.absolute_path(File.join(FIXTURES_PATH, 'avatar.png')))
85
- end
86
-
87
- click_button 'Save changes'
88
- expect(page).to have_content('The site was successfully updated.')
89
- expect(page).not_to have_css('.image-masthead .background-container')
90
- end
91
- end
@@ -1,74 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- describe 'Site users management', js: true do
4
- let(:user) { FactoryBot.create(:site_admin) }
5
- let!(:existing_user) { FactoryBot.create(:exhibit_visitor) }
6
- let!(:exhibit_admin) { FactoryBot.create(:exhibit_admin) }
7
- let!(:exhibit_curator) { FactoryBot.create(:exhibit_curator) }
8
-
9
- before do
10
- login_as(user)
11
- visit spotlight.admin_users_path
12
- end
13
-
14
- it 'displays the current admin users' do
15
- expect(page).to have_css('td', text: user.email)
16
- end
17
-
18
- describe 'copy email addresses' do
19
- it 'displays only email addresses of users w/ roles' do
20
- expect(page).to have_css('div#admins_curators', text: user.email)
21
- expect(page).to have_css('div#admins_curators', text: exhibit_admin.email)
22
- expect(page).to have_css('div#admins_curators', text: exhibit_curator.email)
23
- expect(page).not_to have_css('div#admins_curators', text: existing_user.email)
24
- expect(page).to have_css('button.copy-email-addresses')
25
- end
26
- end
27
-
28
- it 'allows non-existing users to be invited' do
29
- click_link 'Add new administrator'
30
-
31
- fill_in 'user_email', with: 'not-an-existing-user@example.com'
32
-
33
- click_button 'Add role'
34
-
35
- expect(page).to have_content('not-an-existing-user@example.com pending')
36
- end
37
-
38
- it 'allows the admin to remove the admin role from the user' do
39
- click_link 'Add new administrator'
40
-
41
- fill_in 'user_email', with: 'not-an-admin@example.com'
42
-
43
- click_button 'Add role'
44
-
45
- expect(page).to have_css('td', text: 'not-an-admin@example.com')
46
-
47
- expect(page).to have_css('a', text: 'Remove from admin role', count: 2)
48
- within(all('table tbody tr:not([data-edit-for])').last) do
49
- click_link 'Remove from admin role'
50
- end
51
-
52
- expect(page).to have_content 'User removed from site adminstrator role'
53
- expect(page).to have_css('a', text: 'Remove from admin role', count: 0)
54
- end
55
-
56
- it 'sends an invitation email to users who do not exist' do
57
- click_link 'Add new administrator'
58
-
59
- fill_in 'user_email', with: 'a-user-that-did-not-exist@example.com'
60
-
61
- expect do
62
- click_button 'Add role'
63
- end.to change { Devise::Mailer.deliveries.count }.by(1)
64
- expect(User.where(email: 'a-user-that-did-not-exist@example.com').first.invitation_sent_at).to be_present
65
- end
66
-
67
- it 'does not provide a button for users to remove their own adminstrator privs' do
68
- click_link 'Add new administrator'
69
-
70
- expect(page).to have_css('td', text: user.email)
71
- # There is just our admin user so no button
72
- expect(page).to have_css('a', text: 'Remove from admin role', count: 0)
73
- end
74
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- describe 'Slideshow', type: :feature, js: true do
4
- let(:exhibit) { FactoryBot.create(:exhibit) }
5
- let(:user) { FactoryBot.create(:exhibit_admin, exhibit: exhibit) }
6
-
7
- before do
8
- login_as user
9
- exhibit.blacklight_configuration.update(document_index_view_types: %w[list gallery slideshow])
10
- end
11
-
12
- it 'has slideshow' do
13
- visit spotlight.search_exhibit_catalog_path(exhibit, f: { genre_ssim: ['map'] })
14
- expect(page).to have_content 'You searched for:'
15
- within '.view-type' do
16
- click_link 'Slideshow'
17
- end
18
- find('.grid [data-slide-to="1"] img').click
19
- expect(page).to have_selector '#slideshow', visible: true
20
- end
21
- end
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- describe 'Translations scope setting', type: :feature do
4
- let(:exhibit) { FactoryBot.create(:exhibit) }
5
- let(:other_exhibit) { FactoryBot.create(:exhibit) }
6
- let(:exhibit_curator) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) }
7
-
8
- describe 'exhibit route set' do
9
- before do
10
- login_as exhibit_curator
11
- FactoryBot.create(:translation, exhibit: exhibit)
12
- FactoryBot.create(:translation, exhibit: other_exhibit)
13
- end
14
-
15
- it 'default scope of Translation should be limited to current exhibit' do
16
- visit spotlight.exhibit_path(exhibit)
17
- expect(Translation.all.count).to eq 1
18
- end
19
- end
20
-
21
- describe 'without the context of an exhibit' do
22
- it 'renders page ok' do
23
- visit root_path
24
- expect(page).to have_css '.site-title', text: 'Blacklight'
25
- end
26
- end
27
- end
Binary file
Binary file
@@ -1,57 +0,0 @@
1
- Item ID,Item Title,Visibility
2
- bm387cy2596,L'AMERIQVE,true
3
- cz507zk0531,NEW MEXICO,true
4
- dq287tq6352,L'AMERIQUE,false
5
- ds525vw8509,"Mappa mondo and Figura prima del capitolo IV., ossia della divisione della terra",true
6
- dx157dh4345,KAART der REYZE van drie Schepen naar het ZUYDLAND in de Jaaren 1721 en 1722,true
7
- dy396mt9665,a Map of the Middle Part of AMERICA,true
8
- fh912bx9878,[Americas],true
9
- gk446cj2442,[World map],true
10
- gt736xf9712,HEMISPHERE OCCIDENTAL DU GLOBE TERRESTRE contenant L'AMERIQUE SEPTENT.LE et L'AMERIQUE M.LE et P.tie des TERRES ARCTIQUES et ANTARCTIQUES Subdivisées en leurs Regions.,true
11
- gv664gb7394,SITVS TERRÆ CIRCVLIS COELESTIBVS CIRCVNDATÆ.,true
12
- gw298sq0504,"PLANISPHÆRIVM BRAHEVM, Sive Structura MVNDI TOTIVS, EX HYPOTHESI TYCHONIS BRAHEI IN PLANO DELINEATA. [Amstelodami : Apud Joannem Janssonium, 1660].",true
13
- jp266yb7109,AMERICA,false
14
- jr961xz9944,AMERICA SEPTENTRIONALIS,true
15
- jy409qg0248,Novissima et Accuratissima TOTIUS AMERICÆ DESCRIPTIO.,true
16
- kw406zk5778,[America],true
17
- kw703rh2327,"Mappe-monde pour connoitre les progŕes & les conquestes les plus remarquables des Provinces-Vnies, ainsy que celles des Compagnies d'Orient et d'Occident et les païs quelles possédent dans l'un et dans l'autre hemisphere and Atlas historique, ou, nouvelle introduction à l’histoire, à la chronologie & à la géographie ancienne & moderne",true
18
- mw236cd6430,"AMERIQUE SEPTENTRIONALE divisée en ses principales parties, ou sont distingués les vns des autres LES ESTATS suivant qu'ils appartiennent presentemet aux FRANÇOIS, CASTILLANS, ANGLOIS, SUEDOIS, DANOIS, HOLLANDOIS. Tirée des Relations de toutes ces Nations Par le Sr. Sanson, Geographe Ordinaire du Roy",true
19
- np731wc7689,L'AMERIQUE | Suivant les dernieres | Observations de l'Acade= | mie Royale des Sciences Seventh of 18 States,true
20
- nq874ts4848,"Introduction a la Geographie Avec une Description Historique Sur Touttes les parties de la Terre
21
- Title page",true
22
- nr766vt0518,GEOGRAPHISCHE UNIVERSAL - ZEIG UND SCHLAG-UHR : WEERELD-BEELDIGH WYS EN SLAG WERK,true
23
- nz081wv9348,AMERIQUE SEPTENTRIONALE Par N. Sanson Geographe Ord.re du Roy. Reveue et changée en plusieurs endroits suivant les Memoires les plus recents augmentée et corrigée en cette seconde edition,true
24
- pm812zf5263,AMERICÆ,true
25
- ps921pn8250,PLANISPHERE URANO-GEOGRAPHIQUE c'estadire LES SPHERES CELESTE et TERRESTRE mises en plan.,false
26
- pt603pv6417,"A Map of the WORLD with the Ships DUKE & DUTCHESS Tract Round it, from 1708 to 1711. Second of 2 States",true
27
- qb677kc3995,L'AMERIQVE autrement Le NOVVEAV MONDE et INDES OCCIDENTALES,true
28
- qt469cf8909,"Pascaart vertoonende de Zeecusten van Chili, Peru, Hispania, Nova, Nova Granada, en California.",true
29
- rc221bv1386,[Armenian map of the world],true
30
- rj993fh5469,"A New Map of the World Shewing the Course of Sr. Francis Drake, William Shouten and Capt. William Dampiers Voyages Round it.",true
31
- rx614sw9194,AMERICÆ nova discriptio.,true
32
- rz043dh7915,MAR DEL ZUR HISPANIS MARE PACIFICUM.,true
33
- rz818vx8201,'t Noorder deel van WEST-INDIEN,true
34
- sb904gg2771,Planisphaerium terrestre cum utroque coelesti hemisphaerio ... = Vlakke ared-kloot met het beide hemelsch half-rond,true
35
- sd345mz1879,A MAP of AMERICA from the latest and best Observations,true
36
- sn161bw2027,"Pas-caart van Zuyd-Zee, tusschen California en ilhas de Ladrones and La Atlas del mundo o el mundo aguado",true
37
- sn343fc0807,AMERICQVE SEPTENTRIONALE,true
38
- sp821gh4463,[World],true
39
- sw106rc9347,AMERIQUE SEPTENTRIONALE,true
40
- sx619yv5558,"Recentissima NOVI ORBIS, Sive AMERICÆ SEPTENTRIONALIS et MERIDIONALIS TABULA",true
41
- tg729zw9405,NOVA TOTIVS AMERICÆ DESCRIPTIO.,true
42
- vb000vb1451,AMERICA,true
43
- vw323gf4937,AMERICA with those known parts in that unknowne worlde both people and manner of buildings Discribed and inlarged by I.S.Ano.1626,false
44
- vy180gj7659,L'AMERIQUE Suivant les dernieres observations de l'Acad. Royale des Sciences.,true
45
- wb806ct0449,A Generall Chart of the | SOUTH SEA | from the River of Plate to | Dampiers Streights on ye Coast | of NEW GUINEA,true
46
- wt855xd4818,CONTINENT ARCTIQVE,true
47
- xd327cm9378,"Mapa mundi, con los meridianos, y paralelos, iguales como los del globo tere- y arreglado a las mejores, y ultimas relaciones",true
48
- yh941cp6284,Orbis terrarum tabula recens emendata et in lucem edita,true
49
- ym733yc1437,"[Maps of the world] and A new and universal dictionary of arts and sciences: ... With an introductory preface, ... And illustrated with a great number of copper-plates, engraven by the best hands",true
50
- yn959jw9550,A New Map of North AMERICA According to the Newest Observations.,true
51
- ys360dp2191,TYPUS SELENOGRAPHICUS LUNÆ PHASES ET ASPECTUS VARIOS ADUMBRANS.,true
52
- zn001wm6450,L'AMERIQVE autrement Le NOVVEAV MONDE et INDES OCCIDENTALES,true
53
- zn845sh3664,PLANISPHERE REPRESENTANT TOUTE L'ETENDUE DU MONDE. DANS L'ORDRE QU'ON A SUIVI DANS CE LIVRE. NB. LES CHIFFRES SE RAPORTENT AUX CARTES ET AUX PAGES DES DESCRIPTIONS.,true
54
- zq083qg2931,[Pacific Ocean],true
55
- zr014mj0786,A New and Exact Map of ASIA According to the Best Observations,true
56
- zs247rr8237,"AMERIQUE SEPTENTRIONALE divisée en ses principales parties, ou sont distingués les vns des autres LES ESTATS suivant qu'ils appartiennent presentemet aux FRANÇOIS, CASTILLANS, ANGLOIS, SUEDOIS, DANOIS, HOLLANDOIS. Tirée des Relations de toutes ces Nations Par le Sr. Sanson, Geographe Ordinaire du Roy",true
57
- zv316zr9542,AMERIQUE SEPTENTRIONALE,false
@@ -1,4 +0,0 @@
1
- url,full_title_tesim,spotlight_upload_description_tesim,spotlight_upload_attribution_tesim,spotlight_upload_date_tesim
2
- http://lorempixel.com/800/500/,A random image,A random 800 by 500 image from lorempixel,lorempixel.com,2015
3
- http://lorempixel.com/900/600/,Another random image,A random 900 by 600 image from lorempixel,lorempixel.com,2014
4
- http://lorempixel.com/900/600/,Yet another random image to test UTF8 text,A random 900 by 600 image from lorempixel and some UTF8: Hüsker Dü,lorempixel.com,2016
@@ -1,58 +0,0 @@
1
-
2
- {
3
- "@context":"http://iiif.io/api/presentation/2/context.json",
4
- "@id":"https://purl.stanford.edu/gk446cj2442/iiif/manifest",
5
- "@type":"sc:Manifest",
6
- "label":"[World map",
7
- "attribution":"This work has been identified as being free of known restrictions under copyright law, including all related and neighboring rights. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.",
8
- "seeAlso":{
9
- "@id":"https://purl.stanford.edu/gk446cj2442.mods",
10
- "format":"application/mods+xml"
11
- },
12
- "thumbnail":{
13
- "@id":"https://stacks.stanford.edu/image/iiif/gk446cj2442%2Fgk446cj2442_05_0001/full/!400,400/0/default.jpg",
14
- "@type":"dctypes:Image",
15
- "format":"image/jpeg",
16
- "service":{
17
- "@context":"http://iiif.io/api/image/2/context.json",
18
- "@id":"https://stacks.stanford.edu/image/iiif/gk446cj2442%2Fgk446cj2442_05_0001",
19
- "profile":"http://iiif.io/api/image/2/level1.json"
20
- }
21
- },
22
- "sequences":[
23
- {
24
- "@id":"https://purl.stanford.edu/gk446cj2442#sequence-1",
25
- "@type":"sc:Sequence",
26
- "label":"Current order",
27
- "canvases":[
28
- {
29
- "@id":"https://purl.stanford.edu/gk446cj2442/iiif/canvas/gk446cj2442_1",
30
- "@type":"sc:Canvas",
31
- "label":"mclaughlin_gk446cj2442",
32
- "height":3943,
33
- "width":4956,
34
- "images":[
35
- {
36
- "@id":"https://purl.stanford.edu/gk446cj2442/iiif/annotation/gk446cj2442_1",
37
- "@type":"oa:Annotation",
38
- "motivation":"sc:painting",
39
- "resource":{
40
- "@id":"https://stacks.stanford.edu/image/iiif/gk446cj2442%2Fgk446cj2442_05_0001/full/full/0/default.jpg",
41
- "@type":"dctypes:Image",
42
- "format":"image/jpeg",
43
- "height":3943,
44
- "width":4956,
45
- "service":{
46
- "@context":"http://iiif.io/api/image/2/context.json",
47
- "@id":"https://stacks.stanford.edu/image/iiif/gk446cj2442%2Fgk446cj2442_05_0001",
48
- "profile":"http://iiif.io/api/image/2/level1.json"
49
- }
50
- },
51
- "on":"https://purl.stanford.edu/gk446cj2442/iiif/canvas/gk446cj2442_1"
52
- }
53
- ]
54
- }
55
- ]
56
- }
57
- ]
58
- }
@@ -1,312 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module IiifResponses
4
- def complex_collection
5
- {
6
- "@id": 'uri://for-top-level-collection',
7
- "@type": 'sc:Collection',
8
- label: 'Complex Collection',
9
- collections: [
10
- {
11
- "@id": 'uri://for-child-collection1',
12
- "@type": 'sc:Collection',
13
- label: 'Child Collection 1'
14
- },
15
- {
16
- "@id": 'uri://for-child-collection2',
17
- "@type": 'sc:Collection',
18
- label: 'Child Collection 2'
19
- }
20
- ],
21
- manifests: [
22
- {
23
- "@id": 'uri://for-manifest1',
24
- "@type": 'sc:Manifest',
25
- label: 'Test Manifest 1'
26
- }
27
- ]
28
- }.to_json
29
- end
30
-
31
- def child_collection1
32
- {
33
- "@id": 'uri://for-child-collection1',
34
- "@type": 'sc:Collection',
35
- label: 'Child Collection 1',
36
- collections: [
37
- {
38
- "@id": 'uri://for-child-collection3',
39
- "@type": 'sc:Collection',
40
- label: 'Child Collection 3'
41
- }
42
- ],
43
- manifests: [
44
- {
45
- "@id": 'uri://for-manifest2',
46
- "@type": 'sc:Manifest',
47
- label: 'Test Manifest 2'
48
- }
49
- ]
50
- }.to_json
51
- end
52
-
53
- def child_collection2
54
- {
55
- "@id": 'uri://for-child-collection2',
56
- "@type": 'sc:Collection',
57
- label: 'Child Collection 2',
58
- manifests: [
59
- {
60
- "@id": 'uri://for-manifest4',
61
- "@type": 'sc:Manifest',
62
- label: 'Test Manifest 4'
63
- }
64
- ]
65
- }.to_json
66
- end
67
-
68
- def child_collection3
69
- {
70
- "@id": 'uri://for-child-collection3',
71
- "@type": 'sc:Collection',
72
- label: 'Child Collection 3',
73
- manifests: [
74
- {
75
- "@id": 'uri://for-manifest3',
76
- "@type": 'sc:Manifest',
77
- label: 'Test Manifest 3'
78
- }
79
- ]
80
- }.to_json
81
- end
82
-
83
- def test_manifest1
84
- {
85
- "@id": 'uri://for-manifest1',
86
- "@type": 'sc:Manifest',
87
- label: 'Test Manifest 1',
88
- attribution: 'Attribution Data',
89
- description: 'A test IIIF manifest',
90
- license: 'http://www.example.org/license.html',
91
- metadata: [
92
- {
93
- label: 'Author',
94
- value: 'John Doe'
95
- },
96
- {
97
- label: 'Author',
98
- value: 'Jane Doe'
99
- },
100
- {
101
- label: 'Another Field',
102
- value: 'Some data'
103
- }
104
- ],
105
- thumbnail: {
106
- "@id": 'uri://to-thumbnail'
107
- },
108
- sequences: [
109
- {
110
- "@type": 'sc:Sequence',
111
- canvases: [
112
- {
113
- "@type": 'sc:Canvas',
114
- images: [
115
- {
116
- "@type": 'oa:Annotation',
117
- resource: {
118
- "@type": 'dcterms:Image',
119
- "@id": 'uri://full-image',
120
- service: {
121
- "@id": 'uri://to-image-service'
122
- }
123
- }
124
- }
125
- ]
126
- }
127
- ]
128
- }
129
- ]
130
- }.to_json
131
- end
132
-
133
- def test_manifest2
134
- {
135
- "@id": 'uri://for-manifest2',
136
- "@type": 'sc:Manifest',
137
- label: {
138
- "@value": 'Test Manifest 2',
139
- "@language": 'en'
140
- },
141
- attribution: 'Attribution Data',
142
- description: 'A test IIIF manifest',
143
- license: 'http://www.example.org/license.html',
144
- metadata: [
145
- {
146
- label: 'Contributor',
147
- value: 'John Doe'
148
- },
149
- {
150
- label: 'Yet Another Field',
151
- value: 'Some data'
152
- }
153
- ],
154
- thumbnail: {
155
- "@id": 'uri://to-thumbnail'
156
- },
157
- sequences: [
158
- {
159
- "@type": 'sc:Sequence',
160
- canvases: [
161
- {
162
- "@type": 'sc:Canvas',
163
- images: [
164
- {
165
- "@type": 'oa:Annotation',
166
- resource: {
167
- "@type": 'dcterms:Image',
168
- service: {
169
- "@id": 'uri://to-image-service'
170
- }
171
- }
172
- },
173
- {
174
- "@type": 'oa:Annotation',
175
- resource: {
176
- "@type": 'dcterms:Image',
177
- service: {
178
- "@id": 'uri://to-image-service2'
179
- }
180
- }
181
- }
182
- ]
183
- }
184
- ]
185
- }
186
- ]
187
- }.to_json
188
- end
189
-
190
- def test_manifest3
191
- {
192
- "@id": 'uri://for-manifest3',
193
- "@type": 'sc:Manifest',
194
- label: [
195
- {
196
- "@value": 'Test Manifest 3',
197
- "@language": 'en'
198
- },
199
- {
200
- "@value": "Manifeste d'essai 3",
201
- "@language": 'fr'
202
- }
203
- ],
204
- attribution: 'Attribution Data',
205
- description: 'A test IIIF manifest',
206
- license: 'http://www.example.org/license.html',
207
- metadata: [
208
- {
209
- label: 'Author',
210
- value: 'Jane Doe'
211
- },
212
- {
213
- label: 'Collection',
214
- value: 'Some Collection'
215
- }
216
- ],
217
- thumbnail: {
218
- "@id": 'uri://to-thumbnail'
219
- },
220
- sequences: [
221
- {
222
- "@type": 'sc:Sequence',
223
- canvases: [
224
- {
225
- "@type": 'sc:Canvas',
226
- images: [
227
- {
228
- "@type": 'oa:Annotation',
229
- resource: {
230
- "@type": 'dcterms:Image',
231
- service: {
232
- "@id": 'uri://to-image-service'
233
- }
234
- }
235
- }
236
- ]
237
- }
238
- ]
239
- }
240
- ]
241
- }.to_json
242
- end
243
-
244
- def test_manifest4
245
- {
246
- "@id": 'uri://for-manifest4',
247
- "@type": 'sc:Manifest',
248
- label: 'Test Manifest 4',
249
- attribution: 'Attribution Data',
250
- description: 'A test IIIF manifest',
251
- license: 'http://www.example.org/license.html',
252
- metadata: [
253
- {
254
- label: 'Contributor',
255
- value: 'Jane Doe'
256
- },
257
- {
258
- label: 'Location',
259
- value: 'Some location'
260
- }
261
- ],
262
- thumbnail: {
263
- "@id": 'uri://to-thumbnail'
264
- },
265
- sequences: [
266
- {
267
- "@type": 'sc:Sequence',
268
- canvases: [
269
- {
270
- "@type": 'sc:Canvas',
271
- images: [
272
- {
273
- "@type": 'oa:Annotation',
274
- resource: {
275
- "@type": 'dcterms:Image',
276
- service: {
277
- "@id": 'uri://to-image-service'
278
- }
279
- }
280
- }
281
- ]
282
- }
283
- ]
284
- }
285
- ]
286
- }.to_json
287
- end
288
-
289
- # inspired by https://api.digitale-sammlungen.de/iiif/presentation/v2/bsb00017921/manifest
290
- def test_multilingual_manifest_like_bsb
291
- { '@context' => 'http://iiif.io/api/presentation/2/context.json',
292
- '@type' => 'sc:Manifest',
293
- '@id' => 'https://api.digitale-sammlungen.de/iiif/presentation/v2/bsb00017921/manifest',
294
- 'label' => 'Murasaki Shikibu: Genji monogatari - BSB Cod.jap. 18(53',
295
- 'metadata' => [
296
- { 'label' =>
297
- [{ '@language' => 'de', '@value' => 'Verfasser' },
298
- { '@language' => 'zh', '@value' => '作者' },
299
- { '@language' => 'en', '@value' => 'Author' }],
300
- 'value' =>
301
- "<span>Murasaki Shikibu -- (GND: <a href='http://d-nb.info/gnd/118985655/'>118985655</a>)</span>" },
302
- { 'label' =>
303
- [{ '@language' => 'de', '@value' => 'Sprache' },
304
- { '@language' => 'zh', '@value' => '語言' },
305
- { '@language' => 'en', '@value' => 'Language' }],
306
- 'value' =>
307
- [{ '@language' => 'de', '@value' => 'Japanisch' },
308
- { '@language' => 'zh', '@value' => '日语' },
309
- { '@language' => 'en', '@value' => 'Japanese' }] }
310
- ] }.to_json
311
- end
312
- end
@@ -1,3 +0,0 @@
1
- {
2
- "a": 1
3
- }