krikri 0.7.6 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) 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/field_value_reports_controller.rb +21 -0
  5. data/app/controllers/krikri/qa_reports_controller.rb~ +18 -0
  6. data/app/controllers/krikri/reports_controller.rb +1 -0
  7. data/app/models/krikri/active_model_base.rb +36 -0
  8. data/app/models/krikri/field_value_report.rb +124 -0
  9. data/app/models/krikri/harvesters/oai_harvester.rb~ +10 -0
  10. data/app/models/krikri/original_record_desc.rb~ +6 -0
  11. data/app/models/krikri/original_record_metadata.rb~ +9 -0
  12. data/app/models/krikri/parser.rb~ +5 -0
  13. data/app/models/krikri/parsers/xml_parser.rb~ +5 -0
  14. data/app/models/krikri/provider.rb +23 -36
  15. data/app/models/krikri/qa_report.rb~ +7 -0
  16. data/app/views/krikri/field_value_reports/show.csv.erb +1 -0
  17. data/app/views/krikri/qa_reports/index.html.erb~ +3 -0
  18. data/app/views/krikri/qa_reports/show.html.erb~ +1 -0
  19. data/app/views/krikri/reports/_field_value_report_list.html.erb +14 -0
  20. data/app/views/krikri/reports/index.html.erb +1 -1
  21. data/config/initializers/config.rb~ +19 -0
  22. data/config/routes.rb +3 -1
  23. data/config/settings/test.yml~ +3 -0
  24. data/db/migrate/20150328035550_add_qa_report.rb~ +11 -0
  25. data/lib/krikri/enrichments/remove_empty_fields.rb +1 -1
  26. data/lib/krikri/enrichments/strip_ending_punctuation.rb +1 -1
  27. data/lib/krikri/ldp/container.rb~ +22 -0
  28. data/lib/krikri/ldp/nr_source.rb~ +4 -0
  29. data/lib/krikri/ldp/rdf_source.rb~ +24 -0
  30. data/lib/krikri/ldp/resource.rb~ +49 -0
  31. data/lib/krikri/parsers/json_parser.rb~ +17 -0
  32. data/lib/krikri/parsers/oai_headers.rb~ +4 -0
  33. data/lib/krikri/parsers/oai_parser.rb~ +2 -0
  34. data/lib/krikri/parsers/oai_parser_headers.rb~ +4 -0
  35. data/lib/krikri/parsers/xml_parser.rb~ +61 -0
  36. data/lib/krikri/util/edtf_converter.rb~ +26 -0
  37. data/lib/krikri/util/extended_date_parser.rb~ +70 -0
  38. data/lib/krikri/version.rb +1 -1
  39. data/lib/tasks/jetty.rake~ +12 -0
  40. data/lib/tasks/krikri.rake~ +20 -0
  41. data/spec/controllers/application_controller_spec.rb~ +11 -0
  42. data/spec/controllers/field_value_reports_controller_spec.rb +34 -0
  43. data/spec/controllers/qa_reports_controller_spec.rb~ +15 -0
  44. data/spec/controllers/records_controller_spec.rb~ +11 -0
  45. data/spec/controllers/reports_controller_spec.rb +8 -0
  46. data/spec/controllers/reports_controller_spec.rb~ +6 -0
  47. data/spec/controllers/validation_reports_controller_spec.rb~ +15 -0
  48. data/spec/factories/krikri_original_record.rb~ +5 -0
  49. data/spec/factories/krikri_provider.rb~ +7 -0
  50. data/spec/factories/krikri_provider_spec.rb~ +7 -0
  51. data/spec/factories/krikri_qa_report.rb~ +8 -0
  52. data/spec/helpers/krikri/application_helper_spec.rb~ +16 -0
  53. data/spec/internal/Gemfile +3 -3
  54. data/spec/internal/Gemfile.lock +43 -43
  55. data/spec/internal/app/assets/javascripts/application.js +1 -1
  56. data/spec/internal/config/initializers/blacklight_initializer.rb +1 -1
  57. data/spec/internal/config/initializers/devise.rb +2 -2
  58. data/spec/internal/config/secrets.yml +2 -2
  59. data/spec/internal/db/development.sqlite3 +0 -0
  60. data/spec/internal/db/migrate/{20150624142132_devise_create_users.rb → 20150728182004_devise_create_users.rb} +0 -0
  61. data/spec/internal/db/migrate/{20150624142208_create_searches.blacklight.rb → 20150728182026_create_searches.blacklight.rb} +0 -0
  62. data/spec/internal/db/migrate/{20150624142209_create_bookmarks.blacklight.rb → 20150728182027_create_bookmarks.blacklight.rb} +0 -0
  63. data/spec/internal/db/migrate/{20150624142210_add_polymorphic_type_to_bookmarks.blacklight.rb → 20150728182028_add_polymorphic_type_to_bookmarks.blacklight.rb} +0 -0
  64. data/spec/internal/db/schema.rb +1 -1
  65. data/spec/internal/db/test.sqlite3 +0 -0
  66. data/spec/internal/lib/generators/test_app_generator.rb~ +14 -0
  67. data/spec/internal/log/development.log +73 -73
  68. data/spec/internal/log/test.log +108986 -3604
  69. data/spec/krikri_spec.rb~ +30 -0
  70. data/spec/ldp/active_triples_spec.rb~ +15 -0
  71. data/spec/ldp/at_resource_spec.rb~ +41 -0
  72. data/spec/ldp/nr_source_spec.rb~ +3 -0
  73. data/spec/ldp/rdf_source_spec.rb~ +4 -0
  74. data/spec/ldp/resource_spec.rb~ +49 -0
  75. data/spec/lib/krikri/enrichment_agent_spec.rb~ +4 -0
  76. data/spec/lib/krikri/enrichments/remove_empty_fields_spec.rb +5 -0
  77. data/spec/lib/krikri/enrichments/strip_ending_punctuation_spec.rb +8 -0
  78. data/spec/lib/krikri/harvesters/api_harvester_spec.rb~ +47 -0
  79. data/spec/lib/krikri/harvesters/basic_save_behavior_spec.rb~ +12 -0
  80. data/spec/lib/krikri/harvesters/file_harvester_spec.rb~ +3 -0
  81. data/spec/lib/krikri/harvesters/harvest_behavior_spec.rb~ +5 -0
  82. data/spec/lib/krikri/harvesters/mdl_api_harvester_spec.rb~ +11 -0
  83. data/spec/lib/krikri/harvesters/mdl_harvester_spec.rb~ +8 -0
  84. data/spec/lib/krikri/harvesters/oai_skip_deleted_behavior.rb~ +7 -0
  85. data/spec/lib/krikri/harvesters/oai_skip_deleted_behavior_spec.rb~ +15 -0
  86. data/spec/lib/krikri/id_service_spec.rb~ +3 -0
  87. data/spec/lib/krikri/job_spec.rb~ +13 -0
  88. data/spec/lib/krikri/map_crosswalk_spec.rb~ +5 -0
  89. data/spec/lib/krikri/mapper_agent_spec.rb~ +64 -0
  90. data/spec/lib/krikri/mapper_spec.rb~ +5 -0
  91. data/spec/lib/krikri/mapping_dsl/parser_methods_spec.rb~ +65 -0
  92. data/spec/lib/krikri/mapping_dsl/property_declaration_spec.rb~ +87 -0
  93. data/spec/lib/krikri/mapping_dsl/rdf_subjects_spec.rb~ +16 -0
  94. data/spec/lib/krikri/mapping_dsl_spec.rb~ +10 -0
  95. data/spec/lib/krikri/mapping_job.rb~ +12 -0
  96. data/spec/lib/krikri/mapping_job_spec.rb~ +11 -0
  97. data/spec/lib/krikri/mapping_spec.rb~ +5 -0
  98. data/spec/lib/krikri/md5_minter_spec.rb~ +5 -0
  99. data/spec/lib/krikri/parser_value_array.rb~ +5 -0
  100. data/spec/lib/krikri/parsers/json_parser_spec.rb~ +17 -0
  101. data/spec/lib/krikri/parsers/xml_parser_spec.rb~ +21 -0
  102. data/spec/lib/krikri/provenance_query_client.rb~ +5 -0
  103. data/spec/lib/krikri/provenance_query_client_spec.rb~ +8 -0
  104. data/spec/lib/krikri/qa_query_client_spec.rb~ +9 -0
  105. data/spec/lib/krikri/random_search_index_docmument_builder_spec.rb~ +6 -0
  106. data/spec/lib/krikri/util/edtf_converter_spec.rb~ +17 -0
  107. data/spec/lib/krikri/util/extended_date_parser_spec.rb~ +102 -0
  108. data/spec/models/active_model_template_spec.rb +5 -0
  109. data/spec/models/activity_spec.rb~ +41 -0
  110. data/spec/models/dpla/map/aggregation_spec.rb~ +67 -0
  111. data/spec/models/field_value_report_spec.rb +85 -0
  112. data/spec/models/harvesters/oai_harvester_spec.rb~ +15 -0
  113. data/spec/models/mapper_spec.rb~ +5 -0
  114. data/spec/models/original_record_metadata_spec.rb~ +5 -0
  115. data/spec/models/original_record_spec.rb~ +5 -0
  116. data/spec/models/provider_spec.rb +27 -1
  117. data/spec/models/provider_spec.rb~ +33 -0
  118. data/spec/models/qa_report_spec.rb~ +64 -0
  119. data/spec/models/validation_report_spec.rb~ +15 -0
  120. data/spec/support/shared_contexts/indexed_item.rb~ +15 -0
  121. data/spec/support/shared_contexts/mapping_dsl.rb~ +12 -0
  122. data/spec/support/shared_contexts/provenance_query_client.rb~ +6 -0
  123. data/spec/support/shared_contexts/rake.rb~ +21 -0
  124. data/spec/support/shared_examples/enrichment.rb~ +5 -0
  125. data/spec/support/shared_examples/harvest_behavior.rb~ +13 -0
  126. data/spec/support/shared_examples/job.rb~ +20 -0
  127. data/spec/support/shared_examples/ldp_resource.rb~ +4 -0
  128. data/spec/support/shared_examples/oai_parser_headers.rb~ +12 -0
  129. data/spec/support/shared_examples/rdf_source.rb~ +1 -0
  130. data/spec/support/shared_examples/software_agent.rb~ +5 -0
  131. data/spec/support/shared_examples/string_enrichment.rb~ +12 -0
  132. data/spec/test_app_templates/lib/generators/test_app_generator.rb~ +14 -0
  133. data/spec/views/krikri/providers/index.html.erb_spec.rb~ +3 -0
  134. data/spec/views/krikri/providers/show.html.erb.spec~ +12 -0
  135. data/spec/views/krikri/providers/show.html.erb_spec.rb~ +10 -0
  136. data/spec/views/krikri/qa_reports/index.html.erb_spec.rb~ +17 -0
  137. data/spec/views/krikri/qa_reports/show.html.erb_spec.rb~ +22 -0
  138. data/spec/views/krikri/records/index.html.erb_spec.rb~ +15 -0
  139. data/spec/views/krikri/records/show.html.erb_spec.rb~ +8 -0
  140. data/spec/views/krikri/reports/index.html.erb_spec.rb +5 -0
  141. data/spec/views/krikri/reports/index.html.erb_spec.rb~ +5 -0
  142. data/spec/webmocks/oai.rb~ +13 -0
  143. metadata +351 -459
  144. data/spec/dummy/db/development.sqlite3 +0 -0
  145. data/spec/dummy/db/test.sqlite3 +0 -0
  146. data/spec/dummy/log/development.log +0 -207
  147. data/spec/internal/tmp/cache/318/301/krikri%2Fapplication_helper%2Favailable_providers +0 -0
  148. data/spec/internal/tmp/cache/assets/test/sass/6449c927c92ef1ea4378c66161e3b0efe1bf954d/_bootstrap-sprockets.scssc +0 -0
  149. data/spec/internal/tmp/cache/assets/test/sass/6449c927c92ef1ea4378c66161e3b0efe1bf954d/_bootstrap.scssc +0 -0
  150. data/spec/internal/tmp/cache/assets/test/sass/71fba6bdfa89d88fe8a72b36eafd3b91cf10a6d0/blacklight.css.scssc +0 -0
  151. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_alerts.scssc +0 -0
  152. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_background-variant.scssc +0 -0
  153. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_border-radius.scssc +0 -0
  154. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_buttons.scssc +0 -0
  155. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_center-block.scssc +0 -0
  156. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_clearfix.scssc +0 -0
  157. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_forms.scssc +0 -0
  158. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_gradients.scssc +0 -0
  159. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_grid-framework.scssc +0 -0
  160. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_grid.scssc +0 -0
  161. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_hide-text.scssc +0 -0
  162. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_image.scssc +0 -0
  163. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_labels.scssc +0 -0
  164. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_list-group.scssc +0 -0
  165. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_nav-divider.scssc +0 -0
  166. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_nav-vertical-align.scssc +0 -0
  167. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_opacity.scssc +0 -0
  168. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_pagination.scssc +0 -0
  169. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_panels.scssc +0 -0
  170. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_progress-bar.scssc +0 -0
  171. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_reset-filter.scssc +0 -0
  172. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_resize.scssc +0 -0
  173. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_responsive-visibility.scssc +0 -0
  174. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_size.scssc +0 -0
  175. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_tab-focus.scssc +0 -0
  176. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_table-row.scssc +0 -0
  177. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_text-emphasis.scssc +0 -0
  178. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_text-overflow.scssc +0 -0
  179. data/spec/internal/tmp/cache/assets/test/sass/75eb48b5361d55a8133e0091d663a085dacee3c5/_vendor-prefixes.scssc +0 -0
  180. data/spec/internal/tmp/cache/assets/test/sass/78e0580c292179fc5fdd7b74b703dad1702b4176/_blacklight_base.scssc +0 -0
  181. data/spec/internal/tmp/cache/assets/test/sass/78e0580c292179fc5fdd7b74b703dad1702b4176/_bookmark.scssc +0 -0
  182. data/spec/internal/tmp/cache/assets/test/sass/78e0580c292179fc5fdd7b74b703dad1702b4176/_catalog.scssc +0 -0
  183. data/spec/internal/tmp/cache/assets/test/sass/78e0580c292179fc5fdd7b74b703dad1702b4176/_facets.scssc +0 -0
  184. data/spec/internal/tmp/cache/assets/test/sass/78e0580c292179fc5fdd7b74b703dad1702b4176/_group.scssc +0 -0
  185. data/spec/internal/tmp/cache/assets/test/sass/78e0580c292179fc5fdd7b74b703dad1702b4176/_header.scssc +0 -0
  186. data/spec/internal/tmp/cache/assets/test/sass/78e0580c292179fc5fdd7b74b703dad1702b4176/_layout.scssc +0 -0
  187. data/spec/internal/tmp/cache/assets/test/sass/78e0580c292179fc5fdd7b74b703dad1702b4176/_modal.scssc +0 -0
  188. data/spec/internal/tmp/cache/assets/test/sass/78e0580c292179fc5fdd7b74b703dad1702b4176/_search_history.scssc +0 -0
  189. data/spec/internal/tmp/cache/assets/test/sass/78e0580c292179fc5fdd7b74b703dad1702b4176/blacklight.scssc +0 -0
  190. data/spec/internal/tmp/cache/assets/test/sass/78e0580c292179fc5fdd7b74b703dad1702b4176/blacklight_defaults.scssc +0 -0
  191. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_alerts.scssc +0 -0
  192. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_badges.scssc +0 -0
  193. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_breadcrumbs.scssc +0 -0
  194. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_button-groups.scssc +0 -0
  195. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_buttons.scssc +0 -0
  196. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_carousel.scssc +0 -0
  197. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_close.scssc +0 -0
  198. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_code.scssc +0 -0
  199. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_component-animations.scssc +0 -0
  200. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_dropdowns.scssc +0 -0
  201. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_forms.scssc +0 -0
  202. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_glyphicons.scssc +0 -0
  203. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_grid.scssc +0 -0
  204. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_input-groups.scssc +0 -0
  205. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_jumbotron.scssc +0 -0
  206. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_labels.scssc +0 -0
  207. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_list-group.scssc +0 -0
  208. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_media.scssc +0 -0
  209. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_mixins.scssc +0 -0
  210. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_modals.scssc +0 -0
  211. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_navbar.scssc +0 -0
  212. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_navs.scssc +0 -0
  213. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_normalize.scssc +0 -0
  214. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_pager.scssc +0 -0
  215. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_pagination.scssc +0 -0
  216. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_panels.scssc +0 -0
  217. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_popovers.scssc +0 -0
  218. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_print.scssc +0 -0
  219. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_progress-bars.scssc +0 -0
  220. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_responsive-embed.scssc +0 -0
  221. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_responsive-utilities.scssc +0 -0
  222. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_scaffolding.scssc +0 -0
  223. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_tables.scssc +0 -0
  224. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_thumbnails.scssc +0 -0
  225. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_tooltip.scssc +0 -0
  226. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_type.scssc +0 -0
  227. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_utilities.scssc +0 -0
  228. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_variables.scssc +0 -0
  229. data/spec/internal/tmp/cache/assets/test/sass/f79e9f3544f6b8d5f7ca05529260dceec8dd44ed/_wells.scssc +0 -0
  230. data/spec/internal/tmp/cache/assets/test/sprockets/05604ccd7329b6afb8e7cdafbaa09fe3 +0 -0
  231. data/spec/internal/tmp/cache/assets/test/sprockets/0b3850cd2568d76d8583e8e6bffa44d9 +0 -0
  232. data/spec/internal/tmp/cache/assets/test/sprockets/0dffbe192bade10cf2b568c73695e96e +0 -0
  233. data/spec/internal/tmp/cache/assets/test/sprockets/0e349883625d7536c00fac0eafde4415 +0 -0
  234. data/spec/internal/tmp/cache/assets/test/sprockets/0f05dd42159c418ddcfa12edd10d98bb +0 -0
  235. data/spec/internal/tmp/cache/assets/test/sprockets/11b7eeb5da37de1c315d886349adbc98 +0 -0
  236. data/spec/internal/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  237. data/spec/internal/tmp/cache/assets/test/sprockets/16648e86ab6ef2950f3630ff0d566409 +0 -0
  238. data/spec/internal/tmp/cache/assets/test/sprockets/1877c8233ee501d08788d7324a70bd70 +0 -0
  239. data/spec/internal/tmp/cache/assets/test/sprockets/1c814c5c5dfd63768fff312c442847d6 +0 -0
  240. data/spec/internal/tmp/cache/assets/test/sprockets/1e699d4d1e439eeb1d52a210573f5053 +0 -0
  241. data/spec/internal/tmp/cache/assets/test/sprockets/2c58fb6a2406edc8067b46ee33af7262 +0 -0
  242. data/spec/internal/tmp/cache/assets/test/sprockets/2d0220441d85355dcd9ade523f95c048 +0 -0
  243. data/spec/internal/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  244. data/spec/internal/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  245. data/spec/internal/tmp/cache/assets/test/sprockets/39ed74e4d194593ec48c481d0fd76007 +0 -0
  246. data/spec/internal/tmp/cache/assets/test/sprockets/40271adcb3c4654dcb20b55abc2505c9 +0 -0
  247. data/spec/internal/tmp/cache/assets/test/sprockets/402ffe46f4586abacce366e0e3f690d8 +0 -0
  248. data/spec/internal/tmp/cache/assets/test/sprockets/42ea718e494af5b51ce031822614b04d +0 -0
  249. data/spec/internal/tmp/cache/assets/test/sprockets/46ec3d34d3576e4452b0a95b87176996 +0 -0
  250. data/spec/internal/tmp/cache/assets/test/sprockets/4c5e3966eae6a44e852dcf449c3f4cb0 +0 -0
  251. data/spec/internal/tmp/cache/assets/test/sprockets/52ce034583a746333fd7b8aa3916b8e1 +0 -0
  252. data/spec/internal/tmp/cache/assets/test/sprockets/52fe40fddbd8e73f6743866d4930bde6 +0 -0
  253. data/spec/internal/tmp/cache/assets/test/sprockets/53329c49c9b4ba25d31c73c9b98260b0 +0 -0
  254. data/spec/internal/tmp/cache/assets/test/sprockets/59b1fd64c6fc18a82465ad6fdc7094fa +0 -0
  255. data/spec/internal/tmp/cache/assets/test/sprockets/5eee68b0bfc10789f399d54d385856f6 +0 -0
  256. data/spec/internal/tmp/cache/assets/test/sprockets/677fd27eda24da657f51d725742582f3 +0 -0
  257. data/spec/internal/tmp/cache/assets/test/sprockets/6b2c5572f9e2cd322ad7b2878673d0dd +0 -0
  258. data/spec/internal/tmp/cache/assets/test/sprockets/735621cd88de5e37980cced4fb13ded9 +0 -0
  259. data/spec/internal/tmp/cache/assets/test/sprockets/7e4f29f7a7327f10677cd047be78cf8a +0 -0
  260. data/spec/internal/tmp/cache/assets/test/sprockets/7f804c48c333d9758fa49ff9331b78e2 +0 -0
  261. data/spec/internal/tmp/cache/assets/test/sprockets/806c560c2f6e89ba0ad39561804ff79c +0 -0
  262. data/spec/internal/tmp/cache/assets/test/sprockets/809bfad10edab5da465f5f5872ad94cc +0 -0
  263. data/spec/internal/tmp/cache/assets/test/sprockets/82dd05a187bccd30f62fabb16491fe03 +0 -0
  264. data/spec/internal/tmp/cache/assets/test/sprockets/82de1c42365fd1cf6a2adc2f644150c1 +0 -0
  265. data/spec/internal/tmp/cache/assets/test/sprockets/857d45eb67a43a30a6d5d0370464e596 +0 -0
  266. data/spec/internal/tmp/cache/assets/test/sprockets/8da6b6aafe413b1ba635e82f71c194be +0 -0
  267. data/spec/internal/tmp/cache/assets/test/sprockets/8ea9ff17090b736331312d04c8036810 +0 -0
  268. data/spec/internal/tmp/cache/assets/test/sprockets/8fad7abbbfbb3748b36d73dfb482c2bd +0 -0
  269. data/spec/internal/tmp/cache/assets/test/sprockets/9181f512b689ddb01d6778bac83791ac +0 -0
  270. data/spec/internal/tmp/cache/assets/test/sprockets/92c82efebbff4c3a9f96e08b308e92dd +0 -0
  271. data/spec/internal/tmp/cache/assets/test/sprockets/93aaa9231a32901266b05632f3d35ecd +0 -0
  272. data/spec/internal/tmp/cache/assets/test/sprockets/93dd91f6519f569f11fddf4df22460d9 +0 -0
  273. data/spec/internal/tmp/cache/assets/test/sprockets/9443255223294f7ad9ad6daba446afc3 +0 -0
  274. data/spec/internal/tmp/cache/assets/test/sprockets/96ff03d6a5f9604c6980874bb00c1d17 +0 -0
  275. data/spec/internal/tmp/cache/assets/test/sprockets/9ca9885875e2e0ab4e531cba60aa03e5 +0 -0
  276. data/spec/internal/tmp/cache/assets/test/sprockets/a13d3a27038cf6570d22b54c54442642 +0 -0
  277. data/spec/internal/tmp/cache/assets/test/sprockets/aa92d8a74950d2d6217a51424ce4b33b +0 -0
  278. data/spec/internal/tmp/cache/assets/test/sprockets/ad4a54c43c2a4c3874bfde1c9f08c248 +0 -0
  279. data/spec/internal/tmp/cache/assets/test/sprockets/b146aa842b38c17ed4117b2f52d4b51f +0 -0
  280. data/spec/internal/tmp/cache/assets/test/sprockets/b37776526b5809e55fbb0add6d059127 +0 -0
  281. data/spec/internal/tmp/cache/assets/test/sprockets/b6d54919d5e4a3921287a5fb178dc455 +0 -0
  282. data/spec/internal/tmp/cache/assets/test/sprockets/c514fd002d57ddf3d94669e369d45283 +0 -0
  283. data/spec/internal/tmp/cache/assets/test/sprockets/cc2c4b7bdb6167f64e3e25d282c318ff +0 -0
  284. data/spec/internal/tmp/cache/assets/test/sprockets/cd59839c2fc0d494ffa76ef4c4dbfa42 +0 -0
  285. data/spec/internal/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  286. data/spec/internal/tmp/cache/assets/test/sprockets/d32e733978c8eb7c7db3ec2b865ee87f +0 -0
  287. data/spec/internal/tmp/cache/assets/test/sprockets/d6995317fba3b6344c75db70b8c997e2 +0 -0
  288. data/spec/internal/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  289. data/spec/internal/tmp/cache/assets/test/sprockets/d7bf17ad1471147b5314b4dda0bad9fe +0 -0
  290. data/spec/internal/tmp/cache/assets/test/sprockets/e6a1afebb687728d619fe27e84335d2f +0 -0
  291. data/spec/internal/tmp/cache/assets/test/sprockets/e83c10c393da1c028c7d4217ecfc9c03 +0 -0
  292. data/spec/internal/tmp/cache/assets/test/sprockets/f64fd792a429f69332c1489015953219 +0 -0
  293. data/spec/internal/tmp/cache/assets/test/sprockets/f7a87683461c3a58ee9b6e9546473c4e +0 -0
  294. data/spec/internal/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  295. data/spec/internal/tmp/cache/assets/test/sprockets/fed76e6bd857a06488c186874bbe2bb2 +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7201a4fbfc0b94c3f5f6fca1705681f31dbd4eb
4
- data.tar.gz: 729f1451596fe611c644ea81557e1bbdc1a2adb2
3
+ metadata.gz: ad17bc3b4f055517e8aff27ba12b45a4c1639903
4
+ data.tar.gz: bbf4193141bc931d5b28c4b0d3b20f179e409665
5
5
  SHA512:
6
- metadata.gz: 63202230aa9760b1136860afe2932723dd36a09da2f10a3292d59102d9b3893d4ca1b4164c8d56e6b558e5edda83af9b237b6f04c676f166e7d41a8eab07ccb3
7
- data.tar.gz: f0be5d7d562cd1586c4b9ac705d22680ffed35627ad6a6d14ed7cdb60f7f14ba36d49f6f696a03cdf59d514656d1c22914e1d126270d2dc8366bd30b6412e4a8
6
+ metadata.gz: 4da334a69fde7f3bd29a9e21950d25b48182b4e44067c1cd8174dcbc813f37c7cc7f6383781c7e31ec8913cf262f383201b39900a0a04072d577805b7959012c
7
+ data.tar.gz: ed2ccce206e5b347066e0d7f39f0ddc53731605357c17e74a2350227683b281dfb7867abca80afc82baaa216cc8a86ebe54c6134a482c21464f13d99b27937a3
@@ -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,21 @@
1
+ module Krikri
2
+ ##
3
+ # Handles HTTP requests for Field Value Reports
4
+ #
5
+ # @see Krikri::FieldValueReport
6
+ class FieldValueReportsController < ApplicationController
7
+ ##
8
+ # Renders the show view for the field value report, given by a compound key.
9
+ # The compound key is comprised by the field value report's field
10
+ # (represented by the route's id param) and the provider's id.
11
+
12
+ def show
13
+ @field_value_report = Krikri::FieldValueReport.find(params[:id],
14
+ params[:provider_id])
15
+
16
+ respond_to do |format|
17
+ format.csv
18
+ end
19
+ end
20
+ end
21
+ 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
@@ -15,6 +15,7 @@ module Krikri
15
15
  @validation_reports = report.all
16
16
 
17
17
  if @current_provider
18
+ @provider = Krikri::Provider.find(@current_provider)
18
19
  @qa_reports = Array(Krikri::QAReport.find_by(provider: @current_provider))
19
20
  else
20
21
  @qa_reports = Krikri::QAReport.all
@@ -0,0 +1,36 @@
1
+ module Krikri
2
+ ##
3
+ # ActiveModelBase is a Superclass for ActiveModel objects.
4
+ class ActiveModelBase
5
+ include ActiveModel::Conversion
6
+ include ActiveModel::Dirty
7
+ include ActiveModel::Validations
8
+ extend ActiveModel::Naming
9
+
10
+ ##
11
+ # Initializes a Krikri::ActiveModelBase object.
12
+ #
13
+ # @param attributes [Hash]
14
+ #
15
+ # @raise [NoMethodError] if the params Hash includes a key that does not
16
+ # match any of the Class's writeable attributes.
17
+ #
18
+ # @example
19
+ # Given: MyActiveModel is a subclass of ActiveModelBase
20
+ # Given: :name is a writeable attribute of MyActiveModel
21
+ # MyActiveModel.new({ :name => 'value' })
22
+ #
23
+ # @return [Krikri::ActiveModelBase]
24
+ def initialize(attributes = {})
25
+ attributes.each do |name, value|
26
+ send("#{name}=", value)
27
+ end
28
+ end
29
+
30
+ ##
31
+ # Required ActiveModel method.
32
+ def persisted?
33
+ false
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,124 @@
1
+ module Krikri
2
+ ##
3
+ # FieldValueReport gives all unique values for a given field within a
4
+ # document. It represents data that has been indexed into Solr.
5
+ #
6
+ # This is a read-only object. FieldValueReports are not persisted.
7
+ class FieldValueReport < Krikri::ActiveModelBase
8
+ ##
9
+ # @!attribute :field [String] the name of the field.
10
+ # @example: 'sourceResource_title'
11
+ #
12
+ # @!attribute :provider [Krikri::Provider]
13
+ attr_accessor :field, :provider
14
+
15
+ ##
16
+ # @param field [String] the name of the field being reported on
17
+ # @example: 'sourceResource_title'
18
+ # @param provider_id [String] the id of the provider being reported on
19
+ # These two params act as a compound key.
20
+ #
21
+ # @return [Krikri::FieldValueReport]
22
+ def self.find(field, provider_id)
23
+ return nil unless fields.include? field.to_sym
24
+ provider = Krikri::Provider.find(provider_id)
25
+ return nil unless provider.present?
26
+ new({ :field => field,
27
+ :provider => provider })
28
+ end
29
+
30
+ ##
31
+ # All of the fields for which a report can be created.
32
+ def self.fields
33
+ [:dataProvider_providedLabel,
34
+ :sourceResource_alternative_providedLabel,
35
+ :sourceResource_collection_title,
36
+ :sourceResource_contributor_providedLabel,
37
+ :sourceResource_creator_providedLabel,
38
+ :sourceResource_date_providedLabel,
39
+ :sourceResource_description,
40
+ :sourceResource_format,
41
+ :sourceResource_genre_providedLabel,
42
+ :sourceResource_language_providedLabel,
43
+ :sourceResource_publisher_providedLabel,
44
+ :sourceResource_rights,
45
+ :sourceResource_rightsHolder_providedLabel,
46
+ :sourceResource_spatial_providedLabel,
47
+ :sourceResource_subject_providedLabel,
48
+ :sourceResource_temporal,
49
+ :sourceResource_title,
50
+ :sourceResource_type_name]
51
+ end
52
+
53
+ ##
54
+ # The headers for the report table, and the values to be returned from a
55
+ # Solr query.
56
+ def headers
57
+ [:id, :isShownAt_id, field.to_sym]
58
+ end
59
+
60
+ ##
61
+ # @param opts [Hash] optional parameters for the solr request
62
+ # @example: enumerate_rows(batch_size: 1000)
63
+ #
64
+ # @return Enumerator[<Array>] an enumerator over the rows
65
+ def enumerate_rows(opts = {})
66
+ Enumerator.new do |yielder|
67
+ loop do
68
+ opts = query_opts(opts)
69
+ response = Krikri::SolrResponseBuilder.new(opts).response
70
+ break if response.docs.empty?
71
+
72
+ parse_solr_response(response).each do |row|
73
+ yielder << headers.map { |header| row[header] }
74
+ end
75
+
76
+ opts[:start] += opts[:batch_size]
77
+ break if opts[:start] >= response.total
78
+ end
79
+ end
80
+ end
81
+
82
+ private
83
+
84
+ ##
85
+ # @param opts [Hash] additional options for the query params
86
+ # @return [Hash] parameters for a Solr request
87
+ def query_opts(opts = {})
88
+ { :fq => "provider_id:\"#{provider.rdf_subject}\"",
89
+ :fl => headers,
90
+ :rows => opts.fetch(:batch_size, 1000).to_i,
91
+ :start => opts.fetch(:start, 0).to_i }
92
+ end
93
+
94
+ ##
95
+ # @param [Blacklight::SolrResponse] response
96
+ # @return [Array<Hash>]
97
+ #
98
+ # The return Hashes should include keys for all headers defined in the
99
+ # :headers method
100
+ def parse_solr_response(response)
101
+ rows = []
102
+
103
+ response.docs.each do |doc|
104
+ id = doc['id'].split('/').last
105
+ isShownAt_id = doc['isShownAt_id'].respond_to?(:first) ?
106
+ doc['isShownAt_id'].first : '__MISSING__'
107
+
108
+ if doc[field].present?
109
+ doc[field].each do |value|
110
+ rows << { :id => id,
111
+ field.to_sym => value,
112
+ :isShownAt_id => isShownAt_id }
113
+ end
114
+ else
115
+ rows << { :id => id,
116
+ field.to_sym => '__MISSING__',
117
+ :isShownAt_id => isShownAt_id }
118
+ end
119
+ end
120
+
121
+ rows
122
+ end
123
+ end
124
+ end
@@ -0,0 +1,10 @@
1
+ module Krikri::Harvesters
2
+ class OAIHarvester < Krikri::Harvester
3
+
4
+ attr_accessor :client
5
+
6
+ def initialize(opts={})
7
+ @client = OAI::Client.new(opts[:endpoint])
8
+ end
9
+ end
10
+ 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
@@ -6,18 +6,17 @@ module Krikri
6
6
  # This is a read-only object. It does not write new providers to Solr, nor
7
7
  # does it update or delete providers.
8
8
  #
9
+ # If Provider is initialized with a valid value for :rdf_subject, the model
10
+ # can extrapolate all other attributes.
11
+ #
9
12
  # A DPLA::MAP::Agent object can be constructed from an instance of this
10
13
  # ActiveModel object using the :agent method. The DPLA::MAP::Agent object
11
14
  # interacts with Marmotta, rather than Solr.
12
15
  #
13
- # @example Krikri::Provider.find(rdf_subject: 'http://blah.com/123').agent
16
+ # @example Krikri::Provider.new(rdf_subject: 'http://blah.com/123').agent
14
17
  # => [DPLA::MAP::Agent]
15
18
  #
16
- class Provider
17
- include ActiveModel::Validations
18
- include ActiveModel::Conversion
19
- extend ActiveModel::Naming
20
-
19
+ class Provider < Krikri::ActiveModelBase
21
20
  ##
22
21
  # @!attribute :rdf_subject [String] the URI identifying the provider
23
22
  # @example: "http://blah.com/contributor/123"
@@ -29,29 +28,10 @@ module Krikri
29
28
  #
30
29
  # @!attribute :agent [DPLA::MAP::Agent] an ActiveTriples representation of
31
30
  # the provider, read from Marmotta.
32
- attr_accessor :rdf_subject, :name
33
- attr_reader :agent, :id
34
-
35
- ##
36
- # Initializes a Provider object.
37
- #
38
- # @param attributes [Hash]
39
- # If the params Hash contains a valid value for :rdf_subject, the model can
40
- # extrapolate all other attributes.
41
31
  #
42
- # @example
43
- # Krikri::Provider.new({ rdf_subject: 'http:://blah.com/contributor/123',
44
- # name: 'Moomin Valley Historical Society' })
45
- #
46
- # @raise [NoMethodError] if the params Hash includes a key that does not
47
- # match listed attr_accessors
48
- #
49
- # @return [<Krikri::Provider>]
50
- def initialize(attributes = {})
51
- attributes.each do |name, value|
52
- send("#{name}=", value)
53
- end
54
- end
32
+ # @!attribute :field_value_reports [Array<Krikri::FieldValueReport>]
33
+ attr_accessor :rdf_subject, :name, :field_value_reports
34
+ attr_reader :agent, :id
55
35
 
56
36
  ##
57
37
  # Gives a list of all providers, ignoring those with no URI (bnodes).
@@ -69,7 +49,8 @@ module Krikri
69
49
 
70
50
  response.facet_pivot['provider_id,provider_name'].map do |facet|
71
51
  rdf_subject = facet['value']
72
- name = facet['pivot'].present? ? facet['pivot'].first['value'] : nil
52
+ name = facet['pivot'].present? ? facet['pivot'].first['value'] :
53
+ rdf_subject
73
54
  provider = new({ :rdf_subject => rdf_subject, :name => name })
74
55
  provider.valid_rdf_subject? ? provider : nil
75
56
  end.compact
@@ -89,8 +70,10 @@ module Krikri
89
70
  :fl => 'provider_id provider_name' }
90
71
  response = Krikri::SolrResponseBuilder.new(query_params).response
91
72
  return nil unless response.docs.count > 0
73
+ name = response.docs.first['provider_name'].respond_to?(:first) ?
74
+ response.docs.first['provider_name'].first : rdf_subject
92
75
  new({ :rdf_subject => rdf_subject,
93
- :name => response.docs.first['provider_name'].first })
76
+ :name => name })
94
77
  end
95
78
 
96
79
  ##
@@ -113,6 +96,10 @@ module Krikri
113
96
  @agent ||= initialize_agent
114
97
  end
115
98
 
99
+ def field_value_reports
100
+ @field_value_reports ||= initialize_field_value_reports
101
+ end
102
+
116
103
  ##
117
104
  # Tests for providers that have valid a :rdf_subject (not a bnode).
118
105
  # A valid :rdf_subject does not necessarily match and :rdf_subject in the
@@ -122,12 +109,6 @@ module Krikri
122
109
  rdf_subject.start_with?(self.class.base_uri) ? true : false
123
110
  end
124
111
 
125
- ##
126
- # Required ActiveModel method.
127
- def persisted?
128
- false
129
- end
130
-
131
112
  private
132
113
 
133
114
  ##
@@ -170,5 +151,11 @@ module Krikri
170
151
  return nil unless valid_rdf_subject?
171
152
  DPLA::MAP::Agent.new(rdf_subject).tap { |agent| agent.label = name }
172
153
  end
154
+
155
+ def initialize_field_value_reports
156
+ Krikri::FieldValueReport.fields.map do |field|
157
+ Krikri::FieldValueReport.new({ field: field, provider: self })
158
+ end
159
+ end
173
160
  end
174
161
  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 @@
1
+ <%= @field_value_report.headers.to_csv %><% @field_value_report.enumerate_rows.each do |row| %><%= row.to_csv %><% 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,14 @@
1
+ <h3>Field Value Reports</h3>
2
+ <% if @provider.present? %>
3
+ <p>Available as CSV downloads</p>
4
+ <ul>
5
+ <% @provider.field_value_reports.each do |report| %>
6
+ <li>
7
+ <%= link_to report.field,
8
+ provider_field_value_report_path(id: report.field,
9
+ provider_id: @provider.id,
10
+ format: :csv) %>
11
+ </li>
12
+ <% end %>
13
+ </ul>
14
+ <% end %>
@@ -6,6 +6,6 @@
6
6
  <h1>Reports</h1>
7
7
  <h2><%= provider_name(@current_provider) %></h2>
8
8
  <%= render "validation_report_list" %>
9
-
9
+ <%= render "field_value_report_list" %>
10
10
  <%= render "qa_report_list" %>
11
11
  </div>