krikri 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (346) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/app/views/krikri/records/show.html.erb +3 -0
  4. data/lib/krikri.rb +7 -7
  5. data/lib/krikri/harvester.rb +10 -0
  6. data/lib/krikri/job.rb +6 -5
  7. data/lib/krikri/mapper.rb +20 -2
  8. data/lib/krikri/mapping_dsl/parser_methods.rb +14 -0
  9. data/lib/krikri/parser.rb +51 -1
  10. data/lib/krikri/parsers/oai_dc_parser.rb +2 -0
  11. data/lib/krikri/parsers/oai_parser_headers.rb +20 -0
  12. data/lib/krikri/random_record_generator.rb +19 -0
  13. data/lib/krikri/search_results_helper_behavior.rb +5 -1
  14. data/lib/krikri/software_agent.rb +30 -12
  15. data/lib/krikri/version.rb +1 -1
  16. data/lib/tasks/jetty.rake +9 -5
  17. data/spec/dummy/db/development.sqlite3 +0 -0
  18. data/spec/dummy/db/test.sqlite3 +0 -0
  19. data/spec/dummy/log/development.log +207 -0
  20. data/spec/internal/Gemfile +2 -3
  21. data/spec/internal/Gemfile.lock +35 -33
  22. data/spec/internal/config/initializers/blacklight_initializer.rb +1 -1
  23. data/spec/internal/config/initializers/devise.rb +2 -2
  24. data/spec/internal/config/secrets.yml +2 -2
  25. data/spec/internal/db/development.sqlite3 +0 -0
  26. data/spec/internal/db/migrate/{20150206214156_devise_create_users.rb → 20150220192723_devise_create_users.rb} +0 -0
  27. data/spec/internal/db/migrate/{20150206214213_create_searches.blacklight.rb → 20150220192807_create_searches.blacklight.rb} +0 -0
  28. data/spec/internal/db/migrate/{20150206214214_create_bookmarks.blacklight.rb → 20150220192808_create_bookmarks.blacklight.rb} +0 -0
  29. data/spec/internal/db/migrate/{20150206214215_add_polymorphic_type_to_bookmarks.blacklight.rb → 20150220192809_add_polymorphic_type_to_bookmarks.blacklight.rb} +0 -0
  30. data/spec/internal/db/schema.rb +1 -1
  31. data/spec/internal/db/test.sqlite3 +0 -0
  32. data/spec/internal/log/development.log +411 -68
  33. data/spec/internal/tmp/cache/assets/{test/sass/93e201cf4a11978a1f491a057a3bd569c3825210 → development/sass/71fba6bdfa89d88fe8a72b36eafd3b91cf10a6d0}/blacklight.css.scssc +0 -0
  34. data/spec/internal/tmp/cache/assets/{test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282 → development/sass/78e0580c292179fc5fdd7b74b703dad1702b4176}/_blacklight_base.scssc +0 -0
  35. data/spec/internal/tmp/cache/assets/{test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282 → development/sass/78e0580c292179fc5fdd7b74b703dad1702b4176}/_bookmark.scssc +0 -0
  36. data/spec/internal/tmp/cache/assets/{test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282 → development/sass/78e0580c292179fc5fdd7b74b703dad1702b4176}/_catalog.scssc +0 -0
  37. data/spec/internal/tmp/cache/assets/{test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282 → development/sass/78e0580c292179fc5fdd7b74b703dad1702b4176}/_facets.scssc +0 -0
  38. data/spec/internal/tmp/cache/assets/{test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282 → development/sass/78e0580c292179fc5fdd7b74b703dad1702b4176}/_group.scssc +0 -0
  39. data/spec/internal/tmp/cache/assets/{test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282 → development/sass/78e0580c292179fc5fdd7b74b703dad1702b4176}/_header.scssc +0 -0
  40. data/spec/internal/tmp/cache/assets/{test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282 → development/sass/78e0580c292179fc5fdd7b74b703dad1702b4176}/_layout.scssc +0 -0
  41. data/spec/internal/tmp/cache/assets/{test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282 → development/sass/78e0580c292179fc5fdd7b74b703dad1702b4176}/_modal.scssc +0 -0
  42. data/spec/internal/tmp/cache/assets/{test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282 → development/sass/78e0580c292179fc5fdd7b74b703dad1702b4176}/_search_history.scssc +0 -0
  43. data/spec/internal/tmp/cache/assets/{test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282 → development/sass/78e0580c292179fc5fdd7b74b703dad1702b4176}/blacklight.scssc +0 -0
  44. data/spec/internal/tmp/cache/assets/{test/sass/ca8c12d03785e0d6cd4554f4d3939e7836d38282 → development/sass/78e0580c292179fc5fdd7b74b703dad1702b4176}/blacklight_defaults.scssc +0 -0
  45. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_alerts.scssc +0 -0
  46. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_badges.scssc +0 -0
  47. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_breadcrumbs.scssc +0 -0
  48. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_button-groups.scssc +0 -0
  49. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_buttons.scssc +0 -0
  50. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_carousel.scssc +0 -0
  51. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_close.scssc +0 -0
  52. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_code.scssc +0 -0
  53. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_component-animations.scssc +0 -0
  54. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_dropdowns.scssc +0 -0
  55. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_forms.scssc +0 -0
  56. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_glyphicons.scssc +0 -0
  57. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_grid.scssc +0 -0
  58. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_input-groups.scssc +0 -0
  59. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_jumbotron.scssc +0 -0
  60. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_labels.scssc +0 -0
  61. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_list-group.scssc +0 -0
  62. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_media.scssc +0 -0
  63. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_mixins.scssc +0 -0
  64. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_modals.scssc +0 -0
  65. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_navbar.scssc +0 -0
  66. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_navs.scssc +0 -0
  67. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_normalize.scssc +0 -0
  68. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_pager.scssc +0 -0
  69. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_pagination.scssc +0 -0
  70. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_panels.scssc +0 -0
  71. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_popovers.scssc +0 -0
  72. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_print.scssc +0 -0
  73. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_progress-bars.scssc +0 -0
  74. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_responsive-embed.scssc +0 -0
  75. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_responsive-utilities.scssc +0 -0
  76. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_scaffolding.scssc +0 -0
  77. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_tables.scssc +0 -0
  78. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_thumbnails.scssc +0 -0
  79. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_tooltip.scssc +0 -0
  80. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_type.scssc +0 -0
  81. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_utilities.scssc +0 -0
  82. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_variables.scssc +0 -0
  83. data/spec/internal/tmp/cache/assets/{test/sass/f65d96a170ed1d9ac890c97fabbd2605e6dd83f7 → development/sass/86c40011646adf02115c5f9a86cbbbe78771a7f9}/_wells.scssc +0 -0
  84. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_alerts.scssc +0 -0
  85. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_background-variant.scssc +0 -0
  86. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_border-radius.scssc +0 -0
  87. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_buttons.scssc +0 -0
  88. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_center-block.scssc +0 -0
  89. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_clearfix.scssc +0 -0
  90. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_forms.scssc +0 -0
  91. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_gradients.scssc +0 -0
  92. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_grid-framework.scssc +0 -0
  93. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_grid.scssc +0 -0
  94. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_hide-text.scssc +0 -0
  95. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_image.scssc +0 -0
  96. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_labels.scssc +0 -0
  97. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_list-group.scssc +0 -0
  98. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_nav-divider.scssc +0 -0
  99. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_nav-vertical-align.scssc +0 -0
  100. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_opacity.scssc +0 -0
  101. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_pagination.scssc +0 -0
  102. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_panels.scssc +0 -0
  103. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_progress-bar.scssc +0 -0
  104. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_reset-filter.scssc +0 -0
  105. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_resize.scssc +0 -0
  106. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_responsive-visibility.scssc +0 -0
  107. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_size.scssc +0 -0
  108. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_tab-focus.scssc +0 -0
  109. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_table-row.scssc +0 -0
  110. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_text-emphasis.scssc +0 -0
  111. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_text-overflow.scssc +0 -0
  112. data/spec/internal/tmp/cache/assets/{test/sass/6150801e42e33a1ef8211bc5bd57210113efb322 → development/sass/b0e4dc91d58228c3adf15cb753bdeb4e4010a333}/_vendor-prefixes.scssc +0 -0
  113. data/spec/internal/tmp/cache/assets/{test/sass/f4c2e42bd47363124f382d6b3accf5b68bede368 → development/sass/e2a3786e4ebe66d44f7faa2a5c1fde6ac88e9913}/_bootstrap-sprockets.scssc +0 -0
  114. data/spec/internal/tmp/cache/assets/{test/sass/f4c2e42bd47363124f382d6b3accf5b68bede368 → development/sass/e2a3786e4ebe66d44f7faa2a5c1fde6ac88e9913}/_bootstrap.scssc +0 -0
  115. data/spec/internal/tmp/cache/assets/development/sprockets/0b3850cd2568d76d8583e8e6bffa44d9 +0 -0
  116. data/spec/internal/tmp/cache/assets/development/sprockets/0dffbe192bade10cf2b568c73695e96e +0 -0
  117. data/spec/internal/tmp/cache/assets/{test/sprockets/9f68eb44ffcb9dd95623c179300414fd → development/sprockets/0f943492ff57b4571d281599aa5a28bf} +0 -0
  118. data/spec/internal/tmp/cache/assets/{test/sprockets/ab2a05b91d7d316d4ceb47ce067006fb → development/sprockets/11b7eeb5da37de1c315d886349adbc98} +0 -0
  119. data/spec/internal/tmp/cache/assets/development/sprockets/12fe6051fca3506bae2d3a3452d89b8a +0 -0
  120. data/spec/internal/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  121. data/spec/internal/tmp/cache/assets/development/sprockets/16648e86ab6ef2950f3630ff0d566409 +0 -0
  122. data/spec/internal/tmp/cache/assets/development/sprockets/1877c8233ee501d08788d7324a70bd70 +0 -0
  123. data/spec/internal/tmp/cache/assets/development/sprockets/2338a6f943deb78d21f2acca84ab4f2b +0 -0
  124. data/spec/internal/tmp/cache/assets/development/sprockets/2c58fb6a2406edc8067b46ee33af7262 +0 -0
  125. data/spec/internal/tmp/cache/assets/development/sprockets/2d0220441d85355dcd9ade523f95c048 +0 -0
  126. data/spec/internal/tmp/cache/assets/{test → development}/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  127. data/spec/internal/tmp/cache/assets/{test/sprockets/c5b703cc22fc68aa8cf29fb7af16cf71 → development/sprockets/30d1efd83c44268316965efd75117565} +0 -0
  128. data/spec/internal/tmp/cache/assets/development/sprockets/339e294297aa1a0070e702f9b1d6a138 +0 -0
  129. data/spec/internal/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  130. data/spec/internal/tmp/cache/assets/{test/sprockets/3cc20a63495e66e9251101ccfb0d389c → development/sprockets/39329b3558b9f58b0d4e43621aeaa8c2} +0 -0
  131. data/spec/internal/tmp/cache/assets/development/sprockets/39ed74e4d194593ec48c481d0fd76007 +0 -0
  132. data/spec/internal/tmp/cache/assets/development/sprockets/3cdc19003f073eb3b9f3a080ffdcba4b +0 -0
  133. data/spec/internal/tmp/cache/assets/{test/sprockets/308dc75487b2e4133c218761921cbba0 → development/sprockets/3dbe49eecde9809d929a9028801df064} +0 -0
  134. data/spec/internal/tmp/cache/assets/development/sprockets/40271adcb3c4654dcb20b55abc2505c9 +0 -0
  135. data/spec/internal/tmp/cache/assets/development/sprockets/43f0a87eb2c9be2e37129f0a869756fa +0 -0
  136. data/spec/internal/tmp/cache/assets/{test/sprockets/4ed1f0897f5818a8af48b809981f38f2 → development/sprockets/457e8e6cf707c43865ffd70c88380c71} +0 -0
  137. data/spec/internal/tmp/cache/assets/development/sprockets/46ec3d34d3576e4452b0a95b87176996 +0 -0
  138. data/spec/internal/tmp/cache/assets/{test/sprockets/d0862d2af3fe93a869e9ecfdb9d89e23 → development/sprockets/47defd1245e87ed8558af57fa5f03bef} +0 -0
  139. data/spec/internal/tmp/cache/assets/development/sprockets/4873ea32d49c588483b701fcd571786b +0 -0
  140. data/spec/internal/tmp/cache/assets/development/sprockets/4a9e62d054a09c7c8e486f73bd032bdc +0 -0
  141. data/spec/internal/tmp/cache/assets/development/sprockets/4e1ab996435504b562891cd61e5d3af2 +0 -0
  142. data/spec/internal/tmp/cache/assets/development/sprockets/5079612059682a623b2639a83f6786f9 +0 -0
  143. data/spec/internal/tmp/cache/assets/{test/sprockets/8ad5c3dc0f5fcc5d7a775d6294dda9f5 → development/sprockets/51bca52c64c6b356fd2492fe9b653846} +0 -0
  144. data/spec/internal/tmp/cache/assets/development/sprockets/52ce034583a746333fd7b8aa3916b8e1 +0 -0
  145. data/spec/internal/tmp/cache/assets/{test/sprockets/f3935581a84aba9a499005ed6a8e18be → development/sprockets/53329c49c9b4ba25d31c73c9b98260b0} +0 -0
  146. data/spec/internal/tmp/cache/assets/{test/sprockets/c9efce42580b0ad0374a052aa61f2a07 → development/sprockets/59b1fd64c6fc18a82465ad6fdc7094fa} +0 -0
  147. data/spec/internal/tmp/cache/assets/development/sprockets/5b4576c3df2e97ad6fffad2f9dfedb17 +0 -0
  148. data/spec/internal/tmp/cache/assets/development/sprockets/5d0e9d2e9719bdd258aa26f857e528f2 +0 -0
  149. data/spec/internal/tmp/cache/assets/development/sprockets/615aa68b247ae772c096a73f491d0c8e +0 -0
  150. data/spec/internal/tmp/cache/assets/development/sprockets/677fd27eda24da657f51d725742582f3 +0 -0
  151. data/spec/internal/tmp/cache/assets/development/sprockets/6b20592285155ef367334915b33781ea +0 -0
  152. data/spec/internal/tmp/cache/assets/development/sprockets/710f6a1f0f5b2136b2bb8818508d2fff +0 -0
  153. data/spec/internal/tmp/cache/assets/development/sprockets/735621cd88de5e37980cced4fb13ded9 +0 -0
  154. data/spec/internal/tmp/cache/assets/development/sprockets/7de1f4ba8418fc9219f44e125c429b39 +0 -0
  155. data/spec/internal/tmp/cache/assets/development/sprockets/7e4f29f7a7327f10677cd047be78cf8a +0 -0
  156. data/spec/internal/tmp/cache/assets/{test/sprockets/b660ec1ede271559cfd0259eed96ae9c → development/sprockets/7f804c48c333d9758fa49ff9331b78e2} +0 -0
  157. data/spec/internal/tmp/cache/assets/development/sprockets/806c560c2f6e89ba0ad39561804ff79c +0 -0
  158. data/spec/internal/tmp/cache/assets/{test/sprockets/f3e7729c53b8a2c408086a61b58922ae → development/sprockets/82dd05a187bccd30f62fabb16491fe03} +0 -0
  159. data/spec/internal/tmp/cache/assets/{test/sprockets/813e23719129cf9f19349f720bebdf70 → development/sprockets/853ad370adfaa0da7ec26f51b89421f1} +0 -0
  160. data/spec/internal/tmp/cache/assets/{test/sprockets/b225d67626669cb154cbe08a3c439d48 → development/sprockets/87448f32d11a5cdbc9a58998d7dd976d} +0 -0
  161. data/spec/internal/tmp/cache/assets/{test/sprockets/24c91d512c7cc64c22aeb15a7e6cb7a2 → development/sprockets/8c1af1f5b9a42448f4b8ff3dc1c1b81b} +0 -0
  162. data/spec/internal/tmp/cache/assets/{test/sprockets/02bee7ecb2697ab24c566acc29e23717 → development/sprockets/8ea2ae90f0b9ef9e64344ff4773c575d} +0 -0
  163. data/spec/internal/tmp/cache/assets/{test/sprockets/b1a42de74c934edd0e5eed0f98a23597 → development/sprockets/8ea9ff17090b736331312d04c8036810} +0 -0
  164. data/spec/internal/tmp/cache/assets/{test/sprockets/75da31aa64ac2526ffbe396852663999 → development/sprockets/8ef9e7d38c0b792a85f86f7b5e764d33} +0 -0
  165. data/spec/internal/tmp/cache/assets/{test/sprockets/350a65d446eb7398f96d102f7a1a6d69 → development/sprockets/92c82efebbff4c3a9f96e08b308e92dd} +0 -0
  166. data/spec/internal/tmp/cache/assets/development/sprockets/93aaa9231a32901266b05632f3d35ecd +0 -0
  167. data/spec/internal/tmp/cache/assets/development/sprockets/93c6b8da8f3373c42510a25694457483 +0 -0
  168. data/spec/internal/tmp/cache/assets/development/sprockets/9443255223294f7ad9ad6daba446afc3 +0 -0
  169. data/spec/internal/tmp/cache/assets/development/sprockets/9aae694d5c7713a4666814ecfd04bc8e +0 -0
  170. data/spec/internal/tmp/cache/assets/development/sprockets/9ca9885875e2e0ab4e531cba60aa03e5 +0 -0
  171. data/spec/internal/tmp/cache/assets/development/sprockets/9e91dee79db70af8ab4149b9698a12a5 +0 -0
  172. data/spec/internal/tmp/cache/assets/development/sprockets/a0c35895c526b4a7bec46d5e2f5e90f9 +0 -0
  173. data/spec/internal/tmp/cache/assets/development/sprockets/a13d3a27038cf6570d22b54c54442642 +0 -0
  174. data/spec/internal/tmp/cache/assets/development/sprockets/a39ce14a3bc6d336f122cc1712f34963 +0 -0
  175. data/spec/internal/tmp/cache/assets/{test/sprockets/fa11f1beb15b0f04503ce1f06701a8bf → development/sprockets/a41907986306fd7cdfa932fe7d705572} +0 -0
  176. data/spec/internal/tmp/cache/assets/development/sprockets/a62c05e92bbbd1d49540b17c1a17982f +0 -0
  177. data/spec/internal/tmp/cache/assets/development/sprockets/a66ba1ae2ecf53099b8c240249aaccaa +0 -0
  178. data/spec/internal/tmp/cache/assets/development/sprockets/acc90134230a954a6983332d94303e66 +0 -0
  179. data/spec/internal/tmp/cache/assets/development/sprockets/ad4a54c43c2a4c3874bfde1c9f08c248 +0 -0
  180. data/spec/internal/tmp/cache/assets/development/sprockets/b2b550f46801c5fb416302ef0737a62d +0 -0
  181. data/spec/internal/tmp/cache/assets/development/sprockets/b37776526b5809e55fbb0add6d059127 +0 -0
  182. data/spec/internal/tmp/cache/assets/development/sprockets/b7136d57967d58d8247f9168a681ce01 +0 -0
  183. data/spec/internal/tmp/cache/assets/development/sprockets/c19459bc1eff0b0133093c0473f47c04 +0 -0
  184. data/spec/internal/tmp/cache/assets/{test/sprockets/7a841c591675a2dafb8b859ca4014f1c → development/sprockets/cb74a43b2a6abc262abfed639df77470} +0 -0
  185. data/spec/internal/tmp/cache/assets/development/sprockets/cd59839c2fc0d494ffa76ef4c4dbfa42 +0 -0
  186. data/spec/internal/tmp/cache/assets/{test → development}/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  187. data/spec/internal/tmp/cache/assets/development/sprockets/d6995317fba3b6344c75db70b8c997e2 +0 -0
  188. data/spec/internal/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  189. data/spec/internal/tmp/cache/assets/{test/sprockets/ecfc314951b349e27742c1b26880619e → development/sprockets/d7bf17ad1471147b5314b4dda0bad9fe} +0 -0
  190. data/spec/internal/tmp/cache/assets/development/sprockets/e3f7abb4568acd320b05e7765b31412f +0 -0
  191. data/spec/internal/tmp/cache/assets/{test/sprockets/3ca413a5a67acfa5c4adb491faec270e → development/sprockets/e451ef2f153fc084065cf4f66d62a912} +0 -0
  192. data/spec/internal/tmp/cache/assets/development/sprockets/e802e3ce42ea0c2e35ccfd33f3b8caad +0 -0
  193. data/spec/internal/tmp/cache/assets/development/sprockets/e8be519ffddd6ff5b387ee0b143177de +0 -0
  194. data/spec/internal/tmp/cache/assets/{test/sprockets/6ca71451ade728977ed02cea06e07914 → development/sprockets/ecb21744c6c865116bfaa342d4cc373d} +0 -0
  195. data/spec/internal/tmp/cache/assets/development/sprockets/ef1d076b51c3ce03aa1e754fb8f0457e +0 -0
  196. data/spec/internal/tmp/cache/assets/development/sprockets/f7a87683461c3a58ee9b6e9546473c4e +0 -0
  197. data/spec/internal/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  198. data/spec/lib/krikri/harvester_spec.rb +8 -1
  199. data/spec/lib/krikri/harvesters/couchdb_harvester_spec.rb +1 -1
  200. data/spec/lib/krikri/harvesters/oai_harvester_spec.rb +1 -1
  201. data/spec/lib/krikri/mapper_agent_spec.rb +5 -1
  202. data/spec/lib/krikri/mapper_spec.rb +1 -1
  203. data/spec/lib/krikri/mapping_dsl/parser_methods_spec.rb +18 -1
  204. data/spec/lib/krikri/parser_value_array_spec.rb +99 -6
  205. data/spec/lib/krikri/parsers/oai_dc_parser_spec.rb +1 -0
  206. data/spec/support/shared_examples/harvester.rb +4 -4
  207. data/spec/support/shared_examples/oai_parser_headers.rb +12 -0
  208. data/spec/support/shared_examples/software_agent.rb +38 -9
  209. metadata +444 -551
  210. data/app/models/krikri/harvesters/oai_harvester.rb~ +0 -10
  211. data/app/models/krikri/original_record_desc.rb~ +0 -6
  212. data/app/models/krikri/original_record_metadata.rb~ +0 -9
  213. data/app/models/krikri/parser.rb~ +0 -5
  214. data/app/models/krikri/parsers/xml_parser.rb~ +0 -5
  215. data/config/initializers/config.rb~ +0 -19
  216. data/config/settings/test.yml~ +0 -3
  217. data/lib/aggregation.rb~ +0 -4
  218. data/lib/krikri/enrichment.rb~ +0 -5
  219. data/lib/krikri/enrichment_job.rb~ +0 -13
  220. data/lib/krikri/enrichments.rb~ +0 -4
  221. data/lib/krikri/enrichments/capitalize.rb~ +0 -24
  222. data/lib/krikri/enrichments/deduplication.rb~ +0 -10
  223. data/lib/krikri/enrichments/genre_filter.rb~ +0 -9
  224. data/lib/krikri/enrichments/iso_enrcich.rb~ +0 -8
  225. data/lib/krikri/enrichments/iso_enrich.rb~ +0 -13
  226. data/lib/krikri/enrichments/parse_date.rb~ +0 -10
  227. data/lib/krikri/enrichments/strip_html.rb~ +0 -16
  228. data/lib/krikri/enrichments/timespan.rb~ +0 -6
  229. data/lib/krikri/enrichments/timespan_split.rb~ +0 -83
  230. data/lib/krikri/field_enrichment.rb~ +0 -3
  231. data/lib/krikri/harvest_job.rb +0 -14
  232. data/lib/krikri/id_minter.rb~ +0 -8
  233. data/lib/krikri/id_service.rb~ +0 -4
  234. data/lib/krikri/ldp/container.rb~ +0 -22
  235. data/lib/krikri/ldp/nr_source.rb~ +0 -4
  236. data/lib/krikri/ldp/rdf_source.rb~ +0 -24
  237. data/lib/krikri/ldp/resource.rb~ +0 -49
  238. data/lib/krikri/mapping_dsl.rb~ +0 -4
  239. data/lib/krikri/mapping_job.rb +0 -13
  240. data/lib/krikri/mapping_job.rb~ +0 -13
  241. data/lib/krikri/md5_minter.rb~ +0 -8
  242. data/lib/krikri/parsers/json_parser.rb~ +0 -17
  243. data/lib/krikri/parsers/oai_headers.rb~ +0 -4
  244. data/lib/krikri/parsers/oai_parser.rb~ +0 -2
  245. data/lib/krikri/parsers/oai_parser_headers.rb~ +0 -4
  246. data/lib/krikri/parsers/xml_parser.rb~ +0 -61
  247. data/lib/krikri/provenance_query.rb~ +0 -4
  248. data/lib/krikri/provenance_query_client.rb~ +0 -11
  249. data/lib/krikri/util/edtf_converter.rb~ +0 -26
  250. data/lib/krikri/util/extended_date_parser.rb~ +0 -70
  251. data/lib/tasks/jetty.rake~ +0 -12
  252. data/lib/tasks/krikri.rake~ +0 -20
  253. data/spec/factories/krikri_original_record.rb~ +0 -5
  254. data/spec/internal/lib/generators/test_app_generator.rb~ +0 -14
  255. data/spec/internal/log/test.log +0 -8008
  256. data/spec/internal/tmp/cache/assets/test/sprockets/03126075e92026e5dd05f2c577bd4730 +0 -0
  257. data/spec/internal/tmp/cache/assets/test/sprockets/04a0815eb41346be1a815741677d9d46 +0 -0
  258. data/spec/internal/tmp/cache/assets/test/sprockets/059eceaa18e2eaee3d5168f3949f4957 +0 -0
  259. data/spec/internal/tmp/cache/assets/test/sprockets/093d898bf3f20b26b13c82714a77c040 +0 -0
  260. data/spec/internal/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  261. data/spec/internal/tmp/cache/assets/test/sprockets/2665fe64198bd4c9fec4c5ab52bea19e +0 -0
  262. data/spec/internal/tmp/cache/assets/test/sprockets/2bea755b15e0adfa7c25ed3d0ede78ae +0 -0
  263. data/spec/internal/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  264. data/spec/internal/tmp/cache/assets/test/sprockets/37ad484f356c918e56ba82f60caf9521 +0 -0
  265. data/spec/internal/tmp/cache/assets/test/sprockets/41b62fb10530766b5b9fef3338f5f30b +0 -0
  266. data/spec/internal/tmp/cache/assets/test/sprockets/421c89c58d3e76046a0294dae1f731ff +0 -0
  267. data/spec/internal/tmp/cache/assets/test/sprockets/43da966542fafc2a4c768be78527391c +0 -0
  268. data/spec/internal/tmp/cache/assets/test/sprockets/496a0d7dce1ff6bf4a9c3a089ea3a635 +0 -0
  269. data/spec/internal/tmp/cache/assets/test/sprockets/5d9772b2d3ee4527f6669b3187f91bf2 +0 -0
  270. data/spec/internal/tmp/cache/assets/test/sprockets/6df5b5c0a8e6d87ced9504a460df875e +0 -0
  271. data/spec/internal/tmp/cache/assets/test/sprockets/6eefd2765a716d66ff857cfcda69a119 +0 -0
  272. data/spec/internal/tmp/cache/assets/test/sprockets/8297d7100b7c4e6115a7e6408f2fced5 +0 -0
  273. data/spec/internal/tmp/cache/assets/test/sprockets/86b7795bee54d7ffa2ff30e867aff344 +0 -0
  274. data/spec/internal/tmp/cache/assets/test/sprockets/88ded10f28177bec1bddb0d72d6b1cd2 +0 -0
  275. data/spec/internal/tmp/cache/assets/test/sprockets/93aaa9231a32901266b05632f3d35ecd +0 -0
  276. data/spec/internal/tmp/cache/assets/test/sprockets/ad4a54c43c2a4c3874bfde1c9f08c248 +0 -0
  277. data/spec/internal/tmp/cache/assets/test/sprockets/b0423ae95a661f086b7766d7573885f9 +0 -0
  278. data/spec/internal/tmp/cache/assets/test/sprockets/b1c03c36188b4f58f819510adb9a7e9c +0 -0
  279. data/spec/internal/tmp/cache/assets/test/sprockets/b42c247628daaf44109584724682a6ad +0 -0
  280. data/spec/internal/tmp/cache/assets/test/sprockets/bb1a549778011fb037836e1fa6a80ba6 +0 -0
  281. data/spec/internal/tmp/cache/assets/test/sprockets/be8a6d8dc481c07c86bdf541e15c4634 +0 -0
  282. data/spec/internal/tmp/cache/assets/test/sprockets/c644ecad928e076f999e9c9a3bc350c9 +0 -0
  283. data/spec/internal/tmp/cache/assets/test/sprockets/c78dd20a0df27e9394a413bf2e4abf92 +0 -0
  284. data/spec/internal/tmp/cache/assets/test/sprockets/d24a7c4b8ac71a90e809881a64970898 +0 -0
  285. data/spec/internal/tmp/cache/assets/test/sprockets/d5415d1f2b4a2672355dd988eb332d0b +0 -0
  286. data/spec/internal/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  287. data/spec/internal/tmp/cache/assets/test/sprockets/dbba4bbc32c17ade3d618c5d0baeb371 +0 -0
  288. data/spec/internal/tmp/cache/assets/test/sprockets/dfdda7a36a1428f72947384938d105a2 +0 -0
  289. data/spec/internal/tmp/cache/assets/test/sprockets/e40f087f7b8b59f85a4811f715e5e35a +0 -0
  290. data/spec/internal/tmp/cache/assets/test/sprockets/e8276b98892dcac8285a592bb63fe75b +0 -0
  291. data/spec/internal/tmp/cache/assets/test/sprockets/eddae0741d973a8ab3df27c1ea5b635e +0 -0
  292. data/spec/internal/tmp/cache/assets/test/sprockets/f45dfdb34e84d3c72a3319399a7316a3 +0 -0
  293. data/spec/internal/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  294. data/spec/internal/tmp/cache/assets/test/sprockets/faac2909046aa87e1f1f08b2bf0ad2b2 +0 -0
  295. data/spec/internal/tmp/cache/assets/test/sprockets/faef697283f2f0627727a5f856242651 +0 -0
  296. data/spec/krikri_spec.rb~ +0 -30
  297. data/spec/ldp/active_triples_spec.rb~ +0 -15
  298. data/spec/ldp/at_resource_spec.rb~ +0 -41
  299. data/spec/ldp/nr_source_spec.rb~ +0 -3
  300. data/spec/ldp/rdf_source_spec.rb~ +0 -4
  301. data/spec/ldp/resource_spec.rb~ +0 -49
  302. data/spec/lib/krikri/enrichments/capitalize_spec.rb~ +0 -24
  303. data/spec/lib/krikri/enrichments/deduplication_spec.rb~ +0 -5
  304. data/spec/lib/krikri/enrichments/genre_filter_spec.rb~ +0 -19
  305. data/spec/lib/krikri/enrichments/iso_enrich_spec.rb~ +0 -5
  306. data/spec/lib/krikri/enrichments/parse_date_spec.rb~ +0 -16
  307. data/spec/lib/krikri/enrichments/timespan_spec.rb~ +0 -10
  308. data/spec/lib/krikri/enrichments/timespan_split_spec.rb~ +0 -59
  309. data/spec/lib/krikri/harvest_job_spec.rb +0 -11
  310. data/spec/lib/krikri/id_service_spec.rb~ +0 -3
  311. data/spec/lib/krikri/mapper_agent_spec.rb~ +0 -64
  312. data/spec/lib/krikri/mapper_spec.rb~ +0 -5
  313. data/spec/lib/krikri/mapping_dsl/parser_methods_spec.rb~ +0 -65
  314. data/spec/lib/krikri/mapping_dsl/property_declaration_spec.rb~ +0 -87
  315. data/spec/lib/krikri/mapping_dsl/rdf_subjects_spec.rb~ +0 -16
  316. data/spec/lib/krikri/mapping_dsl_spec.rb~ +0 -10
  317. data/spec/lib/krikri/mapping_job.rb~ +0 -12
  318. data/spec/lib/krikri/mapping_job_spec.rb +0 -36
  319. data/spec/lib/krikri/mapping_job_spec.rb~ +0 -11
  320. data/spec/lib/krikri/mapping_spec.rb~ +0 -5
  321. data/spec/lib/krikri/md5_minter_spec.rb~ +0 -5
  322. data/spec/lib/krikri/parser_value_array.rb~ +0 -5
  323. data/spec/lib/krikri/parsers/json_parser_spec.rb~ +0 -17
  324. data/spec/lib/krikri/parsers/xml_parser_spec.rb~ +0 -21
  325. data/spec/lib/krikri/provenance_query_client.rb~ +0 -5
  326. data/spec/lib/krikri/provenance_query_client_spec.rb~ +0 -8
  327. data/spec/lib/krikri/util/edtf_converter_spec.rb~ +0 -17
  328. data/spec/lib/krikri/util/extended_date_parser_spec.rb~ +0 -102
  329. data/spec/models/activity_spec.rb~ +0 -41
  330. data/spec/models/dpla/map/aggregation_spec.rb~ +0 -67
  331. data/spec/models/harvesters/oai_harvester_spec.rb~ +0 -15
  332. data/spec/models/mapper_spec.rb~ +0 -5
  333. data/spec/models/original_record_metadata_spec.rb~ +0 -5
  334. data/spec/models/original_record_spec.rb~ +0 -5
  335. data/spec/support/shared_contexts/mapping_dsl.rb~ +0 -12
  336. data/spec/support/shared_contexts/provenance_query_client.rb~ +0 -6
  337. data/spec/support/shared_examples/enrichment.rb~ +0 -5
  338. data/spec/support/shared_examples/job.rb +0 -14
  339. data/spec/support/shared_examples/job.rb~ +0 -20
  340. data/spec/support/shared_examples/ldp_resource.rb~ +0 -4
  341. data/spec/support/shared_examples/oai_parser_headers.rb~ +0 -12
  342. data/spec/support/shared_examples/rdf_source.rb~ +0 -1
  343. data/spec/support/shared_examples/software_agent.rb~ +0 -5
  344. data/spec/support/shared_examples/string_enrichment.rb~ +0 -12
  345. data/spec/test_app_templates/lib/generators/test_app_generator.rb~ +0 -14
  346. data/spec/webmocks/oai.rb~ +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bff72a4104f298f6090646716eb511e2178e274a
4
- data.tar.gz: 1ef9b3b5a53d1eb17d83adc78943c8ac3ba05946
3
+ metadata.gz: 88f2fda2ab3d73eefca94acf0d09535360c2f8a2
4
+ data.tar.gz: 7e7728069c141de05865fcc778eff47478a32307
5
5
  SHA512:
6
- metadata.gz: 3d72e9587388409a9a0cb565664c81330d740f9c311dfb41e7b61bec8b98e44440510ae9cd5f9fc3f45b90412f0e0836aacb2728ff277705f3fb776f7a54067a
7
- data.tar.gz: 35006b6621f1235649446b1a9b0e207ae02a341d9be705b33ee5b73f7d4329593391b231c91cdb7295519567972ed01c545c79524c3611a832c0d4e0a984ee83
6
+ metadata.gz: 86e64af30ab18c16a0873aa9ae5394a8f8e60cc10b7b7a58025128fb89bfb93f24dc9c8868083d1609ef3741a03aeeb77c69bb597d834f44a162100e853945b9
7
+ data.tar.gz: d752ec0976968d5ae7a7a0534e63e7785fa38cbede0a2f8bfecb0e065bb33642bf0a03203411f569fa336051bdf36ecfcd6c3d508c57dff3074280cf5f11955d
data/Rakefile CHANGED
@@ -25,7 +25,7 @@ require 'jettywrapper'
25
25
  import 'lib/tasks/jetty.rake'
26
26
 
27
27
  desc "Run all specs in spec directory (excluding plugin specs) in an engine_cart-generated app"
28
- task :ci => ['jetty:clean', 'engine_cart:generate'] do
28
+ task :ci => ['jetty:clean', 'engine_cart:clean', 'engine_cart:generate'] do
29
29
  Rake::Task['jetty:config'].invoke
30
30
 
31
31
  Jettywrapper.wrap(quiet: true,
@@ -5,6 +5,9 @@
5
5
 
6
6
  <h2>QA Record: <%= @document.id.html_safe %></h2>
7
7
 
8
+ <%= button_to 'Random record', random_record_url,
9
+ :class => "btn btn-primary", :method => :get %>
10
+
8
11
  <div class="row">
9
12
  <div class="col-md-6 col-sm-6">
10
13
  <h3>Enriched Record</h3>
data/lib/krikri.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  ##
2
- # Require 'blacklight' before 'krikri/engine' to ensure that view order is
2
+ # Require 'blacklight' before 'krikri/engine' to ensure that view order is
3
3
  # configured properly.
4
4
  require 'rails'
5
5
  require 'devise'
@@ -7,10 +7,10 @@ require 'blacklight'
7
7
  require "krikri/engine"
8
8
 
9
9
  module Krikri
10
- autoload :XmlParser, 'krikri/parsers/xml_parser'
11
- # autoload Krikri::OaiDcParser
12
- autoload :OaiDcParser, 'krikri/parsers/oai_dc_parser'
13
- autoload :JsonParser, 'krikri/parsers/json_parser'
14
- autoload :ModsParser, 'krikri/parsers/mods_parser'
15
- autoload :QdcParser, 'krikri/parsers/qdc_parser'
10
+ autoload :XmlParser, 'krikri/parsers/xml_parser'
11
+ autoload :OaiDcParser, 'krikri/parsers/oai_dc_parser'
12
+ autoload :JsonParser, 'krikri/parsers/json_parser'
13
+ autoload :ModsParser, 'krikri/parsers/mods_parser'
14
+ autoload :QdcParser, 'krikri/parsers/qdc_parser'
15
+ autoload :OaiParserHeaders, 'krikri/parsers/oai_parser_headers'
16
16
  end
@@ -36,6 +36,16 @@ module Krikri
36
36
 
37
37
  attr_accessor :uri, :name
38
38
 
39
+ included do
40
+ class << self
41
+ ##
42
+ # @see SoftwareAgent#queue_name
43
+ def queue_name
44
+ :harvest
45
+ end
46
+ end
47
+ end
48
+
39
49
  ##
40
50
  # Accepts options for a generic harvester:
41
51
  # uri: a URI for the harvest endpoint or provider
data/lib/krikri/job.rb CHANGED
@@ -21,13 +21,14 @@ module Krikri
21
21
  end
22
22
 
23
23
  ##
24
- # @abstract run the job's task. Implement the actual task
25
- # against the agent passed in.
26
- # @param agent the agent to run the task
24
+ # Run the job's task. Receieves a `Krikri::SoftwareAgent` or other object
25
+ # responding to `#run`.
26
+ #
27
+ # @param agent [#run] the agent to run the task
27
28
  # @param activity_uri the URI of the activity responsible for
28
29
  # generating the resources. Set this to (e.g.) prov:wasGeneratedBy
29
- def self.run(_, _)
30
- raise NotImplementedError
30
+ def self.run(agent, activity_uri = nil)
31
+ agent.run(activity_uri)
31
32
  end
32
33
  end
33
34
  end
data/lib/krikri/mapper.rb CHANGED
@@ -62,13 +62,27 @@ module Krikri
62
62
  begin
63
63
  Registry.get(name).process_record(rec)
64
64
  rescue => e
65
- Rails.logger.error("Error processing mapping for #{rec.rdf_subject}" \
66
- "\n#{e.message}\n#{e.backtrace}")
65
+ desc = mapping_exception_desc(rec)
66
+ bt = e.backtrace.join("\n")
67
+ Rails.logger.error("Error processing mapping.\n" \
68
+ "#{desc}\n#{e.message}\n#{bt}")
67
69
  nil
68
70
  end
69
71
  end
70
72
  end
71
73
 
74
+ ##
75
+ # Return a string that describes the object encountered by the exception
76
+ # handler in #map
77
+ def mapping_exception_desc(rec)
78
+ if defined? rec.content
79
+ "content:\n#{rec.content || '[no content]'}"
80
+ else
81
+ "object:\n#{rec.inspect}"
82
+ end
83
+ end
84
+ private_class_method :mapping_exception_desc
85
+
72
86
  ##
73
87
  # An application-wide registry of defined mappings
74
88
  Registry = Class.new(Krikri::Registry)
@@ -82,6 +96,10 @@ module Krikri
82
96
 
83
97
  attr_reader :name, :generator_uri
84
98
 
99
+ def self.queue_name
100
+ :mapping
101
+ end
102
+
85
103
  def initialize(opts = {})
86
104
  @name = opts.fetch(:name).to_sym
87
105
  @generator_uri = RDF::URI(opts.fetch(:generator_uri))
@@ -41,6 +41,20 @@ module Krikri::MappingDSL
41
41
  end
42
42
  end
43
43
 
44
+ ##
45
+ # Gives access to a delayed call for the `#header` of a parsed record.
46
+ #
47
+ # @return [Proc] a proc that, when called, returns the #rdf_subject of the
48
+ # OriginalRecord associated with the parsed record passed as its argument.
49
+ # @todo consider a more generalized approach
50
+ def header
51
+ lambda do |parsed|
52
+ raise "#{parsed} does not have a `header`" unless
53
+ parsed.respond_to? :header
54
+ parsed.header
55
+ end
56
+ end
57
+
44
58
  ##
45
59
  # This class acts as a proxy for a parsed record's nodes, wrapped in the
46
60
  # class passed as the second argument. All methods available on the wrapper
data/lib/krikri/parser.rb CHANGED
@@ -133,13 +133,38 @@ module Krikri
133
133
  class ValueArray
134
134
  include Enumerable
135
135
 
136
- delegate :<<, :[], :[]=, :each, :empty?, :map, :to_a, :to_ary,
136
+ delegate :[], :each, :empty?, :map, :to_a, :to_ary,
137
137
  :to => :@array
138
138
 
139
139
  def initialize(array = [])
140
140
  @array = array
141
141
  end
142
142
 
143
+ ##
144
+ # @see Array#[]=
145
+ # @raise [InvalidParserValueError] when the value is not a Parser::Value
146
+ def []=(index, value)
147
+ raise InvalidParserValueError unless value.is_a? Value
148
+ @array[index] = value
149
+ self
150
+ end
151
+
152
+ ##
153
+ # @see Array#<<
154
+ # @raise [InvalidParserValueError] when the value is not a Parser::Value
155
+ def <<(value)
156
+ raise InvalidParserValueError unless value.is_a? Value
157
+ @array << value
158
+ value
159
+ end
160
+
161
+ ##
162
+ # @see Array#concat
163
+ # @return [ValueArray]
164
+ def concat(*args, &block)
165
+ self.class.new(@array.concat(*args, &block))
166
+ end
167
+
143
168
  ##
144
169
  # @return [Array] literal values from the objects in this array.
145
170
  # @see Parser::Value#value
@@ -161,6 +186,18 @@ module Krikri
161
186
  result
162
187
  end
163
188
 
189
+ ##
190
+ # Accesses the union of multiple specified fields.
191
+ #
192
+ # @return [ValueArray] an array containing the nodes available in the
193
+ # given fields.
194
+ def fields(*args)
195
+ results = args.map do |f|
196
+ field(*Array(f))
197
+ end
198
+ self.class.new(results.flatten)
199
+ end
200
+
164
201
  ##
165
202
  # Retrieves the first element of a ValueArray. Uses an optional argument
166
203
  # to specify how many items to return. By design, it behaves similarly
@@ -172,10 +209,18 @@ module Krikri
172
209
  self.class.new([@array.first].compact)
173
210
  end
174
211
 
212
+ ##
213
+ # @see Array#concat
214
+ # @return [ValueArray]
215
+ def flatten(*args, &block)
216
+ self.class.new(@array.flatten(*args, &block))
217
+ end
218
+
175
219
  ##
176
220
  # Wraps the result of Array#select in a ValueArray
177
221
  #
178
222
  # @see Array#select
223
+ # @return [ValueArray]
179
224
  def select(*args, &block)
180
225
  self.class.new(@array.select(*args, &block))
181
226
  end
@@ -184,6 +229,7 @@ module Krikri
184
229
  # Wraps the result of Array#reject in a ValueArray
185
230
  #
186
231
  # @see Array#reject
232
+ # @return [ValueArray]
187
233
  def reject(*args, &block)
188
234
  self.class.new(@array.reject(*args, &block))
189
235
  end
@@ -216,6 +262,10 @@ module Krikri
216
262
  def get_field(name)
217
263
  self.class.new(flat_map { |val| val[name] })
218
264
  end
265
+
266
+ public
267
+
268
+ class InvalidParserValueError < TypeError; end
219
269
  end
220
270
  end
221
271
  end
@@ -4,6 +4,8 @@ module Krikri
4
4
  # metadata path as harvested from OAI-PMH.
5
5
  # @see Krikri::XmlParser
6
6
  class OaiDcParser < XmlParser
7
+ include Krikri::OaiParserHeaders
8
+
7
9
  def initialize(record, root_path = '//oai_dc:dc')
8
10
  super
9
11
  end
@@ -0,0 +1,20 @@
1
+ module Krikri
2
+ ##
3
+ # Concern for Krikri::XmlParsers with oai-style headers
4
+ # @example
5
+ # class MyOaiParser < Krikri::XmlParser
6
+ # include Krikri::OaiParserHeaders
7
+ # end
8
+ module OaiParserHeaders
9
+ extend ActiveSupport::Concern
10
+
11
+ ##
12
+ # @return [Krikri::Parser::ValueArray] a ValueArray containing the
13
+ # header node as a `Value` of this parser class
14
+ def header
15
+ header_node = Nokogiri::XML(record.to_s).at_xpath('//xmlns:header')
16
+ Krikri::Parser::ValueArray
17
+ .new([self.class::Value.new(header_node, root.namespaces)])
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,19 @@
1
+ module Krikri
2
+ # Gets random records from the search index
3
+ class RandomRecordGenerator
4
+
5
+ def initialize
6
+ @solr_repo = Blacklight::SolrRepository.new(Blacklight::Configuration.new)
7
+ end
8
+
9
+ # @return Krikri::SearchIndexDocument
10
+ def record
11
+ solr_params = { :id => "*:*",
12
+ :sort => "random_#{rand(9999)} desc",
13
+ :rows => 1 }
14
+ query_result = @solr_repo.search(solr_params)
15
+ solr_response = Blacklight::SolrResponse.new(query_result, solr_params)
16
+ Krikri::SearchIndexDocument.new(solr_response.docs.first)
17
+ end
18
+ end
19
+ end
@@ -65,7 +65,7 @@ module Krikri
65
65
  return error_msg(e.message)
66
66
  end
67
67
 
68
- return error_msg('Original record not found.') unless
68
+ return error_msg('Original record not found.') unless
69
69
  original_record.present?
70
70
  prettify_string(original_record.to_s, original_record.content_type)
71
71
  end
@@ -97,5 +97,9 @@ module Krikri
97
97
  def error_msg(message = '')
98
98
  "There was a problem getting the record.\n\n#{message}"
99
99
  end
100
+
101
+ def random_record_url
102
+ url_for_document(Krikri::RandomRecordGenerator.new.record)
103
+ end
100
104
  end
101
105
  end
@@ -13,7 +13,7 @@ module Krikri
13
13
  # This is the name of the most-derived class upon which this is invoked.
14
14
  # @see Krikri::Activity
15
15
  def agent_name
16
- self.class.to_s
16
+ self.class.agent_name
17
17
  end
18
18
 
19
19
  ##
@@ -45,18 +45,27 @@ module Krikri
45
45
  end
46
46
 
47
47
  ##
48
- # @see SoftwareAgent#agent_name
48
+ # @return a string representation of this SoftwareAgent class
49
49
  def agent_name
50
50
  to_s
51
51
  end
52
52
 
53
+ ##
54
+ # @return the name of the default queue for jobs invoking this
55
+ # SoftwareAgent
56
+ def queue_name
57
+ agent_name.downcase
58
+ end
59
+
53
60
  ##
54
61
  # Enqueue a job.
55
62
  #
56
- # Example:
63
+ # @example
64
+ # MyAgent.enqueue(:name => my_job)
57
65
  #
66
+ # @example
58
67
  # Krikri::Harvesters::OAIHarvester.enqueue(
59
- # Krikri::HarvestJob,
68
+ # :harvest,
60
69
  # opts = {
61
70
  # uri: 'http://vcoai.lib.harvard.edu/vcoai/vc',
62
71
  # oai: { set: 'dag', metadata_prefix: 'mods' }
@@ -71,22 +80,31 @@ module Krikri
71
80
  # This depends on Redis and Marmotta being available and properly
72
81
  # configured (if necessary) in the Rails app.
73
82
  #
83
+ # @param queue_name [#to_s] the Resque queue name
84
+ # @param opts [Hash] a hash of options that will be used to initialize
85
+ # the agent (an instance of this class).
86
+ #
87
+ # @return [Boolean]
88
+ #
74
89
  # @see https://github.com/resque/resque/tree/1-x-stable
75
- # @see Krikri::HarvestJob
90
+ # @see Krikri::Job
76
91
  # @see Krikri::SoftwareAgent#agent_name
77
92
  # @see Krikri::Harvester::expected_opts
78
- # @return [Boolean]
79
- def enqueue(job_class, opts = {})
80
- fail "#{job_class} has no #perform method" unless
81
- job_class.respond_to?(:perform)
82
- fail 'opts is not a hash' unless opts.is_a?(Hash)
93
+ def enqueue(*args)
94
+ queue = args.shift unless args.first.is_a? Hash
95
+ queue ||= queue_name
96
+ opts = args.shift || {}
97
+ fail ArgumentError, "unexpected arguments #{args}" unless args.empty?
98
+ fail ArgumentError, 'opts is not a hash' unless opts.is_a?(Hash)
99
+
83
100
  activity = Krikri::Activity.create do |a|
84
101
  a.agent = agent_name
85
102
  a.opts = JSON.generate(opts)
86
103
  end
104
+
87
105
  log :info, "created activity #{activity.id}"
88
- Resque.enqueue(job_class, activity.id)
89
- log :info, "enqueued #{job_class}"
106
+ Resque.enqueue_to(queue, Krikri::Job, activity.id)
107
+ log :info, "enqueued to #{queue}"
90
108
  true
91
109
  end
92
110
 
@@ -1,3 +1,3 @@
1
1
  module Krikri
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/tasks/jetty.rake CHANGED
@@ -4,7 +4,10 @@ require 'jettywrapper'
4
4
  namespace :jetty do
5
5
  Jettywrapper.url = 'https://github.com/dpla/marmotta-jetty/archive/3.3.0-solr-4.9.0.zip'
6
6
 
7
- MARMOTTA_HOME = ENV['MARMOTTA_HOME'] || File.expand_path(File.join(Jettywrapper.app_root, 'jetty', 'marmotta'))
7
+ DEFAULT_MARMOTTA = File.expand_path(File.join(Jettywrapper.app_root,
8
+ 'jetty',
9
+ 'marmotta'))
10
+ MARMOTTA_HOME = ENV['MARMOTTA_HOME'] || DEFAULT_MARMOTTA
8
11
 
9
12
  desc 'Configure solr schema'
10
13
  task :config do
@@ -13,9 +16,10 @@ namespace :jetty do
13
16
  'jetty/solr/development-core/conf/solrconfig.xml')
14
17
  end
15
18
 
16
- desc 'Remove the jetty and marmotta directories and recreate them'
17
- task :clean do
18
- FileUtils.rm_rf(MARMOTTA_HOME)
19
- Jettywrapper.clean
19
+ desc 'Empty the Marmotta home directory used by Jettywrapper'
20
+ task :clean_marmotta_home do
21
+ FileUtils.rm_rf(MARMOTTA_HOME) unless MARMOTTA_HOME == DEFAULT_MARMOTTA
20
22
  end
23
+
24
+ task :clean => [:clean_marmotta_home]
21
25
  end
File without changes
Binary file