krikri 0.12.3 → 0.12.4
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/enrichments/language_to_lexvo.rb +1 -1
- data/lib/krikri/enrichments/split_on_provided_label.rb +58 -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 +14 -1
- 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 +3 -3
- data/spec/internal/Gemfile.lock +42 -51
- 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/{20160226160200_devise_create_users.rb → 20160407153644_devise_create_users.rb} +0 -0
- data/spec/internal/db/migrate/{20160226160226_create_searches.blacklight.rb → 20160407153706_create_searches.blacklight.rb} +0 -0
- data/spec/internal/db/migrate/{20160226160227_create_bookmarks.blacklight.rb → 20160407153707_create_bookmarks.blacklight.rb} +0 -0
- data/spec/internal/db/migrate/{20160226160228_add_polymorphic_type_to_bookmarks.blacklight.rb → 20160407153708_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/lib/generators/test_app_generator.rb~ +14 -0
- data/spec/internal/log/development.log +93 -93
- data/spec/internal/log/test.log +126244 -0
- data/spec/internal/tmp/cache/318/301/krikri%2Fapplication_helper%2Favailable_providers +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_alerts.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_background-variant.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_border-radius.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_buttons.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_center-block.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_clearfix.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_forms.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_gradients.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_grid-framework.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_grid.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_hide-text.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_image.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_labels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_list-group.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_nav-divider.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_nav-vertical-align.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_opacity.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_pagination.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_panels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_progress-bar.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_reset-filter.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_resize.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_responsive-visibility.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_size.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_tab-focus.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_table-row.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_text-emphasis.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_text-overflow.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_vendor-prefixes.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/93e201cf4a11978a1f491a057a3bd569c3825210/blacklight.css.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_alerts.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_badges.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_breadcrumbs.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_button-groups.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_buttons.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_carousel.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_close.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_code.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_component-animations.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_dropdowns.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_forms.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_glyphicons.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_grid.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_input-groups.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_jumbotron.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_labels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_list-group.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_media.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_mixins.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_modals.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_navbar.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_navs.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_normalize.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_pager.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_pagination.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_panels.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_popovers.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_print.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_progress-bars.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_responsive-embed.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_responsive-utilities.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_scaffolding.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_tables.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_thumbnails.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_tooltip.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_type.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_utilities.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_variables.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_wells.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/b28605b1c659cf09fc72f3c1fff32918869d28b8/_bootstrap-sprockets.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/b28605b1c659cf09fc72f3c1fff32918869d28b8/_bootstrap.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_blacklight_base.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_bookmark.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_catalog.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_facets.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_group.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_header.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_layout.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_modal.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_search_history.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/blacklight.scssc +0 -0
- data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/blacklight_defaults.scssc +0 -0
- 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/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/19f4ba6fa86d2609c171da9f5ee3b11a +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/2bec18569db80effd80a2a19a038100b +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/30ca7caa200fa8eaddaef443913ad9ad +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/350a65d446eb7398f96d102f7a1a6d69 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/4052820c15af72ba690230a0f92bd75e +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/41b62fb10530766b5b9fef3338f5f30b +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/421c89c58d3e76046a0294dae1f731ff +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/43da966542fafc2a4c768be78527391c +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/496a0d7dce1ff6bf4a9c3a089ea3a635 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/4e93570db72bb61820711448b78d548d +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/72848ec252813c930e57868edab843b5 +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/927d682c9287262facf9333dfaef813c +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/93aaa9231a32901266b05632f3d35ecd +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/9c653367feff82588eb6041d783a5809 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/9ce190f082dc4fb74bddb818cc011ce6 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/ab2a05b91d7d316d4ceb47ce067006fb +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/ad4a54c43c2a4c3874bfde1c9f08c248 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b1a42de74c934edd0e5eed0f98a23597 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b1c03c36188b4f58f819510adb9a7e9c +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b225d67626669cb154cbe08a3c439d48 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b35e12934e9f05662777579549e31cd7 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b3ae9e3cdd9991d7103b0a00e33b5778 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b42c247628daaf44109584724682a6ad +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/b660ec1ede271559cfd0259eed96ae9c +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/ba078b29a7f067b3acdd538a286235a8 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/bb108ef3fc4c96d1c20cc41f97d943a0 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/bb92f4b8c1bedafe60b6f226b549138a +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/c9efce42580b0ad0374a052aa61f2a07 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d1bce36d6e3ab792562b9c929f2ce897 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d23c35c7aba77b1c68e42603120aebd2 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d24a7c4b8ac71a90e809881a64970898 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/db0d9534ecdebba33af5d1d81060e855 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/dbba4bbc32c17ade3d618c5d0baeb371 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/e315f2e6fe546b7a0e37fcfc0f647c84 +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/ecfc314951b349e27742c1b26880619e +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/f3935581a84aba9a499005ed6a8e18be +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f3e7729c53b8a2c408086a61b58922ae +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f45dfdb34e84d3c72a3319399a7316a3 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f74af03e26e893af40b07a6d0f970cd4 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/fa11f1beb15b0f04503ce1f06701a8bf +0 -0
- data/spec/internal/tmp/cache/assets/test/sprockets/faac2909046aa87e1f1f08b2bf0ad2b2 +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/enrichments/language_to_lexvo_spec.rb +5 -0
- data/spec/lib/krikri/enrichments/split_on_provided_label_spec.rb +42 -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 +15 -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 +8 -1
- 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 +650 -163
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 517965ae2813b05cc769baeedd6f0168163a4071
|
4
|
+
data.tar.gz: 58c07dffaaa06b05c7d7c511a88ca9836f0a4e8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4e1277af09828f18159603b9a17389453e38746e947ffc3b3c3621376b267591903218aaa8987b297c1b8fc64cfcc437e84b25693e61ede5a4f979f9c961ac3
|
7
|
+
data.tar.gz: b61bcda8cae84919b46dfde666a832899e6a1c1b6b0a89d61cdcc3d172eb9d939b9ec19f13fa00ae58570086a863a99ba0dfc909935bee61ca8b98c398b51c29
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<h3>Validation Reports</h3>
|
2
|
+
<% if @validation_reports %>
|
3
|
+
<ul>
|
4
|
+
<% @validation_reports.each do |validation_report| %>
|
5
|
+
<li><%= render_validation_report(validation_report) %></li>
|
6
|
+
<% end %>
|
7
|
+
</ul>
|
8
|
+
<% else %>
|
9
|
+
<div>There was an error generating the QA reports.</div>
|
10
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Krikri
|
2
|
+
##
|
3
|
+
# Handles HTTP requests for QA Reports
|
4
|
+
class QAReportsController < ApplicationController
|
5
|
+
include Concerns::ProviderContext
|
6
|
+
|
7
|
+
before_action :authenticate_user!, :set_current_provider
|
8
|
+
|
9
|
+
def show
|
10
|
+
require 'pry'
|
11
|
+
binding.pry
|
12
|
+
respond_to do |format|
|
13
|
+
format.html
|
14
|
+
format.csv { render csv: 'test' }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<% # krikri/institutions/show %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
setting_files = [self.root.join('config', 'settings.yml'),
|
2
|
+
self.root.join('config', 'settings', "#{Rails.env}.yml"),
|
3
|
+
self.root.join('config', 'environments', "#{Rails.env}.yml"),
|
4
|
+
self.root.join('config', 'settings.local.yml'),
|
5
|
+
self.root.join('config', 'settings', "#{Rails.env}.local.yml"),
|
6
|
+
self.root.join('config', 'environments',
|
7
|
+
"#{Rails.env}.local.yml")
|
8
|
+
].map { |path| path.to_s }
|
9
|
+
|
10
|
+
settings_const = Kernel.const_get(RailsConfig.const_name)
|
11
|
+
|
12
|
+
source_paths = settings_const.add_source!('nil')[0..-2].map do |source|
|
13
|
+
source.path
|
14
|
+
end
|
15
|
+
|
16
|
+
source_paths = setting_files + source_paths
|
17
|
+
|
18
|
+
RailsConfig.load_and_set_settings(source_paths)
|
19
|
+
Krikri::Settings = Kernel.const_get(RailsConfig.const_name)
|
@@ -125,7 +125,7 @@ module Krikri::Enrichments
|
|
125
125
|
# @param code [#to_sym] a three letter iso code
|
126
126
|
# @return [DPLA::MAP::Controlled::Language]
|
127
127
|
def match_iso(code)
|
128
|
-
match = QNAMES.find { |c| c == code.to_sym }
|
128
|
+
match = QNAMES.find { |c| c == code.downcase.to_sym }
|
129
129
|
from_sym(match)
|
130
130
|
end
|
131
131
|
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module Krikri::Enrichments
|
2
|
+
##
|
3
|
+
# Splits a resource into multiple resources when multiple providedLabels are
|
4
|
+
# present. This is useful when a mapping error or limitation in partner data
|
5
|
+
# makes it impossible to split resoureces properly at mapping time.
|
6
|
+
#
|
7
|
+
# @note: Properties other than `providedLabel` are retained by the original
|
8
|
+
# node. This does not attempt to keep like properties together.
|
9
|
+
# @note: Nodes created by this enrichment share a class with the original
|
10
|
+
# input value.
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# label_splitter = SplitOnProvidedLabel.new
|
14
|
+
# node = DPLA::MAP::Agent.new(providedLabel: ['moomin', 'moominmama']
|
15
|
+
# closeMatch: 'Moomintroll')
|
16
|
+
#
|
17
|
+
# new_values = label_splitter.enrich_value(node)
|
18
|
+
# new_values # => [#<DPLA::MAP::Agent:0x1...()>,
|
19
|
+
# #<DPLA::MAP::Agent:0x2...()>]
|
20
|
+
#
|
21
|
+
# new_values.map(&:providedLabel) # => [['moomin'], ['moominmama']]
|
22
|
+
#
|
23
|
+
# @see Audumbla::FieldEnrichment
|
24
|
+
class SplitOnProvidedLabel
|
25
|
+
include Audumbla::FieldEnrichment
|
26
|
+
|
27
|
+
##
|
28
|
+
# @param value [Object] the value to split
|
29
|
+
# @see Audumbla::FieldEnrichment#enrich_value
|
30
|
+
def enrich_value(value)
|
31
|
+
return value unless value.is_a?(ActiveTriples::Resource) &&
|
32
|
+
value.respond_to?(:providedLabel)
|
33
|
+
return value unless value.providedLabel.count > 1
|
34
|
+
split_provided(value)
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
##
|
40
|
+
# @param value [ActiveTriples::Resource] a resource with one or more
|
41
|
+
# `providedLabels`.
|
42
|
+
# @return [Array<ActiveTriples::Resource] an array on resources matching the
|
43
|
+
# class of the original; the array contains the original resource, reduced
|
44
|
+
# to one `providedLabel`, and a resource for each extra label.
|
45
|
+
def split_provided(value)
|
46
|
+
labels = value.providedLabel.dup
|
47
|
+
value.providedLabel = labels.shift
|
48
|
+
|
49
|
+
nodes = [value]
|
50
|
+
|
51
|
+
labels.each_with_object(nodes) do |label, object|
|
52
|
+
new_node = value.class.new
|
53
|
+
new_node.providedLabel = label
|
54
|
+
nodes << new_node
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Krikri::LDP
|
2
|
+
class Container < ActiveTriples::Resource
|
3
|
+
include Krikri::LDP::Resource
|
4
|
+
|
5
|
+
configure :type => RDF::URI('http://www.w3.org/ns/ldp#Container')
|
6
|
+
|
7
|
+
def initialize(uri, slug)
|
8
|
+
@ldp_uri = uri
|
9
|
+
@container_slug = slug
|
10
|
+
super("#{uri}/#{slug}")
|
11
|
+
end
|
12
|
+
|
13
|
+
def save(body = nil, opts = {})
|
14
|
+
opts[:Link] = "<#{type.first.to_s}>; rel='type'"
|
15
|
+
opts[:Slug] = @container_slug
|
16
|
+
opts[:method] = :post unless exists?
|
17
|
+
body ||= (dump :ttl)
|
18
|
+
opts['Content-Type'] ||= 'text/turtle'
|
19
|
+
super(body, opts)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Krikri::LDP
|
2
|
+
module RdfSource
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
include Krikri::LDP::Resource
|
5
|
+
|
6
|
+
def save(headers = {})
|
7
|
+
result = super(dump(:ttl))
|
8
|
+
get
|
9
|
+
result
|
10
|
+
end
|
11
|
+
|
12
|
+
def get(*args)
|
13
|
+
result = super
|
14
|
+
reload
|
15
|
+
result
|
16
|
+
end
|
17
|
+
|
18
|
+
def reload
|
19
|
+
return super unless !node? && exists?
|
20
|
+
clear
|
21
|
+
self << RDF::Reader.for(:ttl).new(@http_cache.body).statements
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'faraday_middleware'
|
3
|
+
|
4
|
+
module Krikri::LDP
|
5
|
+
module Resource
|
6
|
+
extend ActiveSupport::Concern
|
7
|
+
|
8
|
+
attr_accessor :rdf_subject, :connection_uri
|
9
|
+
|
10
|
+
def ldp_connection
|
11
|
+
@ldp_conn ||= Faraday.new(connection_uri) do |conn|
|
12
|
+
conn.use Faraday::Response::RaiseError
|
13
|
+
conn.use FaradayMiddleware::FollowRedirects, limit: 3
|
14
|
+
conn.adapter Faraday.default_adapter
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def etag
|
19
|
+
http_head.env['response_headers']['etag']
|
20
|
+
end
|
21
|
+
|
22
|
+
def http_head
|
23
|
+
raise 'No subject set for LDP resource.' if rdf_subject.nil?
|
24
|
+
@http_cache ||= ldp_connection.head { |request| request.url rdf_subject }
|
25
|
+
end
|
26
|
+
|
27
|
+
def exists?
|
28
|
+
return true if rdf_subject && http_head
|
29
|
+
false
|
30
|
+
rescue Faraday::ResourceNotFound
|
31
|
+
false
|
32
|
+
end
|
33
|
+
|
34
|
+
def save(uri, body = nil, opts = {})
|
35
|
+
require 'pry'
|
36
|
+
binding.pry
|
37
|
+
create(uri, body, opts)
|
38
|
+
end
|
39
|
+
|
40
|
+
def create(uri, body = nil, opts = {})
|
41
|
+
response = ldp_connection.post do |request|
|
42
|
+
request.url uri
|
43
|
+
request.headers = opts if opts
|
44
|
+
request.body = body
|
45
|
+
end
|
46
|
+
response
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
data/lib/krikri/map_crosswalk.rb
CHANGED
@@ -115,7 +115,7 @@ module Krikri
|
|
115
115
|
get_label(creator)
|
116
116
|
end
|
117
117
|
|
118
|
-
set_value(sr, :description, parent_sr.description
|
118
|
+
set_value(sr, :description, parent_sr.description)
|
119
119
|
set_value(sr, :format, parent_sr.dcformat)
|
120
120
|
set_value(sr, :identifier, parent_sr.identifier)
|
121
121
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Krikri
|
2
|
+
##
|
3
|
+
# A parser for JSON records
|
4
|
+
# @see Krikri::Parser
|
5
|
+
class JsonParser < Krikri::Parser
|
6
|
+
def initialize(record)
|
7
|
+
@root = Value.new(JSON.parse(record.content))
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
class Value < Krikri::Parser::Value
|
12
|
+
def initialize(json)
|
13
|
+
@json = json
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Krikri
|
2
|
+
##
|
3
|
+
# An XmlParser
|
4
|
+
# @see Krikri::Parser
|
5
|
+
class XmlParser < Krikri::Parser
|
6
|
+
def initialize(record, root_path = '/')
|
7
|
+
xml = Nokogiri::XML(record.to_s)
|
8
|
+
ns = namespaces_from_xml(xml)
|
9
|
+
@root = Value.new(xml.at_xpath(root_path, ns), ns)
|
10
|
+
super(record)
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def namespaces_from_xml(xml)
|
16
|
+
namespaces = xml.collect_namespaces.map do |k, v|
|
17
|
+
[k.gsub('xmlns:', ''), v]
|
18
|
+
end
|
19
|
+
namespaces.to_h
|
20
|
+
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# An XML Parser Value node class
|
24
|
+
# @see Krikri::Parser::Value
|
25
|
+
class Value < Krikri::Parser::Value
|
26
|
+
def initialize(node, namespaces)
|
27
|
+
node = node.root if node.xml?
|
28
|
+
@node = node
|
29
|
+
@namespaces = namespaces
|
30
|
+
end
|
31
|
+
|
32
|
+
delegate :attributes, :xpath, :at_xpath, :css, :at_css, :to => :@node
|
33
|
+
|
34
|
+
def children
|
35
|
+
@node.element_children.map do |child|
|
36
|
+
return child.name unless child.namespace
|
37
|
+
"#{@namespaces.key(child.namespace.href)}:#{child.name}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def values
|
42
|
+
select_values.map(&:text)
|
43
|
+
end
|
44
|
+
|
45
|
+
def values?
|
46
|
+
!select_values.empty?
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def get_child_nodes(name)
|
52
|
+
@node.xpath("#{@node.path}/#{name}", @namespaces)
|
53
|
+
.map { |node| self.class.new(node, @namespaces) }
|
54
|
+
end
|
55
|
+
|
56
|
+
def select_values
|
57
|
+
@node.children.select(&:text?)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Krikri::Util
|
2
|
+
module ExtendedDateParser
|
3
|
+
|
4
|
+
##
|
5
|
+
# e.g. 1990s or 199- or 199x
|
6
|
+
def decade(str)
|
7
|
+
decade
|
8
|
+
end
|
9
|
+
|
10
|
+
##
|
11
|
+
# e.g. 1990s
|
12
|
+
def decade_s(str)
|
13
|
+
/^(\d{3})0s$/.match(str) do |m|
|
14
|
+
Date.edtf("#{m[1]}x")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
##
|
19
|
+
# e.g. 199-
|
20
|
+
def decade_hyphen(str)
|
21
|
+
/^(\d{3})-$/.match(str) do |m|
|
22
|
+
Date.edtf("#{m[1]}x")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|