krikri 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/krikri/_qa_report_list.html.erb~ +10 -0
- data/app/controllers/krikri/concerns/provider_context.rb~ +7 -0
- data/app/controllers/krikri/qa_reports_controller.rb~ +18 -0
- data/app/models/krikri/original_record_desc.rb~ +6 -0
- data/app/models/krikri/original_record_metadata.rb~ +9 -0
- data/app/models/krikri/parser.rb~ +5 -0
- data/app/models/krikri/parsers/xml_parser.rb~ +5 -0
- data/app/models/krikri/qa_report.rb~ +7 -0
- data/app/views/krikri/qa_reports/index.html.erb~ +3 -0
- data/app/views/krikri/qa_reports/show.html.erb~ +1 -0
- data/config/initializers/config.rb~ +19 -0
- data/config/settings/test.yml~ +3 -0
- data/db/migrate/20150328035550_add_qa_report.rb~ +11 -0
- data/lib/krikri/ldp/container.rb~ +22 -0
- data/lib/krikri/ldp/nr_source.rb~ +4 -0
- data/lib/krikri/ldp/rdf_source.rb~ +24 -0
- data/lib/krikri/ldp/resource.rb~ +49 -0
- data/lib/krikri/map_crosswalk.rb +1 -1
- data/lib/krikri/parsers/json_parser.rb~ +17 -0
- data/lib/krikri/parsers/oai_headers.rb~ +4 -0
- data/lib/krikri/parsers/oai_parser.rb~ +2 -0
- data/lib/krikri/parsers/oai_parser_headers.rb~ +4 -0
- data/lib/krikri/parsers/xml_parser.rb~ +61 -0
- data/lib/krikri/util/edtf_converter.rb~ +26 -0
- data/lib/krikri/util/extended_date_parser.rb~ +70 -0
- data/lib/krikri/version.rb +1 -1
- data/lib/tasks/jetty.rake~ +12 -0
- data/lib/tasks/krikri.rake~ +20 -0
- data/spec/controllers/application_controller_spec.rb~ +11 -0
- data/spec/controllers/qa_reports_controller_spec.rb~ +15 -0
- data/spec/controllers/records_controller_spec.rb~ +11 -0
- data/spec/controllers/reports_controller_spec.rb~ +6 -0
- data/spec/controllers/validation_reports_controller_spec.rb~ +15 -0
- data/spec/factories/krikri_original_record.rb~ +5 -0
- data/spec/factories/krikri_provider.rb~ +7 -0
- data/spec/factories/krikri_provider_spec.rb~ +7 -0
- data/spec/factories/krikri_qa_report.rb~ +8 -0
- data/spec/helpers/krikri/application_helper_spec.rb~ +16 -0
- data/spec/internal/Gemfile +2 -3
- data/spec/internal/Gemfile.lock +120 -143
- 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/{20150812153900_devise_create_users.rb → 20151222175607_devise_create_users.rb} +0 -0
- data/spec/internal/db/migrate/{20150812153941_create_searches.blacklight.rb → 20151222175629_create_searches.blacklight.rb} +0 -0
- data/spec/internal/db/migrate/{20150812153942_create_bookmarks.blacklight.rb → 20151222175630_create_bookmarks.blacklight.rb} +0 -0
- data/spec/internal/db/migrate/{20150812153943_add_polymorphic_type_to_bookmarks.blacklight.rb → 20151222175631_add_polymorphic_type_to_bookmarks.blacklight.rb} +0 -0
- data/spec/internal/db/schema.rb +1 -1
- data/spec/internal/db/test.sqlite3 +0 -0
- data/spec/internal/db/test.sqlite3-journal +0 -0
- data/spec/internal/lib/generators/test_app_generator.rb~ +14 -0
- data/spec/internal/log/development.log +93 -93
- data/spec/internal/log/test.log +4313 -6427
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_alerts.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_background-variant.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_border-radius.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_buttons.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_center-block.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_clearfix.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_forms.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_gradients.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_grid-framework.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_grid.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_hide-text.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_image.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_labels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_list-group.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_nav-divider.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_nav-vertical-align.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_opacity.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_pagination.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_panels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_progress-bar.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_reset-filter.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_resize.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_responsive-visibility.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_size.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_tab-focus.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_table-row.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_text-emphasis.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_text-overflow.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{622890f0980fe8cd9e30bdaab5a7914245d2443e → 4a3ee647961c7e45976eb2c0a94406aad3427b3d}/_vendor-prefixes.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{0f463fae8ec59cbdc602859dac6f3131b47588e5 → 93e201cf4a11978a1f491a057a3bd569c3825210}/blacklight.css.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_alerts.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_badges.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_breadcrumbs.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_button-groups.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_buttons.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_carousel.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_close.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_code.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_component-animations.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_dropdowns.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_forms.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_glyphicons.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_grid.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_input-groups.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_jumbotron.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_labels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_list-group.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_media.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_mixins.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_modals.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_navbar.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_navs.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_normalize.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_pager.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_pagination.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_panels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_popovers.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_print.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_progress-bars.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_responsive-embed.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_responsive-utilities.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_scaffolding.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_tables.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_thumbnails.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_tooltip.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_type.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_utilities.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_variables.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{93f97edda53560c38d0d029e30e3b3a93212c1b8 → a1ec1bb9c9cafeb054d542e861ebc8ffd5904439}/_wells.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{c50f52d2eeadabb7c9bfad3246524fac09113575 → b28605b1c659cf09fc72f3c1fff32918869d28b8}/_bootstrap-sprockets.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{c50f52d2eeadabb7c9bfad3246524fac09113575 → b28605b1c659cf09fc72f3c1fff32918869d28b8}/_bootstrap.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{80ea3b25063dd984130d99a1c4278f3cd1b013f1 → ca8c12d03785e0d6cd4554f4d3939e7836d38282}/_blacklight_base.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/{80ea3b25063dd984130d99a1c4278f3cd1b013f1 → ca8c12d03785e0d6cd4554f4d3939e7836d38282}/blacklight.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/4052820c15af72ba690230a0f92bd75e +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/528c628cf107f8be6dd122e1154344be +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/b35e12934e9f05662777579549e31cd7 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/bb108ef3fc4c96d1c20cc41f97d943a0 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/dbba4bbc32c17ade3d618c5d0baeb371 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/e9f7ccc553ce1a217709cc7a08cfb032 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f274b5f22db177b6464b50691d531688 +0 -0
- data/spec/krikri_spec.rb~ +30 -0
- data/spec/ldp/active_triples_spec.rb~ +15 -0
- data/spec/ldp/at_resource_spec.rb~ +41 -0
- data/spec/ldp/nr_source_spec.rb~ +3 -0
- data/spec/ldp/rdf_source_spec.rb~ +4 -0
- data/spec/ldp/resource_spec.rb~ +49 -0
- data/spec/lib/krikri/enrichment_agent_spec.rb~ +4 -0
- data/spec/lib/krikri/harvesters/api_harvester_spec.rb~ +47 -0
- data/spec/lib/krikri/harvesters/basic_save_behavior_spec.rb~ +12 -0
- data/spec/lib/krikri/harvesters/file_harvester_spec.rb~ +3 -0
- data/spec/lib/krikri/harvesters/harvest_behavior_spec.rb~ +5 -0
- data/spec/lib/krikri/harvesters/mdl_api_harvester_spec.rb~ +11 -0
- data/spec/lib/krikri/harvesters/mdl_harvester_spec.rb~ +8 -0
- data/spec/lib/krikri/harvesters/oai_skip_deleted_behavior.rb~ +7 -0
- data/spec/lib/krikri/harvesters/oai_skip_deleted_behavior_spec.rb~ +15 -0
- data/spec/lib/krikri/id_service_spec.rb~ +3 -0
- data/spec/lib/krikri/job_spec.rb~ +13 -0
- data/spec/lib/krikri/map_crosswalk_spec.rb +23 -0
- data/spec/lib/krikri/map_crosswalk_spec.rb~ +5 -0
- data/spec/lib/krikri/mapper_agent_spec.rb~ +64 -0
- data/spec/lib/krikri/mapper_spec.rb~ +5 -0
- data/spec/lib/krikri/mapping_dsl/parser_methods_spec.rb~ +65 -0
- data/spec/lib/krikri/mapping_dsl/property_declaration_spec.rb~ +87 -0
- data/spec/lib/krikri/mapping_dsl/rdf_subjects_spec.rb~ +16 -0
- data/spec/lib/krikri/mapping_dsl_spec.rb~ +10 -0
- data/spec/lib/krikri/mapping_job.rb~ +12 -0
- data/spec/lib/krikri/mapping_job_spec.rb~ +11 -0
- data/spec/lib/krikri/mapping_spec.rb~ +5 -0
- data/spec/lib/krikri/md5_minter_spec.rb~ +5 -0
- data/spec/lib/krikri/parser_value_array.rb~ +5 -0
- data/spec/lib/krikri/parsers/json_parser_spec.rb~ +17 -0
- data/spec/lib/krikri/parsers/xml_parser_spec.rb~ +21 -0
- data/spec/lib/krikri/provenance_query_client.rb~ +5 -0
- data/spec/lib/krikri/provenance_query_client_spec.rb~ +8 -0
- data/spec/lib/krikri/qa_query_client_spec.rb~ +9 -0
- data/spec/lib/krikri/random_search_index_docmument_builder_spec.rb~ +6 -0
- data/spec/lib/krikri/util/edtf_converter_spec.rb~ +17 -0
- data/spec/lib/krikri/util/extended_date_parser_spec.rb~ +102 -0
- data/spec/models/activity_spec.rb~ +41 -0
- data/spec/models/dpla/map/aggregation_spec.rb~ +67 -0
- data/spec/models/harvesters/oai_harvester_spec.rb~ +15 -0
- data/spec/models/mapper_spec.rb~ +5 -0
- data/spec/models/original_record_metadata_spec.rb~ +5 -0
- data/spec/models/original_record_spec.rb~ +5 -0
- data/spec/models/provider_spec.rb~ +33 -0
- data/spec/models/qa_report_spec.rb~ +64 -0
- data/spec/models/validation_report_spec.rb~ +15 -0
- data/spec/support/shared_contexts/indexed_item.rb~ +15 -0
- data/spec/support/shared_contexts/mapping_dsl.rb~ +12 -0
- data/spec/support/shared_contexts/provenance_query_client.rb~ +6 -0
- data/spec/support/shared_contexts/rake.rb~ +21 -0
- data/spec/support/shared_examples/enrichment.rb~ +5 -0
- data/spec/support/shared_examples/harvest_behavior.rb~ +13 -0
- data/spec/support/shared_examples/job.rb~ +20 -0
- data/spec/support/shared_examples/ldp_resource.rb~ +4 -0
- data/spec/support/shared_examples/oai_parser_headers.rb~ +12 -0
- data/spec/support/shared_examples/rdf_source.rb~ +1 -0
- data/spec/support/shared_examples/software_agent.rb~ +5 -0
- data/spec/support/shared_examples/string_enrichment.rb~ +12 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb~ +14 -0
- data/spec/views/krikri/providers/index.html.erb_spec.rb~ +3 -0
- data/spec/views/krikri/providers/show.html.erb.spec~ +12 -0
- data/spec/views/krikri/providers/show.html.erb_spec.rb~ +10 -0
- data/spec/views/krikri/qa_reports/index.html.erb_spec.rb~ +17 -0
- data/spec/views/krikri/qa_reports/show.html.erb_spec.rb~ +22 -0
- data/spec/views/krikri/records/index.html.erb_spec.rb~ +15 -0
- data/spec/views/krikri/records/show.html.erb_spec.rb~ +8 -0
- data/spec/views/krikri/reports/index.html.erb_spec.rb~ +5 -0
- data/spec/webmocks/oai.rb~ +13 -0
- metadata +516 -458
- data/spec/internal/tmp/cache/318/301/krikri%2Fapplication_helper%2Favailable_providers +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/80ea3b25063dd984130d99a1c4278f3cd1b013f1/_bookmark.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/80ea3b25063dd984130d99a1c4278f3cd1b013f1/_catalog.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/80ea3b25063dd984130d99a1c4278f3cd1b013f1/_facets.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/80ea3b25063dd984130d99a1c4278f3cd1b013f1/_group.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/80ea3b25063dd984130d99a1c4278f3cd1b013f1/_header.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/80ea3b25063dd984130d99a1c4278f3cd1b013f1/_layout.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/80ea3b25063dd984130d99a1c4278f3cd1b013f1/_modal.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/80ea3b25063dd984130d99a1c4278f3cd1b013f1/_search_history.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/80ea3b25063dd984130d99a1c4278f3cd1b013f1/blacklight_defaults.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/0a25eb99290a6b015dfe4c29d8585cec +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/0b3eca32a0c1d368e88a01be94ca7f6b +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/0fe9919db7899ede10068d0d9d3adfa8 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/1153a153512ddd535004623e0bbdc1c4 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/142790b68ce01969e4bbdd1d2a90b18c +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/154af7ce6de6c616d3c1c654904a88de +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/1a6f0128e8b6cc52594e7e16506dd476 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/30183a6c313ab79c8ffc2711dc633ea5 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/3290971c05649c7d11051df70b2fefbb +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/35c0cb4e1848557e53960891cf2bbc4c +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/3822d8965af2c63a9d8eb5be7d54a39e +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/39191bda3ba14fb0d5671ef5320e9e01 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/3a1636e712ea5450451f140a1e11ad6b +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/3af50e8108914b16e8005270444c23eb +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/3be5d7c0f4c216492f0aa28be003d004 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/43549442460e63625bfa01b300845db4 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/4aca32864569722d64f0355ab5dc65bb +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/4b2cab71b255f0bf4e45a6e317974ed0 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/4ffa695d373f85c9375cfeef7a7fa7b0 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/55c96cfe875a998dd83f861cec024cd8 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/5884f169a3cb492a556b12cf26d98512 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/5b4c0893fb6462116b5c893ee5067a7a +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/5ed91405d3e1d9c4d64964b23e2ddad5 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/5ee4ec5587fe5e6b2489c6df8444c3a3 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/66bc87f66d912cc874b361b58b063232 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/6a7000430a188e026e888de506892486 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/6e51639f97de2a9999b40c947cc2cce4 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/70678ea30b446b6e43c58cb504a38c5e +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/736b38c683d67eae78becf8bd03ccc03 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/74b2a1c32eb911fede6dbf691e2438fd +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/769e239a980f02fb5f0d31f2e47661b6 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/7ed2a89adfb413f382b9844cb60e004f +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/86aa4bb34763ef2ec398ce2948064feb +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/8e0a985f6d848652e6e2b69502089957 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/8e24ef751a813d86a3a2953ce9f31b1b +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/92440cff8e26faca6421a88212bf5cc5 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/93aaa9231a32901266b05632f3d35ecd +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/9aa82f96c9760fb5b052b29dfead27ee +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/9e3583b4a24bbae71c81cc89b31cf681 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/ad4a54c43c2a4c3874bfde1c9f08c248 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/addcc05c958d32994bbcc4df6b13c80a +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b6fcc8843d7d36abc9183de7f3c09fdd +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b783bb7bbb5960da9c2720974804b177 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/c94aa024045ec61aa3ce4de5c0ca7515 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d04cedd870a36cb0ac8ad65bf032c556 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d0ae540226d860c35ce84f64c67f40bb +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d0d4fb263d72afa8341801f74e58939e +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d54a9568f2db6442d0be17210a6d683e +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d89eec758f13f7959ed8796e9b52469c +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/da16a797f7553f717a002525bea10cbf +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/da4e9efddf7d52d8de0c75b2f3ad571e +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/dec30531a16449cd84734053a70b3a77 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f429314ed6a6b2b42d3141578c4ec023 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f5e21f9266ec8eafa27c52d109a9a498 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f642847460097a56a55c8716c4d7a072 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f69f1290f72a81d63fb93e81ff44f8a1 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f6dee0958594a314ea8f9a82a48c2a45 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f8e9e8fcc081081c00dd69903ebcf709 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f8fd1a8d086eb31f0df8de2ac3ab4517 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/fe00102a3b27990f149d71a23f06e32a +0 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Krikri::Util::EDTFConverter do
|
4
|
+
describe '#decade_s' do
|
5
|
+
it 'parses date' do
|
6
|
+
expect(subject.decade_s('1990s'))
|
7
|
+
.to eq Date.edtf('199x')
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
describe '#decade_hyphen' do
|
12
|
+
it 'parses date' do
|
13
|
+
expect(subject.decade_hyphen('199-'))
|
14
|
+
.to eq Date.edtf('199x')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Krikri::Util::ExtendedDateParser do
|
4
|
+
subject { described_class }
|
5
|
+
|
6
|
+
date_forms = [ '1992',
|
7
|
+
'1992-01-01',
|
8
|
+
'1992-01',
|
9
|
+
'01-1992',
|
10
|
+
'01-01-1992',
|
11
|
+
'01/01/1992',
|
12
|
+
# '01/01/199u', # this isn't valid EDTF and returns a bad date
|
13
|
+
# '1992-11-uu?', # ETDF.rb doesn't support uu~
|
14
|
+
'1992-11-12?',
|
15
|
+
# '1992-11-uu~', # ETDF.rb doesn't support uu?
|
16
|
+
'1992-11-12~',
|
17
|
+
'1992.11.12',
|
18
|
+
'1992?',
|
19
|
+
'199x',
|
20
|
+
'1990s',
|
21
|
+
'199-',
|
22
|
+
'Jun 1992', # currently returns only June 1
|
23
|
+
'Jun 10 1992',
|
24
|
+
'Jun 10, 1992'
|
25
|
+
]
|
26
|
+
|
27
|
+
ranges = [ '-', 'to' 'until', '.', '......', 'from', '/']
|
28
|
+
|
29
|
+
describe '#parse' do
|
30
|
+
end
|
31
|
+
|
32
|
+
describe '#range_match' do
|
33
|
+
end
|
34
|
+
|
35
|
+
describe '#partial_edtf' do
|
36
|
+
context 'with YYYY-MM-DD/DD' do
|
37
|
+
let(:start_date) { Date.new(2014,1,27) }
|
38
|
+
let(:end_date) { Date.new(2014,1,28) }
|
39
|
+
|
40
|
+
it 'parses date' do
|
41
|
+
expect(subject.partial_edtf('2014-01-27/28'))
|
42
|
+
.to have_attributes(:from => start_date,:to => end_date)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'gives nil for invalid date' do
|
46
|
+
expect(subject.partial_edtf('2014-01-98/28')).to eq nil
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context 'with YYYY-MM/MM' do
|
51
|
+
let(:start_date) { Date.new(2014,1,1) }
|
52
|
+
let(:end_date) { Date.new(2014,3,1) }
|
53
|
+
|
54
|
+
it 'parses date' do
|
55
|
+
expect(subject.partial_edtf('2014-01/03'))
|
56
|
+
.to have_attributes(:from => start_date,:to => end_date)
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'gives nil for invalid date' do
|
60
|
+
expect(subject.partial_edtf('2014-33/03')).to eq nil
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe '#month_year' do
|
66
|
+
let(:date) { Date.new(2014,2,1) }
|
67
|
+
|
68
|
+
it 'parses date' do
|
69
|
+
expect(subject.month_year('02-2014'))
|
70
|
+
.to eql date
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'parses date' do
|
74
|
+
expect(subject.month_year('02-2014').precision)
|
75
|
+
.to eq :month
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
describe '#hyphenated_partial_range' do
|
80
|
+
let(:start_date) { Date.new(2013,1,1) }
|
81
|
+
let(:end_date) { Date.new(2014,1,1) }
|
82
|
+
|
83
|
+
it 'parses date' do
|
84
|
+
expect(subject.hyphenated_partial_range('2013-14'))
|
85
|
+
.to have_attributes(:from => start_date,:to => end_date)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe '#decade_s' do
|
90
|
+
it 'parses date' do
|
91
|
+
expect(subject.decade_s('1990s'))
|
92
|
+
.to eq Date.edtf('199x')
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
describe '#decade_hyphen' do
|
97
|
+
it 'parses date' do
|
98
|
+
expect(subject.decade_hyphen('199-'))
|
99
|
+
.to eq Date.edtf('199x')
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Krikri::Activity do
|
4
|
+
|
5
|
+
subject { described_class.new(agent_class.new) }
|
6
|
+
let(:agent_class) { Class.new { extend Krikri::SoftwareAgent } }
|
7
|
+
|
8
|
+
describe '#agent' do
|
9
|
+
it 'has an agent' do
|
10
|
+
expect(subject.agent).to be_a agent_class
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe '#start_time' do
|
15
|
+
before do
|
16
|
+
subject.set_start_time
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'marks start time' do
|
20
|
+
expect(subject.start_time).to be_a DateTime
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe 'end_time' do
|
25
|
+
it 'raises an error if not started' do
|
26
|
+
expect { subject.set_end_time }.to raise_error
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'with start time' do
|
30
|
+
before do
|
31
|
+
subject.set_start_time
|
32
|
+
subject.set_end_time
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'marks end time' do
|
36
|
+
subject.set_start_time
|
37
|
+
expect(subject.end_time).to be_a DateTime
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe DPLA::MAP::Aggregation do
|
4
|
+
it_behaves_like 'an LDP RDFSource'
|
5
|
+
|
6
|
+
include_context 'clear repository'
|
7
|
+
|
8
|
+
describe '#mint_uri!' do
|
9
|
+
shared_examples 'sets to seed' do
|
10
|
+
it 'sets URI' do
|
11
|
+
subject.mint_id!('uri_seed')
|
12
|
+
expect(subject.rdf_subject)
|
13
|
+
.to eq RDF::URI(subject.class.base_uri) / 'uri_seed'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
shared_examples 'random hash' do
|
18
|
+
it 'mints random hash' do
|
19
|
+
expect(SecureRandom).to receive(:hex).and_return('abcd1234')
|
20
|
+
subject.mint_id!
|
21
|
+
expect(subject.rdf_subject).to end_with 'abcd1234'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
context 'without originalRecord' do
|
26
|
+
include_examples 'sets to seed'
|
27
|
+
include_examples 'random hash'
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'with originalRecord' do
|
31
|
+
include_examples 'sets to seed'
|
32
|
+
|
33
|
+
before do
|
34
|
+
subject.originalRecord = or_uri
|
35
|
+
end
|
36
|
+
|
37
|
+
let(:local_name) { '123' }
|
38
|
+
let(:or_uri) do
|
39
|
+
RDF::URI('http://example.org/ldp/resource/') / local_name + '.xml'
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'mints a URI' do
|
43
|
+
subject.mint_id!
|
44
|
+
expect(subject.rdf_subject)
|
45
|
+
.to eq RDF::URI(subject.class.base_uri) / local_name
|
46
|
+
end
|
47
|
+
|
48
|
+
context 'as a bnode' do
|
49
|
+
before do
|
50
|
+
subject.originalRecord = RDF::Node.new
|
51
|
+
end
|
52
|
+
|
53
|
+
include_examples 'random hash'
|
54
|
+
end
|
55
|
+
|
56
|
+
context 'with more than one originalRecord' do
|
57
|
+
before do
|
58
|
+
subject.originalRecord << RDF::Node.new
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'raises an error' do
|
62
|
+
expect { subject.mint_id! }.to raise_error
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Krikri::Harvesters::OAIHarvester do
|
4
|
+
|
5
|
+
let(:args) { { endpoint: 'http://example.org/endpoint' } }
|
6
|
+
subject { described_class.new(args) }
|
7
|
+
|
8
|
+
it 'has a client' do
|
9
|
+
expect(subject.client).to be_a OAI::Client
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'can get its record ids' do
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Krikri::Provider do
|
4
|
+
let(:provider) do
|
5
|
+
provider = Krikri::Provider.new('123')
|
6
|
+
provider.providedLabel = "moomin"
|
7
|
+
end
|
8
|
+
|
9
|
+
let(:agg) do
|
10
|
+
a = build(:aggregation, :provider => provider)
|
11
|
+
a.set_subject! 'moomin'
|
12
|
+
a
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '.all' do
|
16
|
+
it 'with no items is empty' do
|
17
|
+
expect(Krikri::Provider.all).to be_empty
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'returns all items' do
|
21
|
+
agg.save
|
22
|
+
Krikri::IndexService.new.add(agg)
|
23
|
+
expect(Krikri::Provider.all).to contain_exactly provider
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '.find' do
|
28
|
+
it do
|
29
|
+
require 'pry'
|
30
|
+
binding.pry
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Krikri::QAReport do
|
4
|
+
|
5
|
+
subject { described_class.new(provider) }
|
6
|
+
|
7
|
+
let(:provider) do
|
8
|
+
agent = build(:agent)
|
9
|
+
agent.set_subject! 'http://example.org/moomin'
|
10
|
+
agent
|
11
|
+
end
|
12
|
+
|
13
|
+
let(:solutions) do
|
14
|
+
RDF::Query::Solutions.new(
|
15
|
+
[RDF::Query::Solution.new(value: RDF::Literal('abc'),
|
16
|
+
aggregation: DPLA::MAP::Aggregation
|
17
|
+
.new('too-ticki'),
|
18
|
+
isShownAt: DPLA::MAP::WebResource
|
19
|
+
.new('http://example.org/too-ticki')),
|
20
|
+
RDF::Query::Solution.new(value: RDF::Literal('abc'),
|
21
|
+
aggregation: DPLA::MAP::Aggregation
|
22
|
+
.new('little-my'),
|
23
|
+
isShownAt: DPLA::MAP::WebResource
|
24
|
+
.new('http://example.org/little-my')),
|
25
|
+
RDF::Query::Solution.new(value: RDF::Literal('123'),
|
26
|
+
aggregation: DPLA::MAP::Aggregation
|
27
|
+
.new('moomin-mama'),
|
28
|
+
isShownAt: DPLA::MAP::WebResource
|
29
|
+
.new('http://example.org/moomin-mama'))])
|
30
|
+
end
|
31
|
+
|
32
|
+
describe '#provider' do
|
33
|
+
it 'is set on initalization' do
|
34
|
+
expect(subject.provider).to eq provider
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe '#generate' do
|
39
|
+
before do
|
40
|
+
agg = build(:aggregation)
|
41
|
+
agg.set_subject!('mummi123')
|
42
|
+
agg.provider = provider
|
43
|
+
agg.save
|
44
|
+
agg2 = build(:aggregation)
|
45
|
+
agg2.set_subject!('mummi223')
|
46
|
+
agg2.provider = provider
|
47
|
+
agg2.save
|
48
|
+
end
|
49
|
+
|
50
|
+
it do
|
51
|
+
require 'pry'
|
52
|
+
binding.pry
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'populates report with hash'
|
56
|
+
it 'generates data for all fields'
|
57
|
+
end
|
58
|
+
|
59
|
+
describe '#solutions_to_hash' do
|
60
|
+
it '' do
|
61
|
+
subject.send(:solutions_to_hash, solutions)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
shared_context 'with indexed item' do
|
2
|
+
before do
|
3
|
+
indexer = Krikri::QASearchIndex.new
|
4
|
+
indexer.add agg.to_jsonld['@graph'].first
|
5
|
+
indexer.commit
|
6
|
+
end
|
7
|
+
|
8
|
+
let(:agg) do
|
9
|
+
a = build(:aggregation, provider: provider)
|
10
|
+
a.set_subject! 'moomin'
|
11
|
+
a
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
end
|