krikri 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/krikri/application.css +15 -0
- data/app/controllers/krikri/providers_controller.rb +27 -0
- data/app/controllers/krikri/qa_reports_controller.rb +28 -0
- data/app/controllers/krikri/records_controller.rb +29 -5
- data/app/controllers/krikri/reports_controller.rb +24 -0
- data/app/controllers/krikri/validation_reports_controller.rb +11 -29
- data/app/helpers/krikri/application_helper.rb +62 -0
- data/app/helpers/krikri/records_helper.rb +14 -0
- data/app/helpers/krikri/reports_helper.rb +16 -0
- data/app/models/krikri/activity.rb +27 -0
- data/app/models/krikri/provider.rb +80 -0
- data/app/models/krikri/qa_report.rb +238 -0
- data/app/models/krikri/validation_report.rb +62 -0
- data/app/views/krikri/providers/index.html.erb +18 -0
- data/app/views/krikri/providers/show.html.erb +21 -0
- data/app/views/krikri/qa_reports/index.html.erb +12 -0
- data/app/views/krikri/qa_reports/show.html.erb +1 -0
- data/app/views/krikri/records/index.html.erb +0 -2
- data/app/views/krikri/records/show.html.erb +12 -9
- data/app/views/krikri/reports/_qa_report_list.html.erb +13 -0
- data/app/views/krikri/reports/_validation_report_list.html.erb +10 -0
- data/app/views/krikri/reports/index.html.erb +11 -0
- data/app/views/krikri/shared/_flash_message.html.erb +1 -0
- data/app/views/krikri/shared/_navigation.html.erb +38 -8
- data/app/views/krikri/validation_reports/_validation_report.html.erb +23 -0
- data/app/views/krikri/validation_reports/show.html.erb +19 -0
- data/config/routes.rb +6 -2
- data/config/settings/development.yml +6 -0
- data/config/settings/test.yml +9 -0
- data/db/migrate/20150328035550_add_qa_report.rb +11 -0
- data/lib/generators/krikri/templates/schema.xml +36 -36
- data/lib/krikri/engine.rb +10 -0
- data/lib/krikri/enricher.rb +14 -15
- data/lib/krikri/entity_behavior.rb +40 -0
- data/lib/krikri/entity_behaviors/aggregation_entity_behavior.rb +29 -0
- data/lib/krikri/entity_behaviors/original_record_entity_behavior.rb +26 -0
- data/lib/krikri/entity_consumer.rb +48 -0
- data/lib/krikri/harvester.rb +8 -0
- data/lib/krikri/indexer.rb +46 -0
- data/lib/krikri/mapper.rb +25 -9
- data/lib/krikri/qa_query_client.rb +154 -0
- data/lib/krikri/random_search_index_document_builder.rb +41 -0
- data/lib/krikri/search_index.rb +326 -0
- data/lib/krikri/search_results_helper_behavior.rb +2 -29
- data/lib/krikri/software_agent.rb +15 -0
- data/lib/krikri/solr_response_builder.rb +14 -0
- data/lib/krikri/version.rb +1 -1
- data/lib/krikri.rb +5 -0
- data/lib/tasks/krikri.rake +10 -11
- data/spec/controllers/application_controller_spec.rb +5 -0
- data/spec/controllers/providers_controller_spec.rb +37 -0
- data/spec/controllers/qa_reports_controller_spec.rb +69 -0
- data/spec/controllers/records_controller_spec.rb +73 -0
- data/spec/controllers/reports_controller_spec.rb +56 -0
- data/spec/controllers/validation_reports_controller_spec.rb +4 -5
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +207 -0
- data/spec/factories/krikri_activities.rb +34 -10
- data/spec/factories/krikri_provider.rb +8 -0
- data/spec/factories/krikri_qa_report.rb +7 -0
- data/spec/helpers/krikri/application_helper_spec.rb +43 -0
- data/spec/helpers/krikri/records_helper_spec.rb +15 -3
- data/spec/internal/Gemfile +3 -4
- data/spec/internal/Gemfile.lock +59 -37
- data/spec/internal/app/assets/javascripts/application.js +1 -1
- data/spec/internal/config/initializers/blacklight_initializer.rb +1 -1
- data/spec/internal/config/initializers/devise.rb +2 -2
- data/spec/internal/config/secrets.yml +2 -2
- data/spec/internal/db/development.sqlite3 +0 -0
- data/spec/internal/db/migrate/{20150320153132_devise_create_users.rb → 20150403220331_devise_create_users.rb} +0 -0
- data/spec/internal/db/migrate/{20150320153151_create_searches.blacklight.rb → 20150403220354_create_searches.blacklight.rb} +0 -0
- data/spec/internal/db/migrate/{20150320153152_create_bookmarks.blacklight.rb → 20150403220355_create_bookmarks.blacklight.rb} +0 -0
- data/spec/internal/db/migrate/{20150320153153_add_polymorphic_type_to_bookmarks.blacklight.rb → 20150403220356_add_polymorphic_type_to_bookmarks.blacklight.rb} +0 -0
- data/spec/internal/db/schema.rb +9 -1
- data/spec/internal/db/test.sqlite3 +0 -0
- data/spec/internal/log/development.log +88 -83
- data/spec/internal/log/test.log +3229 -83003
- data/spec/internal/tmp/cache/assets/test/sass/{b28605b1c659cf09fc72f3c1fff32918869d28b8 → 6449c927c92ef1ea4378c66161e3b0efe1bf954d}/_bootstrap-sprockets.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{b28605b1c659cf09fc72f3c1fff32918869d28b8 → 6449c927c92ef1ea4378c66161e3b0efe1bf954d}/_bootstrap.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93e201cf4a11978a1f491a057a3bd569c3825210 → 71fba6bdfa89d88fe8a72b36eafd3b91cf10a6d0}/blacklight.css.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_alerts.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_background-variant.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_border-radius.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_buttons.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_center-block.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_clearfix.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_forms.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_gradients.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_grid-framework.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_grid.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_hide-text.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_image.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_labels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_list-group.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_nav-divider.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_nav-vertical-align.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_opacity.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_pagination.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_panels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_progress-bar.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_reset-filter.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_resize.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_responsive-visibility.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_size.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_tab-focus.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_table-row.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_text-emphasis.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_text-overflow.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{4a3ee647961c7e45976eb2c0a94406aad3427b3d → 75eb48b5361d55a8133e0091d663a085dacee3c5}/_vendor-prefixes.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{ca8c12d03785e0d6cd4554f4d3939e7836d38282 → 78e0580c292179fc5fdd7b74b703dad1702b4176}/_blacklight_base.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{ca8c12d03785e0d6cd4554f4d3939e7836d38282 → 78e0580c292179fc5fdd7b74b703dad1702b4176}/_bookmark.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{ca8c12d03785e0d6cd4554f4d3939e7836d38282 → 78e0580c292179fc5fdd7b74b703dad1702b4176}/_catalog.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{ca8c12d03785e0d6cd4554f4d3939e7836d38282 → 78e0580c292179fc5fdd7b74b703dad1702b4176}/_facets.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{ca8c12d03785e0d6cd4554f4d3939e7836d38282 → 78e0580c292179fc5fdd7b74b703dad1702b4176}/_group.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{ca8c12d03785e0d6cd4554f4d3939e7836d38282 → 78e0580c292179fc5fdd7b74b703dad1702b4176}/_header.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{ca8c12d03785e0d6cd4554f4d3939e7836d38282 → 78e0580c292179fc5fdd7b74b703dad1702b4176}/_layout.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{ca8c12d03785e0d6cd4554f4d3939e7836d38282 → 78e0580c292179fc5fdd7b74b703dad1702b4176}/_modal.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{ca8c12d03785e0d6cd4554f4d3939e7836d38282 → 78e0580c292179fc5fdd7b74b703dad1702b4176}/_search_history.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{ca8c12d03785e0d6cd4554f4d3939e7836d38282 → 78e0580c292179fc5fdd7b74b703dad1702b4176}/blacklight.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{ca8c12d03785e0d6cd4554f4d3939e7836d38282 → 78e0580c292179fc5fdd7b74b703dad1702b4176}/blacklight_defaults.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_alerts.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_badges.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_breadcrumbs.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_button-groups.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_buttons.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_carousel.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_close.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_code.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_component-animations.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_dropdowns.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_forms.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_glyphicons.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_grid.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_input-groups.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_jumbotron.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_labels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_list-group.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_media.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_mixins.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_modals.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_navbar.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_navs.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_normalize.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_pager.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_pagination.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_panels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_popovers.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_print.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_progress-bars.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_responsive-embed.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_responsive-utilities.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_scaffolding.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_tables.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_thumbnails.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_tooltip.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_type.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_utilities.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_variables.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{a1ec1bb9c9cafeb054d542e861ebc8ffd5904439 → f79e9f3544f6b8d5f7ca05529260dceec8dd44ed}/_wells.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/05604ccd7329b6afb8e7cdafbaa09fe3 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/0b3850cd2568d76d8583e8e6bffa44d9 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/0dffbe192bade10cf2b568c73695e96e +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/0e349883625d7536c00fac0eafde4415 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/0f05dd42159c418ddcfa12edd10d98bb +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{ab2a05b91d7d316d4ceb47ce067006fb → 11b7eeb5da37de1c315d886349adbc98} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/16648e86ab6ef2950f3630ff0d566409 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/1877c8233ee501d08788d7324a70bd70 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/1c814c5c5dfd63768fff312c442847d6 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/1e699d4d1e439eeb1d52a210573f5053 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/2c58fb6a2406edc8067b46ee33af7262 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/2d0220441d85355dcd9ade523f95c048 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{3cc20a63495e66e9251101ccfb0d389c → 39329b3558b9f58b0d4e43621aeaa8c2} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/39ed74e4d194593ec48c481d0fd76007 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/40271adcb3c4654dcb20b55abc2505c9 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/402ffe46f4586abacce366e0e3f690d8 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{43da966542fafc2a4c768be78527391c → 46ec3d34d3576e4452b0a95b87176996} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{9f68eb44ffcb9dd95623c179300414fd → 4a9e62d054a09c7c8e486f73bd032bdc} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/4c5e3966eae6a44e852dcf449c3f4cb0 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/52ce034583a746333fd7b8aa3916b8e1 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/52fe40fddbd8e73f6743866d4930bde6 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{f3935581a84aba9a499005ed6a8e18be → 53329c49c9b4ba25d31c73c9b98260b0} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{c9efce42580b0ad0374a052aa61f2a07 → 59b1fd64c6fc18a82465ad6fdc7094fa} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/677fd27eda24da657f51d725742582f3 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/6b2c5572f9e2cd322ad7b2878673d0dd +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/735621cd88de5e37980cced4fb13ded9 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/7e4f29f7a7327f10677cd047be78cf8a +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{350a65d446eb7398f96d102f7a1a6d69 → 7f804c48c333d9758fa49ff9331b78e2} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/806c560c2f6e89ba0ad39561804ff79c +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{f3e7729c53b8a2c408086a61b58922ae → 82dd05a187bccd30f62fabb16491fe03} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{f74af03e26e893af40b07a6d0f970cd4 → 82de1c42365fd1cf6a2adc2f644150c1} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{813e23719129cf9f19349f720bebdf70 → 853ad370adfaa0da7ec26f51b89421f1} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/857d45eb67a43a30a6d5d0370464e596 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/8da6b6aafe413b1ba635e82f71c194be +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{b1a42de74c934edd0e5eed0f98a23597 → 8ea9ff17090b736331312d04c8036810} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{d1bce36d6e3ab792562b9c929f2ce897 → 8fad7abbbfbb3748b36d73dfb482c2bd} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/9181f512b689ddb01d6778bac83791ac +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{b660ec1ede271559cfd0259eed96ae9c → 92c82efebbff4c3a9f96e08b308e92dd} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/93aaa9231a32901266b05632f3d35ecd +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{8ad5c3dc0f5fcc5d7a775d6294dda9f5 → 93c6b8da8f3373c42510a25694457483} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{bb92f4b8c1bedafe60b6f226b549138a → 93dd91f6519f569f11fddf4df22460d9} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/9443255223294f7ad9ad6daba446afc3 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/96ff03d6a5f9604c6980874bb00c1d17 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/9ca9885875e2e0ab4e531cba60aa03e5 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{41b62fb10530766b5b9fef3338f5f30b → a13d3a27038cf6570d22b54c54442642} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{ba078b29a7f067b3acdd538a286235a8 → aa92d8a74950d2d6217a51424ce4b33b} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/ad4a54c43c2a4c3874bfde1c9f08c248 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{30ca7caa200fa8eaddaef443913ad9ad → b146aa842b38c17ed4117b2f52d4b51f} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b37776526b5809e55fbb0add6d059127 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{db0d9534ecdebba33af5d1d81060e855 → b6d54919d5e4a3921287a5fb178dc455} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/c514fd002d57ddf3d94669e369d45283 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{b225d67626669cb154cbe08a3c439d48 → cd59839c2fc0d494ffa76ef4c4dbfa42} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{b3ae9e3cdd9991d7103b0a00e33b5778 → d32e733978c8eb7c7db3ec2b865ee87f} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d6995317fba3b6344c75db70b8c997e2 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{ecfc314951b349e27742c1b26880619e → d7bf17ad1471147b5314b4dda0bad9fe} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{9ce190f082dc4fb74bddb818cc011ce6 → e6a1afebb687728d619fe27e84335d2f} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{19f4ba6fa86d2609c171da9f5ee3b11a → e83c10c393da1c028c7d4217ecfc9c03} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f64fd792a429f69332c1489015953219 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{fa11f1beb15b0f04503ce1f06701a8bf → f7a87683461c3a58ee9b6e9546473c4e} +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/{4e93570db72bb61820711448b78d548d → fed76e6bd857a06488c186874bbe2bb2} +0 -0
- data/spec/krikri_spec.rb +8 -0
- data/spec/lib/krikri/aggregation_entity_behavior_spec.rb +37 -0
- data/spec/lib/krikri/enricher_spec.rb +38 -1
- data/spec/lib/krikri/entity_consumer_spec.rb +27 -0
- data/spec/lib/krikri/indexer_spec.rb +48 -0
- data/spec/lib/krikri/mapper_agent_spec.rb +54 -40
- data/spec/lib/krikri/qa_query_client_spec.rb +120 -0
- data/spec/lib/krikri/random_search_index_docmument_builder_spec.rb +31 -0
- data/spec/lib/krikri/search_index_spec.rb +547 -0
- data/spec/models/activity_spec.rb +19 -0
- data/spec/models/provider_spec.rb +119 -0
- data/spec/models/qa_report_spec.rb +102 -0
- data/spec/models/validation_report_spec.rb +49 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/support/shared_contexts/entities_query.rb +22 -0
- data/spec/support/shared_contexts/indexed_item.rb +27 -0
- data/spec/support/shared_contexts/provenance_query_client.rb +15 -2
- data/spec/views/krikri/providers/index.html.erb_spec.rb +23 -0
- data/spec/views/krikri/providers/show.html.erb_spec.rb +22 -0
- data/spec/views/krikri/qa_reports/index.html.erb_spec.rb +42 -0
- data/spec/views/krikri/qa_reports/show.html.erb_spec.rb +5 -0
- data/spec/views/krikri/records/index.html.erb_spec.rb +5 -0
- data/spec/views/krikri/records/show.html.erb_spec.rb +49 -0
- data/spec/views/krikri/reports/index.html.erb_spec.rb +26 -0
- metadata +501 -593
- data/app/controllers/krikri/report_lists_controller.rb +0 -10
- data/app/helpers/krikri/validation_reports_helper.rb +0 -5
- data/app/models/krikri/harvesters/oai_harvester.rb~ +0 -10
- data/app/models/krikri/original_record_desc.rb~ +0 -6
- data/app/models/krikri/original_record_metadata.rb~ +0 -9
- data/app/models/krikri/parser.rb~ +0 -5
- data/app/models/krikri/parsers/xml_parser.rb~ +0 -5
- data/app/views/krikri/report_lists/_validation_report_list.html.erb +0 -14
- data/app/views/krikri/report_lists/index.html.erb +0 -5
- data/app/views/krikri/validation_reports/_document_list.html.erb +0 -18
- data/app/views/krikri/validation_reports/_search_header.html.erb +0 -1
- data/app/views/krikri/validation_reports/_zero_results.html.erb +0 -1
- data/app/views/krikri/validation_reports/index.html.erb +0 -18
- data/config/initializers/config.rb~ +0 -19
- data/config/settings/test.yml~ +0 -3
- data/lib/aggregation.rb~ +0 -4
- data/lib/blacklight.rb~ +0 -8
- data/lib/krikri/enrichment.rb~ +0 -5
- data/lib/krikri/enrichment_agent.rb~ +0 -11
- data/lib/krikri/enrichment_agent_spec.rb~ +0 -2
- data/lib/krikri/enrichment_job.rb~ +0 -13
- data/lib/krikri/enrichments/dedup_values.rb~ +0 -7
- data/lib/krikri/enrichments/strip_ending_punctuation.rb~ +0 -18
- data/lib/krikri/enrichments/strip_leading_colons.rb~ +0 -15
- data/lib/krikri/enrichments/strip_leading_punctuation.rb~ +0 -18
- data/lib/krikri/enrichments.rb~ +0 -4
- data/lib/krikri/field_enrichment.rb~ +0 -3
- data/lib/krikri/harvesters/api_harvester.rb~ +0 -44
- data/lib/krikri/harvesters/basic_save_behavior.rb~ +0 -1
- data/lib/krikri/harvesters/file_harvester.rb~ +0 -4
- data/lib/krikri/harvesters/harvest_behavior.rb~ +0 -14
- data/lib/krikri/harvesters/mdl_api_harvester.rb~ +0 -7
- data/lib/krikri/harvesters/mdl_harvester.rb~ +0 -4
- data/lib/krikri/harvesters/oai_skip_deleted_behavior.rb~ +0 -17
- data/lib/krikri/id_minter.rb~ +0 -8
- data/lib/krikri/id_service.rb~ +0 -4
- data/lib/krikri/index_service.rb +0 -128
- data/lib/krikri/ldp/container.rb~ +0 -22
- data/lib/krikri/ldp/nr_source.rb~ +0 -4
- data/lib/krikri/ldp/rdf_source.rb~ +0 -24
- data/lib/krikri/ldp/resource.rb~ +0 -49
- data/lib/krikri/mapping_dsl.rb~ +0 -4
- data/lib/krikri/mapping_job.rb~ +0 -13
- data/lib/krikri/md5_minter.rb~ +0 -8
- data/lib/krikri/parsers/json_parser.rb~ +0 -17
- data/lib/krikri/parsers/oai_headers.rb~ +0 -4
- data/lib/krikri/parsers/oai_parser.rb~ +0 -2
- data/lib/krikri/parsers/oai_parser_headers.rb~ +0 -4
- data/lib/krikri/parsers/xml_parser.rb~ +0 -61
- data/lib/krikri/provenance_query.rb~ +0 -4
- data/lib/krikri/provenance_query_client.rb~ +0 -11
- data/lib/krikri/random_record_generator.rb +0 -19
- data/lib/krikri/util/edtf_converter.rb~ +0 -26
- data/lib/krikri/util/extended_date_parser.rb~ +0 -70
- data/lib/krikri/validation_report_list.rb +0 -61
- data/lib/tasks/jetty.rake~ +0 -12
- data/lib/tasks/krikri.rake~ +0 -20
- data/spec/factories/krikri_original_record.rb~ +0 -5
- data/spec/internal/lib/generators/test_app_generator.rb~ +0 -14
- data/spec/internal/tmp/cache/assets/test/sprockets/059eceaa18e2eaee3d5168f3949f4957 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/093d898bf3f20b26b13c82714a77c040 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/10517c9579f8d23c82fb8caa66dca6a7 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/2bec18569db80effd80a2a19a038100b +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/4052820c15af72ba690230a0f92bd75e +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/421c89c58d3e76046a0294dae1f731ff +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/496a0d7dce1ff6bf4a9c3a089ea3a635 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/50b9db0b908b421a9b941a445dbaeacc +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/5155772cce704d83a64aa83eeda20c5a +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/528c628cf107f8be6dd122e1154344be +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/5ed02c7072bb024fa0832a1ca4113227 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/60141dc3d16c502963c3d798a099862d +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/6df5b5c0a8e6d87ced9504a460df875e +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/6eefd2765a716d66ff857cfcda69a119 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/88ded10f28177bec1bddb0d72d6b1cd2 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/8edfca9082e02111be92e79000667f22 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/90b54a819800edfa41b67722d1561040 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/9c653367feff82588eb6041d783a5809 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b1c03c36188b4f58f819510adb9a7e9c +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b35e12934e9f05662777579549e31cd7 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b42c247628daaf44109584724682a6ad +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/bb108ef3fc4c96d1c20cc41f97d943a0 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/c644ecad928e076f999e9c9a3bc350c9 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/c78dd20a0df27e9394a413bf2e4abf92 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d24a7c4b8ac71a90e809881a64970898 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/dbba4bbc32c17ade3d618c5d0baeb371 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/e8276b98892dcac8285a592bb63fe75b +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/e9f7ccc553ce1a217709cc7a08cfb032 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/eddae0741d973a8ab3df27c1ea5b635e +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f274b5f22db177b6464b50691d531688 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f45dfdb34e84d3c72a3319399a7316a3 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/faac2909046aa87e1f1f08b2bf0ad2b2 +0 -0
- data/spec/krikri_spec.rb~ +0 -30
- data/spec/ldp/active_triples_spec.rb~ +0 -15
- data/spec/ldp/at_resource_spec.rb~ +0 -41
- data/spec/ldp/nr_source_spec.rb~ +0 -3
- data/spec/ldp/rdf_source_spec.rb~ +0 -4
- data/spec/ldp/resource_spec.rb~ +0 -49
- data/spec/lib/krikri/enrichment_agent_spec.rb~ +0 -4
- data/spec/lib/krikri/enrichments/capitalize_spec.rb~ +0 -24
- data/spec/lib/krikri/enrichments/dedup_values_spec.rb~ +0 -10
- data/spec/lib/krikri/enrichments/deduplication_spec.rb~ +0 -5
- data/spec/lib/krikri/enrichments/genre_filter_spec.rb~ +0 -19
- data/spec/lib/krikri/enrichments/iso_enrich_spec.rb~ +0 -5
- data/spec/lib/krikri/enrichments/parse_date_spec.rb~ +0 -16
- data/spec/lib/krikri/enrichments/strip_ending_punctuation_spec.rb~ +0 -16
- data/spec/lib/krikri/enrichments/strip_leading_colons_spec.rb~ +0 -16
- data/spec/lib/krikri/enrichments/strip_leading_punctuation_spec.rb~ +0 -16
- data/spec/lib/krikri/enrichments/timespan_spec.rb~ +0 -10
- data/spec/lib/krikri/enrichments/timespan_split_spec.rb~ +0 -59
- data/spec/lib/krikri/harvesters/api_harvester_spec.rb~ +0 -47
- data/spec/lib/krikri/harvesters/basic_save_behavior_spec.rb~ +0 -12
- data/spec/lib/krikri/harvesters/file_harvester_spec.rb~ +0 -3
- data/spec/lib/krikri/harvesters/harvest_behavior_spec.rb~ +0 -5
- data/spec/lib/krikri/harvesters/mdl_api_harvester_spec.rb~ +0 -11
- data/spec/lib/krikri/harvesters/mdl_harvester_spec.rb~ +0 -8
- data/spec/lib/krikri/harvesters/oai_skip_deleted_behavior.rb~ +0 -7
- data/spec/lib/krikri/harvesters/oai_skip_deleted_behavior_spec.rb~ +0 -15
- data/spec/lib/krikri/id_service_spec.rb~ +0 -3
- data/spec/lib/krikri/index_service_spec.rb +0 -83
- data/spec/lib/krikri/job_spec.rb~ +0 -13
- data/spec/lib/krikri/mapper_agent_spec.rb~ +0 -64
- data/spec/lib/krikri/mapper_spec.rb~ +0 -5
- data/spec/lib/krikri/mapping_dsl/parser_methods_spec.rb~ +0 -65
- data/spec/lib/krikri/mapping_dsl/property_declaration_spec.rb~ +0 -87
- data/spec/lib/krikri/mapping_dsl/rdf_subjects_spec.rb~ +0 -16
- data/spec/lib/krikri/mapping_dsl_spec.rb~ +0 -10
- data/spec/lib/krikri/mapping_job.rb~ +0 -12
- data/spec/lib/krikri/mapping_job_spec.rb~ +0 -11
- data/spec/lib/krikri/mapping_spec.rb~ +0 -5
- data/spec/lib/krikri/md5_minter_spec.rb~ +0 -5
- data/spec/lib/krikri/parser_value_array.rb~ +0 -5
- data/spec/lib/krikri/parsers/json_parser_spec.rb~ +0 -17
- data/spec/lib/krikri/parsers/xml_parser_spec.rb~ +0 -21
- data/spec/lib/krikri/provenance_query_client.rb~ +0 -5
- data/spec/lib/krikri/provenance_query_client_spec.rb~ +0 -8
- data/spec/lib/krikri/util/edtf_converter_spec.rb~ +0 -17
- data/spec/lib/krikri/util/extended_date_parser_spec.rb~ +0 -102
- data/spec/lib/krikri/validation_report_list_spec.rb +0 -50
- data/spec/models/activity_spec.rb~ +0 -41
- data/spec/models/dpla/map/aggregation_spec.rb~ +0 -67
- data/spec/models/harvesters/oai_harvester_spec.rb~ +0 -15
- data/spec/models/mapper_spec.rb~ +0 -5
- data/spec/models/original_record_metadata_spec.rb~ +0 -5
- data/spec/models/original_record_spec.rb~ +0 -5
- data/spec/support/shared_contexts/mapping_dsl.rb~ +0 -12
- data/spec/support/shared_contexts/provenance_query_client.rb~ +0 -6
- data/spec/support/shared_examples/enrichment.rb~ +0 -5
- data/spec/support/shared_examples/harvest_behavior.rb~ +0 -13
- data/spec/support/shared_examples/job.rb~ +0 -20
- data/spec/support/shared_examples/ldp_resource.rb~ +0 -4
- data/spec/support/shared_examples/oai_parser_headers.rb~ +0 -12
- data/spec/support/shared_examples/rdf_source.rb~ +0 -1
- data/spec/support/shared_examples/software_agent.rb~ +0 -5
- data/spec/support/shared_examples/string_enrichment.rb~ +0 -12
- data/spec/test_app_templates/lib/generators/test_app_generator.rb~ +0 -14
- data/spec/webmocks/oai.rb~ +0 -13
@@ -0,0 +1,547 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'elasticsearch'
|
3
|
+
|
4
|
+
# Skip tests like those requiring an ElasticSearch connection by setting
|
5
|
+
# the enrironment variable CI=yes, such as
|
6
|
+
# $ CI=yes bundle exec rspec spec/lib/krikri/search_index_spec.rb
|
7
|
+
if ENV['CI'] == 'yes'
|
8
|
+
RSpec.configure do |c|
|
9
|
+
c.filter_run_excluding ci_skip: true
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe Krikri::SearchIndex do
|
14
|
+
describe '#bulk_update_batches' do
|
15
|
+
subject { described_class.new bulk_update_size: 2 }
|
16
|
+
let(:aggs) { ["JSON string"] * 3 }
|
17
|
+
it 'returns the right number of documents' do
|
18
|
+
all = subject.send(:bulk_update_batches, aggs)
|
19
|
+
doc_count = 0
|
20
|
+
batch_count = 0
|
21
|
+
all.each do |batch|
|
22
|
+
doc_count += batch.count
|
23
|
+
batch_count += 1
|
24
|
+
end
|
25
|
+
expect(doc_count).to eq 3
|
26
|
+
expect(batch_count).to eq 2
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
describe Krikri::QASearchIndex do
|
33
|
+
let(:solr) { RSolr.connect }
|
34
|
+
|
35
|
+
describe '#initialize' do
|
36
|
+
context 'with args' do
|
37
|
+
subject { described_class.new(opts) }
|
38
|
+
let(:opts) { { url: 'http://my-client-uri/' } }
|
39
|
+
|
40
|
+
it 'passes options to RSolr client' do
|
41
|
+
expect(subject.solr.uri.to_s).to eq opts[:url]
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'defaults to Krikri::Settings.solr' do
|
46
|
+
uri = 'http://moomin.org/'
|
47
|
+
allow(Krikri::Settings)
|
48
|
+
.to receive(:solr).and_return(url: uri)
|
49
|
+
expect(subject.solr.uri.to_s).to eq uri
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe '#solr_doc' do
|
54
|
+
context 'without models' do
|
55
|
+
before :each do
|
56
|
+
fake_schema_keys = ['a', 'b', 'c', 'b_c', 'b_d']
|
57
|
+
allow(subject).to receive(:schema_keys).and_return(fake_schema_keys)
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'converts JSON into Solr-compatible hash' do
|
61
|
+
orig = { 'a' => '1', 'b' => { 'c' => '2', 'd' => '3' } }
|
62
|
+
flat_hash = { 'a' => '1', 'b_c' => '2', 'b_d' => '3' }
|
63
|
+
expect(subject.solr_doc(orig)).to eq flat_hash
|
64
|
+
end
|
65
|
+
|
66
|
+
it 'converts JSON with multiple child nodes into Solr-compatible hash' do
|
67
|
+
json = { 'a' => '1',
|
68
|
+
'b' => [{ 'c' => '2', 'd' => '3' },
|
69
|
+
{ 'c' => '4', 'd' => '5' },
|
70
|
+
'abc'],
|
71
|
+
'c' => ['abc', 'def'] }
|
72
|
+
flat_hash = { 'a' => '1',
|
73
|
+
'b' => 'abc',
|
74
|
+
'b_c' => ['2', '4'],
|
75
|
+
'b_d' => ['3', '5'],
|
76
|
+
'c' => ['abc', 'def'] }
|
77
|
+
expect(subject.solr_doc(json)).to eq flat_hash
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
it 'removes special character strings from keys' do
|
82
|
+
json = {
|
83
|
+
'http://www.geonames.org/ontology#a' => '1',
|
84
|
+
'http://www.w3.org/2003/01/geo/wgs84_pos#b' => '2',
|
85
|
+
'@c' => '3'
|
86
|
+
}
|
87
|
+
flat_hash = { 'a' => '1', 'b' => '2', 'c' => '3' }
|
88
|
+
expect(subject.solr_doc(json)).to eq flat_hash
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'removes keys that are not in solr schema' do
|
92
|
+
json = { 'a' => '1', 'invalid_key' => '0' }
|
93
|
+
valid_hash = { 'a' => '1' }
|
94
|
+
expect(subject.solr_doc(json)).to eq valid_hash
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
context 'with models' do
|
99
|
+
let(:aggregation) { build(:aggregation) }
|
100
|
+
|
101
|
+
before do
|
102
|
+
subject.delete_by_query('id:*')
|
103
|
+
subject.commit
|
104
|
+
aggregation.set_subject!('http://api.dp.la/item/123')
|
105
|
+
aggregation.provider << build(:krikri_provider, rdf_subject: 'snork')
|
106
|
+
subject.add aggregation.to_jsonld['@graph'][0]
|
107
|
+
subject.commit
|
108
|
+
end
|
109
|
+
|
110
|
+
after do
|
111
|
+
subject.delete_by_query('id:*')
|
112
|
+
subject.commit
|
113
|
+
end
|
114
|
+
|
115
|
+
it 'posts DPLA MAP JSON to solr' do
|
116
|
+
response = solr.get('select', :params => { :q => '' })['response']
|
117
|
+
expect(response['numFound']).to eq 1
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
describe '#schema_keys' do
|
122
|
+
it 'returns an Array of keys' do
|
123
|
+
result = subject.schema_keys
|
124
|
+
expect(result).to be_a(Array)
|
125
|
+
expect(result).not_to be_empty
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end # #solr_doc
|
129
|
+
|
130
|
+
describe '#update_from_activity' do
|
131
|
+
include_context 'provenance queries'
|
132
|
+
include_context 'entities query'
|
133
|
+
|
134
|
+
# This is not totally realistic because we're indexing the records from a
|
135
|
+
# mapping activity, instead of an enrichment activity, but we can change
|
136
|
+
# that when we're able to enqueue an enrichment and have a valid agent
|
137
|
+
# class name stored in `activities`.`agent`.
|
138
|
+
# See the activities factory for generator_uri,
|
139
|
+
# spec/factories/krikri_activities.rb.
|
140
|
+
# See also spec/support/shared_contexts/generated_entities_query.rb, where
|
141
|
+
# the activity factories are run.
|
142
|
+
let(:activity) { Krikri::Activity.find_by_id(3) } # the mapping activity
|
143
|
+
# :generator_uri corresponds to the id of the :activity.
|
144
|
+
# See provenance_query_client.rb ('provenance queries' shared context)
|
145
|
+
let(:generator_uri) { 'http://localhost:8983/marmotta/ldp/activity/3' }
|
146
|
+
|
147
|
+
it 'updates records affected by an activity' do
|
148
|
+
expect do
|
149
|
+
subject.update_from_activity(activity)
|
150
|
+
end.to_not raise_error
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
|
156
|
+
describe Krikri::ProdSearchIndex do
|
157
|
+
let(:opts) { Krikri::Settings.elasticsearch.to_h }
|
158
|
+
subject { described_class.new(opts) }
|
159
|
+
|
160
|
+
context 'with arguments to #initialize' do
|
161
|
+
describe '#initialize' do
|
162
|
+
context 'with arguments' do
|
163
|
+
it 'passes options to the ElasticSearch client' do
|
164
|
+
expect(subject.elasticsearch.transport.options[:host])
|
165
|
+
.to eq 'localhost:9200' # per config/settings/test.yml
|
166
|
+
end
|
167
|
+
it 'sets its index name' do
|
168
|
+
expect(subject.index_name).to eq 'dpla_test' # as above
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
context 'with an ElasticSearch connection', ci_skip: true do
|
175
|
+
host = Krikri::Settings.elasticsearch.host
|
176
|
+
es = Elasticsearch::Client.new host: host
|
177
|
+
index_name = Krikri::Settings.elasticsearch.index_name
|
178
|
+
let(:aggregation) { build(:aggregation) }
|
179
|
+
before(:all) do
|
180
|
+
# create the index and set the schema
|
181
|
+
begin
|
182
|
+
es.indices.delete index: index_name
|
183
|
+
rescue
|
184
|
+
end
|
185
|
+
es.indices.create index: index_name,
|
186
|
+
body: {
|
187
|
+
settings: ELASTICSEARCH_SETTINGS,
|
188
|
+
mappings: ELASTICSEARCH_MAPPING
|
189
|
+
}
|
190
|
+
end
|
191
|
+
after(:all) do
|
192
|
+
# tear down the index
|
193
|
+
es.indices.delete index: index_name
|
194
|
+
end
|
195
|
+
|
196
|
+
describe '#update_from_activity' do
|
197
|
+
include_context 'provenance queries'
|
198
|
+
include_context 'entities query'
|
199
|
+
# See above re. :activity and :generator_uri
|
200
|
+
let(:activity) { Krikri::Activity.find_by_id(3) }
|
201
|
+
let(:generator_uri) { 'http://localhost:8983/marmotta/ldp/activity/3' }
|
202
|
+
|
203
|
+
it 'updates records affected by an activity' do
|
204
|
+
# TODO: remove this mock when
|
205
|
+
# Krikri::ProdSearchIndex#hash_for_index_schema is complete.
|
206
|
+
allow_any_instance_of(Krikri::ProdSearchIndex)
|
207
|
+
.to receive(:hash_for_index_schema)
|
208
|
+
.and_return(MAP3_JSON_HASH)
|
209
|
+
expect do
|
210
|
+
subject.update_from_activity(activity)
|
211
|
+
end.to_not raise_error
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
end
|
217
|
+
|
218
|
+
|
219
|
+
ELASTICSEARCH_SETTINGS = {
|
220
|
+
'analysis' => {
|
221
|
+
'analyzer' => {
|
222
|
+
'canonical_sort' => {
|
223
|
+
'type' => 'custom',
|
224
|
+
'tokenizer' => 'keyword',
|
225
|
+
'filter' => ['lowercase', 'pattern_replace'],
|
226
|
+
},
|
227
|
+
},
|
228
|
+
'filter' => {
|
229
|
+
'pattern_replace' => {
|
230
|
+
'type' => 'pattern_replace',
|
231
|
+
# any combination of layered leading non-alphanumerics and/or leading stopwords: a, an, the
|
232
|
+
'pattern' => '^([^a-z0-9]+|a\b|an\b|the\b)*',
|
233
|
+
'replacement' => '',
|
234
|
+
}
|
235
|
+
}
|
236
|
+
}
|
237
|
+
}
|
238
|
+
|
239
|
+
ELASTICSEARCH_MAPPING = {
|
240
|
+
'collection' => {
|
241
|
+
'date_detection' => false,
|
242
|
+
'properties' => {
|
243
|
+
'@id' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field' },
|
244
|
+
'admin' => {
|
245
|
+
'properties' => {
|
246
|
+
'valid_after_enrich' => { 'type' => 'boolean'},
|
247
|
+
'validation_message' => { 'enabled' => 'false'},
|
248
|
+
'ingestType' => { 'enabled' => false },
|
249
|
+
'ingestDate' => { 'type' => 'date' },
|
250
|
+
}
|
251
|
+
},
|
252
|
+
'description' => { 'type' => 'string' },
|
253
|
+
'id' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field' },
|
254
|
+
'title' => {
|
255
|
+
'type' => 'multi_field',
|
256
|
+
'fields' => {
|
257
|
+
'title' => { 'type' => 'string', 'sort' => 'multi_field' },
|
258
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
259
|
+
}
|
260
|
+
},
|
261
|
+
'ingestType' => { 'enabled' => false },
|
262
|
+
'ingestDate' => { 'enabled' => false },
|
263
|
+
'_rev' => { 'enabled' => false },
|
264
|
+
}
|
265
|
+
}, #/collection
|
266
|
+
'item' => {
|
267
|
+
'date_detection' => false,
|
268
|
+
'properties' => {
|
269
|
+
'@id' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field' },
|
270
|
+
'admin' => {
|
271
|
+
'properties' => {
|
272
|
+
'sourceResource' => { #shadow_sort fields
|
273
|
+
'properties' => {
|
274
|
+
'title' => { 'type' => 'string', 'analyzer' => 'canonical_sort', 'null_value' => 'zzzzzzzz' },
|
275
|
+
}
|
276
|
+
},
|
277
|
+
'valid_after_enrich' => { 'type' => 'boolean'},
|
278
|
+
'validation_message' => { 'enabled' => 'false'},
|
279
|
+
'ingestType' => { 'enabled' => false },
|
280
|
+
'ingestDate' => { 'type' => 'date' },
|
281
|
+
'contributingInstitution' => {
|
282
|
+
'type' => 'string',
|
283
|
+
'enabled' => false,
|
284
|
+
'include_in_all' => false,
|
285
|
+
'compound_fields' => ['dataProvider.not_analyzed','intermediateProvider.not_analyzed'],
|
286
|
+
'facet' => true
|
287
|
+
}
|
288
|
+
}
|
289
|
+
},
|
290
|
+
'id' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field' },
|
291
|
+
'sourceResource' => {
|
292
|
+
'properties' => {
|
293
|
+
'identifier' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field' },
|
294
|
+
'collection' => {
|
295
|
+
'properties' => {
|
296
|
+
'@id' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
297
|
+
'id' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
298
|
+
'description' => { 'type' => 'string' },
|
299
|
+
'title' => {
|
300
|
+
'type' => 'multi_field',
|
301
|
+
'fields' => {
|
302
|
+
'title' => { 'type' => 'string', 'sort' => 'multi_field' },
|
303
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
304
|
+
}
|
305
|
+
}
|
306
|
+
}
|
307
|
+
},
|
308
|
+
'contributor' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
309
|
+
'creator' => { 'type' => 'string' },
|
310
|
+
'date' => {
|
311
|
+
'properties' => {
|
312
|
+
'displayDate' => { 'type' => 'string', 'index' => 'not_analyzed'},
|
313
|
+
'begin' => {
|
314
|
+
'type' => 'multi_field',
|
315
|
+
'fields' => {
|
316
|
+
'begin' => { 'type' => 'date', 'sort' => 'multi_field', 'null_value' => '-9999' },
|
317
|
+
'not_analyzed' => { 'type' => 'date', 'sort' => 'field', 'facet' => true }
|
318
|
+
}
|
319
|
+
},
|
320
|
+
'end' => {
|
321
|
+
'type' => 'multi_field',
|
322
|
+
'fields' => {
|
323
|
+
'end' => { 'type' => 'date', 'sort' => 'multi_field', 'null_value' => '9999' },
|
324
|
+
'not_analyzed' => { 'type' => 'date', 'sort' => 'field', 'facet' => true }
|
325
|
+
}
|
326
|
+
}
|
327
|
+
}
|
328
|
+
},
|
329
|
+
'description' => { 'type' => 'string' },
|
330
|
+
'extent' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field' },
|
331
|
+
'isPartOf' => { 'enabled' => false },
|
332
|
+
'language' => {
|
333
|
+
'properties' => {
|
334
|
+
'name' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
335
|
+
'iso639' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true }
|
336
|
+
}
|
337
|
+
},
|
338
|
+
'format' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
339
|
+
'publisher' => {
|
340
|
+
'type' => 'multi_field',
|
341
|
+
'fields' => {
|
342
|
+
'publisher' => { 'type' => 'string' },
|
343
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'facet' => true }
|
344
|
+
}
|
345
|
+
},
|
346
|
+
'rights' => { 'type' => 'string' },
|
347
|
+
'relation' => { 'type' => 'string' },
|
348
|
+
'spatial' => {
|
349
|
+
'properties' => {
|
350
|
+
'name' => {
|
351
|
+
'type' => 'multi_field',
|
352
|
+
'fields' => {
|
353
|
+
'name' => { 'type' => 'string', 'sort' => 'multi_field' },
|
354
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
355
|
+
}
|
356
|
+
},
|
357
|
+
'country' => {
|
358
|
+
'type' => 'multi_field',
|
359
|
+
'fields' => {
|
360
|
+
'country' => { 'type' => 'string', 'sort' => 'multi_field' },
|
361
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
362
|
+
}
|
363
|
+
},
|
364
|
+
'region' => {
|
365
|
+
'type' => 'multi_field',
|
366
|
+
'fields' => {
|
367
|
+
'region' => { 'type' => 'string', 'sort' => 'multi_field' },
|
368
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
369
|
+
}
|
370
|
+
},
|
371
|
+
'county' => {
|
372
|
+
'type' => 'multi_field',
|
373
|
+
'fields' => {
|
374
|
+
'county' => { 'type' => 'string', 'sort' => 'multi_field' },
|
375
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
376
|
+
}
|
377
|
+
},
|
378
|
+
'state' => {
|
379
|
+
'type' => 'multi_field',
|
380
|
+
'fields' => {
|
381
|
+
'state' => { 'type' => 'string', 'sort' => 'multi_field' },
|
382
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
383
|
+
}
|
384
|
+
},
|
385
|
+
'city' => {
|
386
|
+
'type' => 'multi_field',
|
387
|
+
'fields' => {
|
388
|
+
'city' => { 'type' => 'string', 'sort' => 'multi_field' },
|
389
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
390
|
+
}
|
391
|
+
},
|
392
|
+
'iso3166-2' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
393
|
+
'coordinates' => { 'type' => 'geo_point', 'index' => 'not_analyzed', 'sort' => 'geo_distance', 'facet' => true }
|
394
|
+
}
|
395
|
+
},
|
396
|
+
'specType' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
397
|
+
'stateLocatedIn' => {
|
398
|
+
'properties' => {
|
399
|
+
'name' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
400
|
+
'iso3166-2' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true }
|
401
|
+
}
|
402
|
+
},
|
403
|
+
'subject' => {
|
404
|
+
'properties' => {
|
405
|
+
'@id' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
406
|
+
'@type' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field' },
|
407
|
+
'name' => {
|
408
|
+
'type' => 'multi_field',
|
409
|
+
'fields' => {
|
410
|
+
'name' => { 'type' => 'string', 'sort' => 'multi_field' },
|
411
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
412
|
+
}
|
413
|
+
}
|
414
|
+
}
|
415
|
+
},
|
416
|
+
'temporal' => {
|
417
|
+
'properties' => {
|
418
|
+
'begin' => {
|
419
|
+
'type' => 'multi_field',
|
420
|
+
'fields' => {
|
421
|
+
'begin' => { 'type' => 'date', 'sort' => 'multi_field', 'null_value' => '-9999' },
|
422
|
+
'not_analyzed' => { 'type' => 'date', 'sort' => 'field', 'facet' => true }
|
423
|
+
}
|
424
|
+
},
|
425
|
+
'end' => {
|
426
|
+
'type' => 'multi_field',
|
427
|
+
'fields' => {
|
428
|
+
'end' => { 'type' => 'date', 'sort' => 'multi_field', 'null_value' => '9999' },
|
429
|
+
'not_analyzed' => { 'type' => 'date', 'sort' => 'field', 'facet' => true }
|
430
|
+
}
|
431
|
+
}
|
432
|
+
|
433
|
+
}
|
434
|
+
},
|
435
|
+
'title' => { 'type' => 'string', 'sort' => 'shadow' },
|
436
|
+
'type' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
437
|
+
}
|
438
|
+
}, #/sourceResource
|
439
|
+
'dataProvider' => {
|
440
|
+
'type' => 'multi_field',
|
441
|
+
'fields' => {
|
442
|
+
'dataProvider' => { 'type' => 'string', 'sort' => 'multi_field' },
|
443
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
444
|
+
}
|
445
|
+
},
|
446
|
+
'hasView' => {
|
447
|
+
'properties' => {
|
448
|
+
'@id' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
449
|
+
'format' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true },
|
450
|
+
'rights' => { 'type' => 'string', 'index' => 'not_analyzed' },
|
451
|
+
'edmRights' => {
|
452
|
+
'type' => 'multi_field',
|
453
|
+
'fields' => {
|
454
|
+
'edmRights' => { 'type' => 'string', 'sort' => 'multi_field' },
|
455
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
456
|
+
}
|
457
|
+
}
|
458
|
+
}
|
459
|
+
},
|
460
|
+
'intermediateProvider' => {
|
461
|
+
'type' => 'multi_field',
|
462
|
+
'fields' => {
|
463
|
+
'intermediateProvider' => { 'type' => 'string', 'sort' => 'multi_field' },
|
464
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
465
|
+
}
|
466
|
+
},
|
467
|
+
'isPartOf' => {
|
468
|
+
'properties' => {
|
469
|
+
'@id' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
470
|
+
'name' => {
|
471
|
+
'type' => 'multi_field',
|
472
|
+
'fields' => {
|
473
|
+
'name' => { 'type' => 'string', 'sort' => 'multi_field' },
|
474
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
475
|
+
}
|
476
|
+
}
|
477
|
+
}
|
478
|
+
},
|
479
|
+
'isShownAt' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field' },
|
480
|
+
'object' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field' },
|
481
|
+
'provider' => {
|
482
|
+
'properties' => {
|
483
|
+
'@id' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'field', 'facet' => true },
|
484
|
+
'name' => {
|
485
|
+
'type' => 'multi_field',
|
486
|
+
'fields' => {
|
487
|
+
'name' => { 'type' => 'string', 'sort' => 'multi_field' },
|
488
|
+
'not_analyzed' => { 'type' => 'string', 'index' => 'not_analyzed', 'sort' => 'script', 'facet' => true }
|
489
|
+
}
|
490
|
+
}
|
491
|
+
}
|
492
|
+
},
|
493
|
+
'rights' => { 'type' => 'string' },
|
494
|
+
'@context' => { 'type' => 'object', 'enabled' => false },
|
495
|
+
'originalRecord' => { 'type' => 'object', 'enabled' => false },
|
496
|
+
'ingestType' => { 'enabled' => false },
|
497
|
+
'ingestDate' => { 'enabled' => false },
|
498
|
+
'_rev' => { 'enabled' => false },
|
499
|
+
}
|
500
|
+
} #/item
|
501
|
+
}.freeze
|
502
|
+
|
503
|
+
|
504
|
+
MAP3_JSON_HASH = {
|
505
|
+
:id=>"116d5aaf3d77a5d7c5a6c7a3e10c5afe",
|
506
|
+
:@id=>"http://dp.la/api/items/116d5aaf3d77a5d7c5a6c7a3e10c5afe",
|
507
|
+
:ingestType=>"item",
|
508
|
+
:isShownAt=>"http://digitalcollections.nypl.org/items/510d47e3-57d2-a3d9-e040-e00a18064a99",
|
509
|
+
:provider=>{
|
510
|
+
:name=>"The New York Public Library",
|
511
|
+
:@id=>"http://dp.la/api/contributor/nypl"
|
512
|
+
},
|
513
|
+
:ingestionSequence=>13,
|
514
|
+
:@type=>"ore:Aggregation",
|
515
|
+
:_id=>"nypl--510d47e3-57d2-a3d9-e040-e00a18064a99",
|
516
|
+
:@context=>"http://dp.la/api/items/context",
|
517
|
+
:dataProvider=>"Manuscripts and Archives Division. The New York Public Library",
|
518
|
+
:admin=>{
|
519
|
+
:validation_message=>nil,
|
520
|
+
:valid_after_enrich=>true,
|
521
|
+
:object_status=>1
|
522
|
+
},
|
523
|
+
:sourceResource=>{
|
524
|
+
:subject=>[{:name=>"Lesbians"}, {:name=>"Gay activists"}],
|
525
|
+
:type=>"image",
|
526
|
+
:title=>"Stonewall Inn [2]",
|
527
|
+
:description=>"Window of the Stonewall Bar N.Y. 1969. The other half of the graffiti was erased by the time Diana photographed it.",
|
528
|
+
:rights=>"The New York Public Library is interested in learning more about items you've seen on our websites or elsewhere online. If you have any more information about an item or its copyright status, we want to hear from you. Please contact DigitalCollections@nypl.org with your contact information and a link to the relevant content.",
|
529
|
+
:@id=>"http://dp.la/api/items/116d5aaf3d77a5d7c5a6c7a3e10c5afe#sourceResource",
|
530
|
+
:creator=>["Davies, Diana (1938-)"],
|
531
|
+
:collection=>{
|
532
|
+
:title=>"Greenwich Village, New York City, 1969 September",
|
533
|
+
:id=>"d0729324dd20555729dd5c9ba07e401d",
|
534
|
+
:@id=>"http://dp.la/api/collections/d0729324dd20555729dd5c9ba07e401d"
|
535
|
+
},
|
536
|
+
:date=>{
|
537
|
+
:displayDate=>"1969-1969",
|
538
|
+
:end=>"1969",
|
539
|
+
:begin=>"1969"
|
540
|
+
},
|
541
|
+
:relation=>"Greenwich Village, New York City, 1969 September",
|
542
|
+
:stateLocatedIn=>[{:name=>"New York"}]
|
543
|
+
},
|
544
|
+
:object=>"http://images.nypl.org/index.php?id=1582254&t=t",
|
545
|
+
:aggregatedCHO=>"#sourceResource",
|
546
|
+
:ingestDate=>"2014-09-05T17:57:00.302842Z"
|
547
|
+
}
|
@@ -147,4 +147,23 @@ describe Krikri::Activity, type: :model do
|
|
147
147
|
end
|
148
148
|
end
|
149
149
|
end
|
150
|
+
|
151
|
+
|
152
|
+
describe '#entity_uris' do
|
153
|
+
include_context 'provenance queries'
|
154
|
+
include_context 'entities query'
|
155
|
+
# See spec/factories/krikri_activities.rb
|
156
|
+
# generator_uri is the URI of the harvest activity
|
157
|
+
# generator_uri matches what Krikri::Activity will construct as the
|
158
|
+
# uri, given its value of #rdf_subject, in #aggregations_as_json
|
159
|
+
# See 'provenance queries' shared context.
|
160
|
+
let(:generator_uri) { subject.rdf_subject }
|
161
|
+
|
162
|
+
it 'enumerates generated entity URIs' do
|
163
|
+
# 'result uri' is what the mocked query solution's record should contain.
|
164
|
+
expect(subject.entity_uris.first).to match 'result uri'
|
165
|
+
end
|
166
|
+
|
167
|
+
end
|
168
|
+
|
150
169
|
end
|