krikri 0.12.3 → 0.12.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/krikri/_qa_report_list.html.erb~ +10 -0
  3. data/app/controllers/krikri/concerns/provider_context.rb~ +7 -0
  4. data/app/controllers/krikri/qa_reports_controller.rb~ +18 -0
  5. data/app/models/krikri/original_record_desc.rb~ +6 -0
  6. data/app/models/krikri/original_record_metadata.rb~ +9 -0
  7. data/app/models/krikri/parser.rb~ +5 -0
  8. data/app/models/krikri/parsers/xml_parser.rb~ +5 -0
  9. data/app/models/krikri/qa_report.rb~ +7 -0
  10. data/app/views/krikri/qa_reports/index.html.erb~ +3 -0
  11. data/app/views/krikri/qa_reports/show.html.erb~ +1 -0
  12. data/config/initializers/config.rb~ +19 -0
  13. data/config/settings/test.yml~ +3 -0
  14. data/db/migrate/20150328035550_add_qa_report.rb~ +11 -0
  15. data/lib/krikri/enrichments/language_to_lexvo.rb +1 -1
  16. data/lib/krikri/enrichments/split_on_provided_label.rb +58 -0
  17. data/lib/krikri/ldp/container.rb~ +22 -0
  18. data/lib/krikri/ldp/nr_source.rb~ +4 -0
  19. data/lib/krikri/ldp/rdf_source.rb~ +24 -0
  20. data/lib/krikri/ldp/resource.rb~ +49 -0
  21. data/lib/krikri/map_crosswalk.rb +1 -1
  22. data/lib/krikri/parsers/json_parser.rb~ +17 -0
  23. data/lib/krikri/parsers/oai_headers.rb~ +4 -0
  24. data/lib/krikri/parsers/oai_parser.rb~ +2 -0
  25. data/lib/krikri/parsers/oai_parser_headers.rb~ +4 -0
  26. data/lib/krikri/parsers/xml_parser.rb~ +61 -0
  27. data/lib/krikri/util/edtf_converter.rb~ +26 -0
  28. data/lib/krikri/util/extended_date_parser.rb +14 -1
  29. data/lib/krikri/util/extended_date_parser.rb~ +70 -0
  30. data/lib/krikri/version.rb +1 -1
  31. data/lib/tasks/jetty.rake~ +12 -0
  32. data/lib/tasks/krikri.rake~ +20 -0
  33. data/spec/controllers/application_controller_spec.rb~ +11 -0
  34. data/spec/controllers/qa_reports_controller_spec.rb~ +15 -0
  35. data/spec/controllers/records_controller_spec.rb~ +11 -0
  36. data/spec/controllers/reports_controller_spec.rb~ +6 -0
  37. data/spec/controllers/validation_reports_controller_spec.rb~ +15 -0
  38. data/spec/factories/krikri_original_record.rb~ +5 -0
  39. data/spec/factories/krikri_provider.rb~ +7 -0
  40. data/spec/factories/krikri_provider_spec.rb~ +7 -0
  41. data/spec/factories/krikri_qa_report.rb~ +8 -0
  42. data/spec/helpers/krikri/application_helper_spec.rb~ +16 -0
  43. data/spec/internal/Gemfile +3 -3
  44. data/spec/internal/Gemfile.lock +42 -51
  45. data/spec/internal/app/assets/javascripts/application.js +1 -1
  46. data/spec/internal/config/initializers/blacklight_initializer.rb +1 -1
  47. data/spec/internal/config/initializers/devise.rb +2 -2
  48. data/spec/internal/config/secrets.yml +2 -2
  49. data/spec/internal/db/development.sqlite3 +0 -0
  50. data/spec/internal/db/migrate/{20160226160200_devise_create_users.rb → 20160407153644_devise_create_users.rb} +0 -0
  51. data/spec/internal/db/migrate/{20160226160226_create_searches.blacklight.rb → 20160407153706_create_searches.blacklight.rb} +0 -0
  52. data/spec/internal/db/migrate/{20160226160227_create_bookmarks.blacklight.rb → 20160407153707_create_bookmarks.blacklight.rb} +0 -0
  53. data/spec/internal/db/migrate/{20160226160228_add_polymorphic_type_to_bookmarks.blacklight.rb → 20160407153708_add_polymorphic_type_to_bookmarks.blacklight.rb} +0 -0
  54. data/spec/internal/db/schema.rb +1 -1
  55. data/spec/internal/db/test.sqlite3 +0 -0
  56. data/spec/internal/lib/generators/test_app_generator.rb~ +14 -0
  57. data/spec/internal/log/development.log +93 -93
  58. data/spec/internal/log/test.log +126244 -0
  59. data/spec/internal/tmp/cache/318/301/krikri%2Fapplication_helper%2Favailable_providers +0 -0
  60. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_alerts.scssc +0 -0
  61. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_background-variant.scssc +0 -0
  62. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_border-radius.scssc +0 -0
  63. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_buttons.scssc +0 -0
  64. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_center-block.scssc +0 -0
  65. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_clearfix.scssc +0 -0
  66. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_forms.scssc +0 -0
  67. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_gradients.scssc +0 -0
  68. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_grid-framework.scssc +0 -0
  69. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_grid.scssc +0 -0
  70. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_hide-text.scssc +0 -0
  71. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_image.scssc +0 -0
  72. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_labels.scssc +0 -0
  73. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_list-group.scssc +0 -0
  74. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_nav-divider.scssc +0 -0
  75. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_nav-vertical-align.scssc +0 -0
  76. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_opacity.scssc +0 -0
  77. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_pagination.scssc +0 -0
  78. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_panels.scssc +0 -0
  79. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_progress-bar.scssc +0 -0
  80. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_reset-filter.scssc +0 -0
  81. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_resize.scssc +0 -0
  82. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_responsive-visibility.scssc +0 -0
  83. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_size.scssc +0 -0
  84. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_tab-focus.scssc +0 -0
  85. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_table-row.scssc +0 -0
  86. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_text-emphasis.scssc +0 -0
  87. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_text-overflow.scssc +0 -0
  88. data/spec/internal/tmp/cache/assets/test/sass/4a3ee647961c7e45976eb2c0a94406aad3427b3d/_vendor-prefixes.scssc +0 -0
  89. data/spec/internal/tmp/cache/assets/test/sass/93e201cf4a11978a1f491a057a3bd569c3825210/blacklight.css.scssc +0 -0
  90. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_alerts.scssc +0 -0
  91. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_badges.scssc +0 -0
  92. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_breadcrumbs.scssc +0 -0
  93. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_button-groups.scssc +0 -0
  94. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_buttons.scssc +0 -0
  95. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_carousel.scssc +0 -0
  96. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_close.scssc +0 -0
  97. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_code.scssc +0 -0
  98. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_component-animations.scssc +0 -0
  99. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_dropdowns.scssc +0 -0
  100. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_forms.scssc +0 -0
  101. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_glyphicons.scssc +0 -0
  102. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_grid.scssc +0 -0
  103. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_input-groups.scssc +0 -0
  104. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_jumbotron.scssc +0 -0
  105. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_labels.scssc +0 -0
  106. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_list-group.scssc +0 -0
  107. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_media.scssc +0 -0
  108. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_mixins.scssc +0 -0
  109. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_modals.scssc +0 -0
  110. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_navbar.scssc +0 -0
  111. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_navs.scssc +0 -0
  112. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_normalize.scssc +0 -0
  113. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_pager.scssc +0 -0
  114. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_pagination.scssc +0 -0
  115. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_panels.scssc +0 -0
  116. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_popovers.scssc +0 -0
  117. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_print.scssc +0 -0
  118. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_progress-bars.scssc +0 -0
  119. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_responsive-embed.scssc +0 -0
  120. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_responsive-utilities.scssc +0 -0
  121. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_scaffolding.scssc +0 -0
  122. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_tables.scssc +0 -0
  123. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_thumbnails.scssc +0 -0
  124. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_tooltip.scssc +0 -0
  125. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_type.scssc +0 -0
  126. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_utilities.scssc +0 -0
  127. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_variables.scssc +0 -0
  128. data/spec/internal/tmp/cache/assets/test/sass/a1ec1bb9c9cafeb054d542e861ebc8ffd5904439/_wells.scssc +0 -0
  129. data/spec/internal/tmp/cache/assets/test/sass/b28605b1c659cf09fc72f3c1fff32918869d28b8/_bootstrap-sprockets.scssc +0 -0
  130. data/spec/internal/tmp/cache/assets/test/sass/b28605b1c659cf09fc72f3c1fff32918869d28b8/_bootstrap.scssc +0 -0
  131. data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_blacklight_base.scssc +0 -0
  132. data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_bookmark.scssc +0 -0
  133. data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_catalog.scssc +0 -0
  134. data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_facets.scssc +0 -0
  135. data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_group.scssc +0 -0
  136. data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_header.scssc +0 -0
  137. data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_layout.scssc +0 -0
  138. data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_modal.scssc +0 -0
  139. data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/_search_history.scssc +0 -0
  140. data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/blacklight.scssc +0 -0
  141. data/spec/internal/tmp/cache/assets/test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282/blacklight_defaults.scssc +0 -0
  142. data/spec/internal/tmp/cache/assets/test/sprockets/059eceaa18e2eaee3d5168f3949f4957 +0 -0
  143. data/spec/internal/tmp/cache/assets/test/sprockets/093d898bf3f20b26b13c82714a77c040 +0 -0
  144. data/spec/internal/tmp/cache/assets/test/sprockets/10517c9579f8d23c82fb8caa66dca6a7 +0 -0
  145. data/spec/internal/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  146. data/spec/internal/tmp/cache/assets/test/sprockets/19f4ba6fa86d2609c171da9f5ee3b11a +0 -0
  147. data/spec/internal/tmp/cache/assets/test/sprockets/2bec18569db80effd80a2a19a038100b +0 -0
  148. data/spec/internal/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  149. data/spec/internal/tmp/cache/assets/test/sprockets/30ca7caa200fa8eaddaef443913ad9ad +0 -0
  150. data/spec/internal/tmp/cache/assets/test/sprockets/350a65d446eb7398f96d102f7a1a6d69 +0 -0
  151. data/spec/internal/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  152. data/spec/internal/tmp/cache/assets/test/sprockets/4052820c15af72ba690230a0f92bd75e +0 -0
  153. data/spec/internal/tmp/cache/assets/test/sprockets/41b62fb10530766b5b9fef3338f5f30b +0 -0
  154. data/spec/internal/tmp/cache/assets/test/sprockets/421c89c58d3e76046a0294dae1f731ff +0 -0
  155. data/spec/internal/tmp/cache/assets/test/sprockets/43da966542fafc2a4c768be78527391c +0 -0
  156. data/spec/internal/tmp/cache/assets/test/sprockets/496a0d7dce1ff6bf4a9c3a089ea3a635 +0 -0
  157. data/spec/internal/tmp/cache/assets/test/sprockets/4e93570db72bb61820711448b78d548d +0 -0
  158. data/spec/internal/tmp/cache/assets/test/sprockets/50b9db0b908b421a9b941a445dbaeacc +0 -0
  159. data/spec/internal/tmp/cache/assets/test/sprockets/5155772cce704d83a64aa83eeda20c5a +0 -0
  160. data/spec/internal/tmp/cache/assets/test/sprockets/528c628cf107f8be6dd122e1154344be +0 -0
  161. data/spec/internal/tmp/cache/assets/test/sprockets/5ed02c7072bb024fa0832a1ca4113227 +0 -0
  162. data/spec/internal/tmp/cache/assets/test/sprockets/60141dc3d16c502963c3d798a099862d +0 -0
  163. data/spec/internal/tmp/cache/assets/test/sprockets/6df5b5c0a8e6d87ced9504a460df875e +0 -0
  164. data/spec/internal/tmp/cache/assets/test/sprockets/6eefd2765a716d66ff857cfcda69a119 +0 -0
  165. data/spec/internal/tmp/cache/assets/test/sprockets/72848ec252813c930e57868edab843b5 +0 -0
  166. data/spec/internal/tmp/cache/assets/test/sprockets/88ded10f28177bec1bddb0d72d6b1cd2 +0 -0
  167. data/spec/internal/tmp/cache/assets/test/sprockets/8edfca9082e02111be92e79000667f22 +0 -0
  168. data/spec/internal/tmp/cache/assets/test/sprockets/90b54a819800edfa41b67722d1561040 +0 -0
  169. data/spec/internal/tmp/cache/assets/test/sprockets/927d682c9287262facf9333dfaef813c +0 -0
  170. data/spec/internal/tmp/cache/assets/test/sprockets/93aaa9231a32901266b05632f3d35ecd +0 -0
  171. data/spec/internal/tmp/cache/assets/test/sprockets/9c653367feff82588eb6041d783a5809 +0 -0
  172. data/spec/internal/tmp/cache/assets/test/sprockets/9ce190f082dc4fb74bddb818cc011ce6 +0 -0
  173. data/spec/internal/tmp/cache/assets/test/sprockets/ab2a05b91d7d316d4ceb47ce067006fb +0 -0
  174. data/spec/internal/tmp/cache/assets/test/sprockets/ad4a54c43c2a4c3874bfde1c9f08c248 +0 -0
  175. data/spec/internal/tmp/cache/assets/test/sprockets/b1a42de74c934edd0e5eed0f98a23597 +0 -0
  176. data/spec/internal/tmp/cache/assets/test/sprockets/b1c03c36188b4f58f819510adb9a7e9c +0 -0
  177. data/spec/internal/tmp/cache/assets/test/sprockets/b225d67626669cb154cbe08a3c439d48 +0 -0
  178. data/spec/internal/tmp/cache/assets/test/sprockets/b35e12934e9f05662777579549e31cd7 +0 -0
  179. data/spec/internal/tmp/cache/assets/test/sprockets/b3ae9e3cdd9991d7103b0a00e33b5778 +0 -0
  180. data/spec/internal/tmp/cache/assets/test/sprockets/b42c247628daaf44109584724682a6ad +0 -0
  181. data/spec/internal/tmp/cache/assets/test/sprockets/b660ec1ede271559cfd0259eed96ae9c +0 -0
  182. data/spec/internal/tmp/cache/assets/test/sprockets/ba078b29a7f067b3acdd538a286235a8 +0 -0
  183. data/spec/internal/tmp/cache/assets/test/sprockets/bb108ef3fc4c96d1c20cc41f97d943a0 +0 -0
  184. data/spec/internal/tmp/cache/assets/test/sprockets/bb92f4b8c1bedafe60b6f226b549138a +0 -0
  185. data/spec/internal/tmp/cache/assets/test/sprockets/c644ecad928e076f999e9c9a3bc350c9 +0 -0
  186. data/spec/internal/tmp/cache/assets/test/sprockets/c78dd20a0df27e9394a413bf2e4abf92 +0 -0
  187. data/spec/internal/tmp/cache/assets/test/sprockets/c9efce42580b0ad0374a052aa61f2a07 +0 -0
  188. data/spec/internal/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  189. data/spec/internal/tmp/cache/assets/test/sprockets/d1bce36d6e3ab792562b9c929f2ce897 +0 -0
  190. data/spec/internal/tmp/cache/assets/test/sprockets/d23c35c7aba77b1c68e42603120aebd2 +0 -0
  191. data/spec/internal/tmp/cache/assets/test/sprockets/d24a7c4b8ac71a90e809881a64970898 +0 -0
  192. data/spec/internal/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  193. data/spec/internal/tmp/cache/assets/test/sprockets/db0d9534ecdebba33af5d1d81060e855 +0 -0
  194. data/spec/internal/tmp/cache/assets/test/sprockets/dbba4bbc32c17ade3d618c5d0baeb371 +0 -0
  195. data/spec/internal/tmp/cache/assets/test/sprockets/e315f2e6fe546b7a0e37fcfc0f647c84 +0 -0
  196. data/spec/internal/tmp/cache/assets/test/sprockets/e8276b98892dcac8285a592bb63fe75b +0 -0
  197. data/spec/internal/tmp/cache/assets/test/sprockets/e9f7ccc553ce1a217709cc7a08cfb032 +0 -0
  198. data/spec/internal/tmp/cache/assets/test/sprockets/ecfc314951b349e27742c1b26880619e +0 -0
  199. data/spec/internal/tmp/cache/assets/test/sprockets/eddae0741d973a8ab3df27c1ea5b635e +0 -0
  200. data/spec/internal/tmp/cache/assets/test/sprockets/f274b5f22db177b6464b50691d531688 +0 -0
  201. data/spec/internal/tmp/cache/assets/test/sprockets/f3935581a84aba9a499005ed6a8e18be +0 -0
  202. data/spec/internal/tmp/cache/assets/test/sprockets/f3e7729c53b8a2c408086a61b58922ae +0 -0
  203. data/spec/internal/tmp/cache/assets/test/sprockets/f45dfdb34e84d3c72a3319399a7316a3 +0 -0
  204. data/spec/internal/tmp/cache/assets/test/sprockets/f74af03e26e893af40b07a6d0f970cd4 +0 -0
  205. data/spec/internal/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  206. data/spec/internal/tmp/cache/assets/test/sprockets/fa11f1beb15b0f04503ce1f06701a8bf +0 -0
  207. data/spec/internal/tmp/cache/assets/test/sprockets/faac2909046aa87e1f1f08b2bf0ad2b2 +0 -0
  208. data/spec/krikri_spec.rb~ +30 -0
  209. data/spec/ldp/active_triples_spec.rb~ +15 -0
  210. data/spec/ldp/at_resource_spec.rb~ +41 -0
  211. data/spec/ldp/nr_source_spec.rb~ +3 -0
  212. data/spec/ldp/rdf_source_spec.rb~ +4 -0
  213. data/spec/ldp/resource_spec.rb~ +49 -0
  214. data/spec/lib/krikri/enrichment_agent_spec.rb~ +4 -0
  215. data/spec/lib/krikri/enrichments/language_to_lexvo_spec.rb +5 -0
  216. data/spec/lib/krikri/enrichments/split_on_provided_label_spec.rb +42 -0
  217. data/spec/lib/krikri/harvesters/api_harvester_spec.rb~ +47 -0
  218. data/spec/lib/krikri/harvesters/basic_save_behavior_spec.rb~ +12 -0
  219. data/spec/lib/krikri/harvesters/file_harvester_spec.rb~ +3 -0
  220. data/spec/lib/krikri/harvesters/harvest_behavior_spec.rb~ +5 -0
  221. data/spec/lib/krikri/harvesters/mdl_api_harvester_spec.rb~ +11 -0
  222. data/spec/lib/krikri/harvesters/mdl_harvester_spec.rb~ +8 -0
  223. data/spec/lib/krikri/harvesters/oai_skip_deleted_behavior.rb~ +7 -0
  224. data/spec/lib/krikri/harvesters/oai_skip_deleted_behavior_spec.rb~ +15 -0
  225. data/spec/lib/krikri/id_service_spec.rb~ +3 -0
  226. data/spec/lib/krikri/job_spec.rb~ +13 -0
  227. data/spec/lib/krikri/map_crosswalk_spec.rb +15 -0
  228. data/spec/lib/krikri/map_crosswalk_spec.rb~ +5 -0
  229. data/spec/lib/krikri/mapper_agent_spec.rb~ +64 -0
  230. data/spec/lib/krikri/mapper_spec.rb~ +5 -0
  231. data/spec/lib/krikri/mapping_dsl/parser_methods_spec.rb~ +65 -0
  232. data/spec/lib/krikri/mapping_dsl/property_declaration_spec.rb~ +87 -0
  233. data/spec/lib/krikri/mapping_dsl/rdf_subjects_spec.rb~ +16 -0
  234. data/spec/lib/krikri/mapping_dsl_spec.rb~ +10 -0
  235. data/spec/lib/krikri/mapping_job.rb~ +12 -0
  236. data/spec/lib/krikri/mapping_job_spec.rb~ +11 -0
  237. data/spec/lib/krikri/mapping_spec.rb~ +5 -0
  238. data/spec/lib/krikri/md5_minter_spec.rb~ +5 -0
  239. data/spec/lib/krikri/parser_value_array.rb~ +5 -0
  240. data/spec/lib/krikri/parsers/json_parser_spec.rb~ +17 -0
  241. data/spec/lib/krikri/parsers/xml_parser_spec.rb~ +21 -0
  242. data/spec/lib/krikri/provenance_query_client.rb~ +5 -0
  243. data/spec/lib/krikri/provenance_query_client_spec.rb~ +8 -0
  244. data/spec/lib/krikri/qa_query_client_spec.rb~ +9 -0
  245. data/spec/lib/krikri/random_search_index_docmument_builder_spec.rb~ +6 -0
  246. data/spec/lib/krikri/util/edtf_converter_spec.rb~ +17 -0
  247. data/spec/lib/krikri/util/extended_date_parser_spec.rb +8 -1
  248. data/spec/lib/krikri/util/extended_date_parser_spec.rb~ +102 -0
  249. data/spec/models/activity_spec.rb~ +41 -0
  250. data/spec/models/dpla/map/aggregation_spec.rb~ +67 -0
  251. data/spec/models/harvesters/oai_harvester_spec.rb~ +15 -0
  252. data/spec/models/mapper_spec.rb~ +5 -0
  253. data/spec/models/original_record_metadata_spec.rb~ +5 -0
  254. data/spec/models/original_record_spec.rb~ +5 -0
  255. data/spec/models/provider_spec.rb~ +33 -0
  256. data/spec/models/qa_report_spec.rb~ +64 -0
  257. data/spec/models/validation_report_spec.rb~ +15 -0
  258. data/spec/support/shared_contexts/indexed_item.rb~ +15 -0
  259. data/spec/support/shared_contexts/mapping_dsl.rb~ +12 -0
  260. data/spec/support/shared_contexts/provenance_query_client.rb~ +6 -0
  261. data/spec/support/shared_contexts/rake.rb~ +21 -0
  262. data/spec/support/shared_examples/enrichment.rb~ +5 -0
  263. data/spec/support/shared_examples/harvest_behavior.rb~ +13 -0
  264. data/spec/support/shared_examples/job.rb~ +20 -0
  265. data/spec/support/shared_examples/ldp_resource.rb~ +4 -0
  266. data/spec/support/shared_examples/oai_parser_headers.rb~ +12 -0
  267. data/spec/support/shared_examples/rdf_source.rb~ +1 -0
  268. data/spec/support/shared_examples/software_agent.rb~ +5 -0
  269. data/spec/support/shared_examples/string_enrichment.rb~ +12 -0
  270. data/spec/test_app_templates/lib/generators/test_app_generator.rb~ +14 -0
  271. data/spec/views/krikri/providers/index.html.erb_spec.rb~ +3 -0
  272. data/spec/views/krikri/providers/show.html.erb.spec~ +12 -0
  273. data/spec/views/krikri/providers/show.html.erb_spec.rb~ +10 -0
  274. data/spec/views/krikri/qa_reports/index.html.erb_spec.rb~ +17 -0
  275. data/spec/views/krikri/qa_reports/show.html.erb_spec.rb~ +22 -0
  276. data/spec/views/krikri/records/index.html.erb_spec.rb~ +15 -0
  277. data/spec/views/krikri/records/show.html.erb_spec.rb~ +8 -0
  278. data/spec/views/krikri/reports/index.html.erb_spec.rb~ +5 -0
  279. data/spec/webmocks/oai.rb~ +13 -0
  280. metadata +650 -163
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af1ac47d3d861edd6eb88da136736645598d4040
4
- data.tar.gz: cd4dc4745a8535311347af768da3864272ba8cda
3
+ metadata.gz: 517965ae2813b05cc769baeedd6f0168163a4071
4
+ data.tar.gz: 58c07dffaaa06b05c7d7c511a88ca9836f0a4e8c
5
5
  SHA512:
6
- metadata.gz: c64131af7a6bace61f13a53c92678b78e16f1547295731f563b46ab45f634671522a1c7134a240b0c8dcc6712acced9b3ede00b1bce9ec290e46064dd5360a34
7
- data.tar.gz: 6ed7589fc0586bf1e3c0b55c589fc64582bc78a251ac53dc97adc3211e18807fdd435a0fbb2bdb66b9e4d007c1cac7adc52188c831758d7baf28cc7aa4a03067
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,7 @@
1
+ module Krikri::Concerns
2
+ class ProviderContext
3
+ def set_current_provider(provider_id = params[:provider])
4
+ @current_provider = Krikri::Provider.find(provider_id)
5
+ end
6
+ end
7
+ 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,6 @@
1
+ module Krikri
2
+ ##
3
+ # Descriptive Metadata for OriginalRecord
4
+ class OriginalRecordMetadata < ActiveTriples::Resource
5
+ end
6
+ end
@@ -0,0 +1,9 @@
1
+ module Krikri
2
+ ##
3
+ # Descriptive Metadata for OriginalRecord
4
+ class OriginalRecordMetadata < ActiveTriples::Resource
5
+ include Krikri::Ldp::RdfSource
6
+
7
+ property :wasGeneratedBy, predicate: RDF::PROV.wasGeneratedBy
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ module Krikri
2
+ class Parser
3
+
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Krikri::Parsers
2
+
3
+ class XmlParser
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ module Krikri
2
+ class QAReport
3
+ class << self
4
+ def all
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ <% # krikri/qa_records/index %>
2
+
3
+ <% content_for :title do %>Institutions<% 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)
@@ -0,0 +1,3 @@
1
+ ---
2
+ marmotta:
3
+ base: 'http://localhost:8080/marmotta/'
@@ -0,0 +1,11 @@
1
+ class AddQaReport < ActiveRecord::Migration
2
+ def change
3
+ create_table :qa_report do |t|
4
+ t.text :field_report, limit: nil
5
+ t.text :count_report, limit: nil
6
+ t.string :provider, primary_key: true
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -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,4 @@
1
+ module Krikri::LDP
2
+ module NRSource
3
+ end
4
+ 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
@@ -115,7 +115,7 @@ module Krikri
115
115
  get_label(creator)
116
116
  end
117
117
 
118
- set_value(sr, :description, parent_sr.description, true)
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,4 @@
1
+ module Krikri
2
+ module OaiHeaders
3
+ end
4
+ end
@@ -0,0 +1,2 @@
1
+ module Krikri
2
+ class XmlParser < Krikri::Parser
@@ -0,0 +1,4 @@
1
+ module Krikri
2
+ module OaiParserHeaders
3
+ end
4
+ 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