umlaut 3.0.5 → 3.1.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (385) hide show
  1. checksums.yaml +15 -0
  2. data/README.md +48 -5
  3. data/app/assets/images/umlaut_icons.png +0 -0
  4. data/app/assets/images/umlaut_icons/famfamfam-book-go.png +0 -0
  5. data/app/assets/images/{famfamfam/book_open.png → umlaut_icons/famfamfam-book-open.png} +0 -0
  6. data/app/assets/images/umlaut_icons/famfamfam-book.png +0 -0
  7. data/app/assets/images/{famfamfam/cross.png → umlaut_icons/famfamfam-cross.png} +0 -0
  8. data/app/assets/images/umlaut_icons/famfamfam-error.png +0 -0
  9. data/app/assets/images/umlaut_icons/famfamfam-help.png +0 -0
  10. data/app/assets/images/umlaut_icons/famfamfam-information.png +0 -0
  11. data/app/assets/images/umlaut_icons/famfamfam-link.png +0 -0
  12. data/app/assets/images/umlaut_icons/famfamfam-page-sound.png +0 -0
  13. data/app/assets/images/umlaut_icons/famfamfam-page-text.png +0 -0
  14. data/app/assets/images/umlaut_icons/famfamfam-page-up.png +0 -0
  15. data/app/assets/images/{famfamfam/page_white.png → umlaut_icons/famfamfam-page-white.png} +0 -0
  16. data/app/assets/images/{famfamfam/readme.html → umlaut_icons/famfamfam-readme.html} +0 -0
  17. data/app/assets/images/{famfamfam/tiny_cross.png → umlaut_icons/famfamfam-tiny-cross.png} +0 -0
  18. data/app/assets/images/{list_closed.png → umlaut_icons/list-closed.png} +0 -0
  19. data/app/assets/images/{list_open.png → umlaut_icons/list-open.png} +0 -0
  20. data/app/assets/javascripts/umlaut.js +5 -4
  21. data/app/assets/javascripts/umlaut/ajax_windows.js +41 -23
  22. data/app/assets/javascripts/umlaut/expand_contract_toggle.js +21 -29
  23. data/app/assets/javascripts/umlaut/load_permalink.js +26 -0
  24. data/app/assets/javascripts/umlaut/search_autocomplete.js +103 -44
  25. data/app/assets/stylesheets/umlaut.css.scss +19 -0
  26. data/app/assets/stylesheets/umlaut/_admin.scss +14 -0
  27. data/app/assets/stylesheets/umlaut/_az.scss +29 -0
  28. data/app/assets/stylesheets/umlaut/_forms.scss +31 -0
  29. data/app/assets/stylesheets/umlaut/_icons.scss +64 -0
  30. data/app/assets/stylesheets/umlaut/_layout.scss +52 -0
  31. data/app/assets/stylesheets/umlaut/_misc.scss +59 -0
  32. data/app/assets/stylesheets/umlaut/_mixins.scss +65 -0
  33. data/app/assets/stylesheets/umlaut/_modal.scss +4 -0
  34. data/app/assets/stylesheets/umlaut/_resolve.scss +308 -0
  35. data/app/assets/stylesheets/umlaut/_results.scss +34 -0
  36. data/app/assets/stylesheets/umlaut/_search.scss +14 -0
  37. data/app/assets/stylesheets/umlaut/_spinner.scss +12 -0
  38. data/app/assets/stylesheets/umlaut/_variables.scss +72 -0
  39. data/app/controllers/export_email_controller.rb +22 -39
  40. data/app/controllers/journal_tocs_controller +90 -0
  41. data/app/controllers/js_helper_controller.rb +2 -3
  42. data/app/controllers/link_router_controller.rb +32 -43
  43. data/app/controllers/open_search_controller.rb +3 -4
  44. data/app/controllers/resolve_controller.rb +68 -107
  45. data/app/controllers/resource_controller.rb +14 -20
  46. data/app/controllers/search_controller.rb +75 -94
  47. data/app/controllers/search_methods/README.md +28 -0
  48. data/app/controllers/search_methods/sfx4.rb +50 -119
  49. data/app/controllers/search_methods/sfx4_solr/README.md +57 -0
  50. data/app/controllers/search_methods/sfx4_solr/local.rb +40 -0
  51. data/app/controllers/search_methods/sfx4_solr/searcher.rb +90 -0
  52. data/app/controllers/store_controller.rb +24 -30
  53. data/app/controllers/umlaut/controller_behavior.rb +45 -17
  54. data/app/controllers/umlaut/error_handling.rb +20 -25
  55. data/{lib → app/controllers}/umlaut_configurable.rb +35 -21
  56. data/app/controllers/umlaut_controller.rb +43 -46
  57. data/app/helpers/emailer_helper.rb +9 -16
  58. data/app/helpers/export_email_helper.rb +8 -8
  59. data/app/helpers/open_search_helper.rb +2 -3
  60. data/app/helpers/resolve_helper.rb +130 -100
  61. data/app/helpers/search_helper.rb +17 -5
  62. data/app/helpers/umlaut/footer_helper.rb +1 -1
  63. data/app/helpers/umlaut/helper.rb +34 -0
  64. data/app/helpers/umlaut/html_head_helper.rb +12 -21
  65. data/{lib → app/mixin_logic}/marc_helper.rb +1 -1
  66. data/{lib → app/mixin_logic}/metadata_helper.rb +6 -5
  67. data/{lib → app/mixin_logic}/umlaut_http.rb +0 -0
  68. data/{lib → app/mixin_logic}/xml_schema_helper.rb +0 -0
  69. data/app/models/collection.rb +97 -95
  70. data/{lib → app/models}/hip3/bib.rb +0 -0
  71. data/{lib → app/models}/hip3/bib_searcher.rb +0 -0
  72. data/{lib → app/models}/hip3/custom_field_lookup.rb +0 -0
  73. data/{lib → app/models}/hip3/holding.rb +0 -0
  74. data/{lib → app/models}/hip3/item.rb +0 -0
  75. data/{lib → app/models}/hip3/receipt.rb +0 -0
  76. data/{lib → app/models}/hip3/serial_copy.rb +0 -0
  77. data/app/models/permalink.rb +3 -8
  78. data/app/models/referent.rb +29 -21
  79. data/app/models/request.rb +19 -8
  80. data/app/models/service_response.rb +24 -3
  81. data/app/models/service_store.rb +108 -39
  82. data/app/models/service_store.rb-NEW +73 -0
  83. data/app/models/service_wave.rb +2 -0
  84. data/app/models/sfx4/abstract/README.md +68 -0
  85. data/app/models/sfx4/abstract/az_extra_info.rb +44 -0
  86. data/app/models/sfx4/abstract/az_letter_group.rb +24 -0
  87. data/app/models/sfx4/abstract/az_title.rb +96 -0
  88. data/app/models/sfx4/abstract/az_title_search.rb +24 -0
  89. data/app/models/sfx4/abstract/base.rb +77 -0
  90. data/app/models/sfx4/global/base.rb +24 -0
  91. data/app/models/sfx4/global/kb_objects.rb +34 -0
  92. data/app/models/sfx4/local/az_extra_info.rb +7 -0
  93. data/app/models/sfx4/local/az_letter_group.rb +7 -0
  94. data/app/models/sfx4/local/az_title.rb +7 -0
  95. data/app/models/sfx4/local/az_title_search.rb +7 -0
  96. data/app/models/sfx4/local/base.rb +26 -0
  97. data/{lib → app/presentation}/section_renderer.rb +0 -12
  98. data/app/referent_filters/dissertation_catch.rb +67 -0
  99. data/{lib → app/referent_filters}/referent_filter.rb +0 -0
  100. data/{lib → app}/service_adaptors/ajax_export.rb +0 -0
  101. data/{lib → app}/service_adaptors/amazon.rb +2 -0
  102. data/{lib → app}/service_adaptors/blacklight.rb +22 -10
  103. data/{lib → app}/service_adaptors/book_finder.rb +0 -0
  104. data/{lib → app}/service_adaptors/bx.rb +0 -0
  105. data/{lib → app}/service_adaptors/cover_thing.rb +0 -0
  106. data/{lib → app}/service_adaptors/dummy_service.rb +0 -0
  107. data/{lib → app}/service_adaptors/elsevier_cover.rb +0 -0
  108. data/{lib → app}/service_adaptors/email_export.rb +0 -0
  109. data/{lib → app}/service_adaptors/ezproxy.rb +0 -0
  110. data/{lib → app}/service_adaptors/google_book_search.rb +0 -0
  111. data/app/service_adaptors/google_scholar_link.rb +71 -0
  112. data/{lib → app}/service_adaptors/gpo.rb +0 -0
  113. data/{lib → app}/service_adaptors/hathi_trust.rb +0 -0
  114. data/{lib → app}/service_adaptors/hip3_service.rb +0 -0
  115. data/{lib → app}/service_adaptors/hip_holding_search.rb +0 -0
  116. data/{lib → app}/service_adaptors/internet_archive.rb +0 -0
  117. data/{lib → app}/service_adaptors/isbn_db.rb +0 -0
  118. data/{lib → app}/service_adaptors/isi.rb +22 -13
  119. data/{lib → app}/service_adaptors/jcr.rb +0 -0
  120. data/{lib → app}/service_adaptors/opac.rb +0 -0
  121. data/{lib → app}/service_adaptors/open_library.rb +0 -0
  122. data/{lib → app}/service_adaptors/open_library_cover.rb +0 -0
  123. data/{lib → app}/service_adaptors/pubmed.rb +0 -0
  124. data/{lib → app}/service_adaptors/request_to_fixture.rb +0 -0
  125. data/{lib → app}/service_adaptors/scopus.rb +0 -0
  126. data/{lib → app/service_adaptors}/service.rb +3 -3
  127. data/{lib → app}/service_adaptors/sfx.rb +154 -11
  128. data/{lib → app}/service_adaptors/sfx_backchannel_record.rb +0 -0
  129. data/app/service_adaptors/tr_link.rb +267 -0
  130. data/app/service_adaptors/tr_links.rb +278 -0
  131. data/{lib → app}/service_adaptors/txt_holding_export.rb +0 -0
  132. data/{lib → app}/service_adaptors/ulrichs_cover.rb +0 -0
  133. data/{lib → app}/service_adaptors/ulrichs_link.rb +0 -0
  134. data/{lib → app}/service_adaptors/worldcat.rb +0 -0
  135. data/{lib → app}/service_adaptors/worldcat_identities.rb +0 -0
  136. data/app/views/admin/service_errors/_dispatched_service.html.erb +13 -13
  137. data/app/views/admin/service_errors/index.html.erb +11 -21
  138. data/app/views/export_email/email.html.erb +17 -2
  139. data/app/views/export_email/send_email.html.erb +2 -1
  140. data/app/views/export_email/send_txt.html.erb +2 -1
  141. data/app/views/export_email/txt.html.erb +30 -2
  142. data/app/views/layouts/umlaut.html.erb +29 -49
  143. data/app/views/resolve/_background_progress.html.erb +43 -50
  144. data/app/views/resolve/_background_updater.html.erb +23 -36
  145. data/app/views/resolve/_citation.html.erb +63 -87
  146. data/app/views/resolve/_compact_citation.html.erb +15 -33
  147. data/app/views/resolve/_cover_image.html.erb +34 -43
  148. data/app/views/resolve/_fulltext.html.erb +29 -50
  149. data/app/views/resolve/_help.html.erb +17 -14
  150. data/app/views/resolve/_holding.html.erb +65 -82
  151. data/app/views/resolve/_manually_entered_warning.html.erb +7 -0
  152. data/app/views/resolve/_modal.html.erb +19 -0
  153. data/app/views/resolve/_related_items.html.erb +20 -35
  154. data/app/views/resolve/_search_inside.html.erb +34 -57
  155. data/app/views/resolve/_section_display.html.erb +34 -46
  156. data/app/views/resolve/_section_heading.html.erb +17 -0
  157. data/app/views/resolve/_service_errors.html.erb +27 -28
  158. data/app/views/resolve/_standard_response_item.html.erb +42 -72
  159. data/app/views/resolve/background_status.html.erb +19 -23
  160. data/app/views/resolve/get_permalink.html.erb +6 -0
  161. data/app/views/resolve/index.html.erb +47 -73
  162. data/app/views/search/_a_to_z.html.erb +9 -6
  163. data/app/views/search/_citation.html.erb +73 -94
  164. data/app/views/search/_pager.html.erb +6 -6
  165. data/app/views/search/books.html.erb +34 -102
  166. data/app/views/search/journal_search.html.erb +53 -90
  167. data/app/views/search/journals.html.erb +73 -167
  168. data/app/views/umlaut/_header.html.erb +9 -0
  169. data/app/views/umlaut/error.html.erb +44 -44
  170. data/config/locales/en.yml +5 -0
  171. data/lib/{CronTab.rb → cron_tab.rb} +0 -0
  172. data/lib/generators/templates/umlaut_services.yml +57 -43
  173. data/lib/generators/umlaut/install_generator.rb +12 -0
  174. data/lib/service_adaptors/README.md +0 -0
  175. data/lib/tasks/umlaut.rake +8 -24
  176. data/lib/umlaut.rb +1 -21
  177. data/lib/umlaut/version.rb +1 -1
  178. data/test/README.md +75 -0
  179. data/test/dummy/app/controllers/umlaut_controller.rb +3 -3
  180. data/test/dummy/config/application.rb +3 -0
  181. data/test/dummy/config/sunspot.yml +20 -0
  182. data/test/dummy/config/travis_database.yml +96 -0
  183. data/test/dummy/config/umlaut_services.yml +16 -23
  184. data/test/dummy/db/migrate/20120927163304_sfx4_global.rb +26 -0
  185. data/test/dummy/db/migrate/20120927164040_sfx4_local.rb +54 -0
  186. data/test/dummy/tmp/cache/assets/BBA/6A0/sprockets%2F2a335471966f33256b321f8324041981 +0 -0
  187. data/test/dummy/tmp/cache/assets/C2A/410/sprockets%2Fd654b74912b4773a2534616863fb6565 +0 -0
  188. data/test/dummy/tmp/cache/assets/C45/A30/sprockets%2F39494895e462697b478d3d0c79298a26 +0 -0
  189. data/test/dummy/tmp/cache/assets/C49/730/sprockets%2F212d35831188417b5131e3e693aa69a6 +0 -0
  190. data/test/dummy/tmp/cache/assets/C55/1D0/sprockets%2F5af2f2a3403040f736981863fd278529 +0 -0
  191. data/test/dummy/tmp/cache/assets/C5A/A80/sprockets%2F2328c7370b56b4151776981a5f6d394e +0 -0
  192. data/test/dummy/tmp/cache/assets/C5F/340/sprockets%2F99692920160b7a279b86a80415b79db7 +0 -0
  193. data/test/dummy/tmp/cache/assets/C70/4D0/sprockets%2F034ad2036e623081bd352800786dfe80 +0 -0
  194. data/test/dummy/tmp/cache/assets/C80/980/sprockets%2Fc94807409c1523d43e18d25f35d93c41 +0 -0
  195. data/test/dummy/tmp/cache/assets/C94/E20/sprockets%2F19579abc248373f419b1c3e287d74598 +0 -0
  196. data/test/dummy/tmp/cache/assets/C98/330/sprockets%2F0c81574ba94abc10657315d4190c201f +0 -0
  197. data/test/dummy/tmp/cache/assets/CA4/440/sprockets%2F0feb4425db6319d7d0582192a503671b +0 -0
  198. data/test/dummy/tmp/cache/assets/CA7/E80/sprockets%2F33310f455a870eaedd6d938e30620714 +0 -0
  199. data/test/dummy/tmp/cache/assets/CB8/3C0/sprockets%2F697cd846490fda9f0e20c558320610f8 +0 -0
  200. data/test/dummy/tmp/cache/assets/CBF/B60/sprockets%2F08ca89671549936265dcb673bf02e36f +0 -0
  201. data/test/dummy/tmp/cache/assets/CC7/F10/sprockets%2F939637f806eef3f0f21584659458ab2e +0 -0
  202. data/test/dummy/tmp/cache/assets/CC9/9F0/sprockets%2F306166316e2cafd13c15e62b51a2339d +0 -0
  203. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  204. data/test/dummy/tmp/cache/assets/CF7/2B0/sprockets%2F25a7c73655bd3598173b39d9f98bcd46 +0 -0
  205. data/test/dummy/tmp/cache/assets/CF8/DA0/sprockets%2Ff5b8c8499d3da954d392fa57739503c5 +0 -0
  206. data/test/dummy/tmp/cache/assets/CF9/590/sprockets%2F096bcc45cd31b3796fa2121cd203215f +0 -0
  207. data/test/dummy/tmp/cache/assets/CFE/080/sprockets%2F37fe9f4255baddbd549a659914929398 +0 -0
  208. data/test/dummy/tmp/cache/assets/D04/CC0/sprockets%2Fe9c1b92f2e437e1bbbe020d718739220 +0 -0
  209. data/test/dummy/tmp/cache/assets/D0B/090/sprockets%2F58009091c95e3ac328c91c68fca30e0e +0 -0
  210. data/test/dummy/tmp/cache/assets/D1A/B50/sprockets%2F2db5892438129fe94da8429b8be114ec +0 -0
  211. data/test/dummy/tmp/cache/assets/D2D/1A0/sprockets%2F376426b4896a3cff7969ce6c7b387e0e +0 -0
  212. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  213. data/test/dummy/tmp/cache/assets/D37/2B0/sprockets%2F40834fb07d7318c1fddd5003bd9e04f6 +0 -0
  214. data/test/dummy/tmp/cache/assets/D43/0D0/sprockets%2F682843a8d0795a5fbcfeb2f0c81727d0 +0 -0
  215. data/test/dummy/tmp/cache/assets/D46/F80/sprockets%2Fb15c08e749067d7aad9baf5e9388221c +0 -0
  216. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  217. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  218. data/test/dummy/tmp/cache/assets/D6C/7D0/sprockets%2F8a05d6981ec0d38c51739bef0b3a9c2b +0 -0
  219. data/test/dummy/tmp/cache/assets/D6E/CF0/sprockets%2F5661c6e4f0cea86fe4523f27261aade5 +0 -0
  220. data/test/dummy/tmp/cache/assets/D94/FF0/sprockets%2F3b56a1aa77de0d570c38a4a9d5f4b1d6 +0 -0
  221. data/test/dummy/tmp/cache/assets/D97/6B0/sprockets%2Fb070e8c799d1a4ad5e62e0a1ae3b83e6 +0 -0
  222. data/test/dummy/tmp/cache/assets/D9A/2F0/sprockets%2Fbba0f4b972dc53c15ce6c8c1993b82a4 +0 -0
  223. data/test/dummy/tmp/cache/assets/D9C/860/sprockets%2Fec2d9f20b270d70e698ff33e53c21fca +0 -0
  224. data/test/dummy/tmp/cache/assets/DA6/A80/sprockets%2F92e26d8e58d5bcc8b8f6c25d1b05b9c1 +0 -0
  225. data/test/dummy/tmp/cache/assets/DA8/BB0/sprockets%2F0cf1c7e9f966dce425517c0e2a844efe +0 -0
  226. data/test/dummy/tmp/cache/assets/DA9/BC0/sprockets%2Fcb9062b73291befe5e5bf2a70978dec8 +0 -0
  227. data/test/dummy/tmp/cache/assets/DB6/ED0/sprockets%2Ff4482d9b9f76fb65eef16430bde2f8e6 +0 -0
  228. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  229. data/test/dummy/tmp/cache/assets/DE8/790/sprockets%2Fd1333bde2b9aafcc712d11dd09ab35d8 +0 -0
  230. data/test/dummy/tmp/cache/assets/DF7/960/sprockets%2F99ac6db10b44a64fbba4ee847b35ba8b +0 -0
  231. data/test/dummy/tmp/cache/assets/DFD/300/sprockets%2Fabac9489cf7f1db8ef00d72a1571ee1e +0 -0
  232. data/test/dummy/tmp/cache/assets/E02/C10/sprockets%2F1463cadfce3fc70e61d482f9fcb75ac7 +0 -0
  233. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  234. data/test/dummy/tmp/cache/assets/E38/FE0/sprockets%2Fe1fc875efa817cbb94a5d8de25ea4e6b +0 -0
  235. data/test/dummy/tmp/cache/assets/E50/F00/sprockets%2Fec61afdbb1cc4df075e3dad46f0af571 +0 -0
  236. data/test/dummy/tmp/cache/assets/E5E/5F0/sprockets%2Feffaeb4d7f9bf4c0cc840ff320fde046 +0 -0
  237. data/test/dummy/tmp/cache/assets/E5F/960/sprockets%2Fdc007b6cad5c7ef08e33ec28cfff0ef6 +0 -0
  238. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_accordion.scssc +0 -0
  239. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_alerts.scssc +0 -0
  240. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_breadcrumbs.scssc +0 -0
  241. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_button-groups.scssc +0 -0
  242. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_buttons.scssc +0 -0
  243. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_carousel.scssc +0 -0
  244. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_close.scssc +0 -0
  245. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_code.scssc +0 -0
  246. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_component-animations.scssc +0 -0
  247. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_dropdowns.scssc +0 -0
  248. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_forms.scssc +0 -0
  249. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_grid.scssc +0 -0
  250. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_hero-unit.scssc +0 -0
  251. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_labels-badges.scssc +0 -0
  252. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_layouts.scssc +0 -0
  253. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_media.scssc +0 -0
  254. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_mixins.scssc +0 -0
  255. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_modals.scssc +0 -0
  256. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_navbar.scssc +0 -0
  257. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_navs.scssc +0 -0
  258. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_pager.scssc +0 -0
  259. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_pagination.scssc +0 -0
  260. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_popovers.scssc +0 -0
  261. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_progress-bars.scssc +0 -0
  262. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_reset.scssc +0 -0
  263. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_responsive-1200px-min.scssc +0 -0
  264. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_responsive-767px-max.scssc +0 -0
  265. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_responsive-768px-979px.scssc +0 -0
  266. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_responsive-navbar.scssc +0 -0
  267. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_responsive-utilities.scssc +0 -0
  268. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_scaffolding.scssc +0 -0
  269. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_sprites.scssc +0 -0
  270. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_tables.scssc +0 -0
  271. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_thumbnails.scssc +0 -0
  272. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_tooltip.scssc +0 -0
  273. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_type.scssc +0 -0
  274. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_utilities.scssc +0 -0
  275. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_variables.scssc +0 -0
  276. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_wells.scssc +0 -0
  277. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/bootstrap.scssc +0 -0
  278. data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/responsive.scssc +0 -0
  279. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_admin.scssc +0 -0
  280. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_az.scssc +0 -0
  281. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_base.scssc +0 -0
  282. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_forms.scssc +0 -0
  283. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_icons.scssc +0 -0
  284. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_misc.scssc +0 -0
  285. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_mixins.scssc +0 -0
  286. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_modal.scssc +0 -0
  287. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_resolve.scssc +0 -0
  288. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_results.scssc +0 -0
  289. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_search.scssc +0 -0
  290. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_spinner.scssc +0 -0
  291. data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_variables.scssc +0 -0
  292. data/test/dummy/tmp/cache/sass/93d65682d6bddb0b2e6788c1232f4849af20a35e/bootstrap-responsive.scssc +0 -0
  293. data/test/dummy/tmp/cache/sass/93d65682d6bddb0b2e6788c1232f4849af20a35e/bootstrap.scssc +0 -0
  294. data/test/dummy/tmp/cache/sass/fb58c04fd15fcc38a8c4d91b7070bcfeaf1c3799/umlaut.css.scssc +0 -0
  295. data/test/fixtures/dispatched_services.yml +0 -4
  296. data/test/fixtures/permalinks.yml +23 -4
  297. data/test/fixtures/referent_values.yml +226 -1493
  298. data/test/fixtures/referents.yml +14 -137
  299. data/test/fixtures/requests.yml +22 -260
  300. data/test/fixtures/service_responses.yml +169 -5
  301. data/test/fixtures/sfx4/global/KB_OBJECTS.yml +46 -0
  302. data/test/fixtures/sfx4/local/AZ_EXTRA_INFO.yml +4802 -0
  303. data/test/fixtures/sfx4/local/AZ_LETTER_GROUP.yml +105 -0
  304. data/test/fixtures/sfx4/local/AZ_TITLE.yml +165 -0
  305. data/test/fixtures/sfx4/local/AZ_TITLE_SEARCH.yml +341 -0
  306. data/test/fixtures/sfx_urls.yml +3 -0
  307. data/test/functional/export_email_controller_test.rb +43 -0
  308. data/test/functional/link_router_controller_test.rb +16 -0
  309. data/test/functional/resolve_controller_test.rb +102 -0
  310. data/test/functional/search_controller_test.rb +40 -0
  311. data/test/functional/store_controller_test.rb +29 -0
  312. data/test/helper/list_with_limit_test.rb +90 -0
  313. data/test/integration/permalinks_test.rb +14 -0
  314. data/test/support/search_methods/test_case.rb +0 -0
  315. data/test/support/service_adaptors/test_case.rb +0 -0
  316. data/test/support/test_with_cassette.rb +37 -0
  317. data/test/test_helper.rb +76 -30
  318. data/test/unit/aws_product_sign_test.rb +2 -0
  319. data/test/unit/determine_services_test.rb +163 -0
  320. data/test/unit/google_book_search_test.rb +8 -25
  321. data/test/unit/google_scholar_link_test.rb +81 -0
  322. data/test/unit/internet_archive_test.rb +33 -0
  323. data/test/unit/permalink_test.rb +15 -0
  324. data/test/unit/service_store_test.rb +47 -0
  325. data/test/unit/service_test.rb +28 -13
  326. data/test/unit/sfx/sfx_target_roll_up_test.rb +369 -0
  327. data/test/unit/sfx4_search_test.rb +102 -0
  328. data/test/unit/sfx4_solr_search_test.rb +77 -0
  329. data/test/unit/sfx_test.rb +38 -0
  330. data/test/unit/worldcat_test.rb +7 -0
  331. data/test/vcr_cassettes/google_book_search/frankenstein_by_OCLC_number.yml +107 -0
  332. data/test/vcr_cassettes/internet_archive/momo_by_title_author.yml +116 -0
  333. data/test/vcr_cassettes/resolve/fulltext_with_edition_warning.yml +44 -0
  334. data/test/vcr_cassettes/resolve/no_holdings.yml +649 -0
  335. data/test/vcr_cassettes/resolve/nytimes_by_issn.yml +224 -0
  336. data/test/vcr_cassettes/sfx/nytimes_by_issn.yml +1395 -0
  337. data/test/vcr_cassettes/sfx4_solr/find_by_group.yml +109 -0
  338. data/test/vcr_cassettes/sfx4_solr/find_by_title_begins_with.yml +33 -0
  339. data/test/vcr_cassettes/sfx4_solr/find_by_title_contains.yml +34 -0
  340. data/test/vcr_cassettes/sfx4_solr/find_by_title_exact.yml +32 -0
  341. data/test/view/holding_test.rb +30 -0
  342. metadata +435 -179
  343. data/app/assets/images/export_bg_bot.gif +0 -0
  344. data/app/assets/images/export_bg_mid.gif +0 -0
  345. data/app/assets/images/export_bg_top.gif +0 -0
  346. data/app/assets/images/famfamfam/page_sound.gif +0 -0
  347. data/app/assets/images/famfamfam/page_text.gif +0 -0
  348. data/app/assets/images/famfamfam/page_up.gif +0 -0
  349. data/app/assets/images/ico_go.gif +0 -0
  350. data/app/assets/images/more_info.gif +0 -0
  351. data/app/assets/images/rails.png +0 -0
  352. data/app/assets/images/request.gif +0 -0
  353. data/app/assets/javascripts/umlaut/simple_visible_toggle.js +0 -8
  354. data/app/assets/stylesheets/umlaut.css +0 -900
  355. data/app/assets/stylesheets/umlaut/_background_progress_spinner.scss +0 -21
  356. data/app/assets/stylesheets/umlaut/_expand_contract.scss +0 -28
  357. data/app/controllers/search_methods/sfx3.rb +0 -148
  358. data/app/models/sfx_db.rb +0 -10
  359. data/app/models/sfx_db/az_additional_title.rb +0 -11
  360. data/app/models/sfx_db/az_letter_group.rb +0 -11
  361. data/app/models/sfx_db/az_title.rb +0 -40
  362. data/app/models/sfx_db/az_title_v2.rb +0 -34
  363. data/app/models/sfx_db/isbn.rb +0 -12
  364. data/app/models/sfx_db/issn.rb +0 -12
  365. data/app/models/sfx_db/object.rb +0 -35
  366. data/app/models/sfx_db/object_portfolio.rb +0 -6
  367. data/app/models/sfx_db/publisher.rb +0 -10
  368. data/app/models/sfx_db/sfx_db_base.rb +0 -58
  369. data/app/models/sfx_db/target.rb +0 -10
  370. data/app/models/sfx_db/target_service.rb +0 -10
  371. data/app/models/sfx_db/title.rb +0 -10
  372. data/app/views/export_email/_email.html.erb +0 -25
  373. data/app/views/export_email/_send_email.html.erb +0 -3
  374. data/app/views/export_email/_send_txt.html.erb +0 -3
  375. data/app/views/export_email/_txt.html.erb +0 -62
  376. data/lib/holding.rb +0 -32
  377. data/lib/opensearch_feed.rb +0 -398
  378. data/lib/opensearch_query.rb +0 -98
  379. data/lib/referent_filters/dissertation_catch.rb +0 -45
  380. data/lib/service_adaptors/journal_tocs.progress +0 -68
  381. data/lib/service_adaptors/primo_service.rb +0 -452
  382. data/lib/service_adaptors/primo_source.rb +0 -82
  383. data/lib/umlaut/default_configuration.rb +0 -5
  384. data/test/dummy/config/primo.yml +0 -271
  385. data/test/unit/primo_service_test.rb +0 -947
@@ -69,6 +69,18 @@ module Umlaut
69
69
  # password:
70
70
  # pool: 5
71
71
  # encoding: utf8
72
+ #
73
+ # UMLAUT: for Sfx4Solr functionality. If you're not using SFX 4 indexed in
74
+ # Solr via Sunspot, feel free to ignore this.
75
+ #sfx4_global:
76
+ # adapter: mysql2
77
+ # host: my_sfx_host.u.edu
78
+ # port: 3310 # 3310 is defualt SFX embedded mysql port
79
+ # database: sfxglb41 # or other sfx global db
80
+ # username:
81
+ # password:
82
+ # pool: 5
83
+ # encoding: utf8
72
84
  #
73
85
  eos
74
86
  end
File without changes
@@ -6,40 +6,24 @@ namespace :umlaut do
6
6
 
7
7
  desc "Loads sfx_urls from SFX installation. SFX mysql login needs to be set in config."
8
8
  task :load_sfx_urls => :environment do
9
-
10
- if SfxDb.connection_configured?
11
-
12
- puts "Loading SFXUrls via direct access to SFX db."
13
- #sfxlcl41.TARGET_SERVICE
14
- # Check if we have an SFX3 schema, or if not use SFX4
15
- sfx3 = true
16
- begin
17
- SfxDb::Object.connection.select_all("SHOW FIELDS FROM TARGET_SERVICE")
18
- rescue ActiveRecord::StatementInvalid
19
- sfx3 = false
20
- end
21
-
22
- if sfx3
23
- urls = SfxDb::SfxDbBase.fetch_sfx_urls
24
- else
25
- urls = SearchMethods::Sfx4.fetch_sfx_urls
26
- end
27
-
9
+ # Get the configured searcher
10
+ searcher = UmlautController.umlaut_config.lookup!("search.az_search_method", SearchMethods::Sfx4)
11
+ if searcher.fetch_urls?
12
+ puts "Loading SfxUrls (e.g. via direct access to SFX db)."
13
+ # Grab the urls
14
+ urls = searcher.fetch_urls
28
15
  ignore_urls = UmlautController.umlaut_config.lookup!("sfx.sfx_load_ignore_hosts", [])
29
-
30
16
  # We only want the hostnames
31
17
  hosts = urls.collect do |u|
32
18
  begin
33
- uri = URI.parse(u)
34
- uri.host
19
+ uri = URI.parse(u)
20
+ uri.host
35
21
  rescue Exception
36
22
  end
37
23
  end
38
24
  hosts.uniq!
39
-
40
25
  SfxUrl.transaction do
41
26
  SfxUrl.delete_all
42
-
43
27
  hosts.each {|h| SfxUrl.new({:url => h}).save! unless ignore_urls.find {|ignore| ignore === h }}
44
28
  end
45
29
  else
data/lib/umlaut.rb CHANGED
@@ -3,28 +3,12 @@ require 'umlaut/routes'
3
3
  # not sure why including openurl gem doesn't do the require, but it
4
4
  # seems to need this.
5
5
  require 'openurl'
6
+ require 'bootstrap-sass'
6
7
 
7
8
  module Umlaut
8
9
  class Engine < Rails::Engine
9
10
  engine_name "umlaut"
10
11
 
11
- # we store some things in non-standard subdirs, add em to path.
12
- #
13
- # We EAGER load em all to try and handle threading issues.
14
-
15
- config.autoload_paths << File.join(self.root, "lib", "referent_filters")
16
- config.eager_load_paths << File.join(self.root, "lib", "referent_filters")
17
-
18
- config.autoload_paths << File.join(self.root, "lib", "service_adaptors")
19
- config.eager_load_paths << File.join(self.root, "lib", "service_adaptors")
20
-
21
- # Ane make 'lib' dir auto-loaded, because we have legacy Rails2 code
22
- # that assumes it.
23
- config.autoload_paths << File.join(self.root, "lib")
24
- # Sadly including eager_load_paths here makes weird things happen, apparently
25
- # I don't entirely understand what's going on.
26
- #config.eager_load_paths << File.join(self.root, "lib")
27
-
28
12
  # We need the update_html.js script to be available as it's own
29
13
  # JS file too, not just compiled into application.js, so we can
30
14
  # deliver it to external apps using it (JQuery Content Utility).
@@ -41,9 +25,5 @@ module Umlaut
41
25
  #initializer("#{engine_name}.patch_connection_pool", :before => "active_record.initialize_database") do |app|
42
26
  load File.join(self.root, "active_record_patch", "connection_pool.rb")
43
27
  #end
44
-
45
-
46
-
47
-
48
28
  end
49
29
  end
@@ -1,3 +1,3 @@
1
1
  module Umlaut
2
- VERSION = "3.0.5"
2
+ VERSION = "3.1.0.pre1"
3
3
  end
data/test/README.md ADDED
@@ -0,0 +1,75 @@
1
+ #Testing Umlaut
2
+
3
+ Testing coverage in Umlaut is not yet comprehensive, but is continually improving.
4
+ There is more about this topic on the [Umlaut Wiki](https://github.com/team-umlaut/umlaut/wiki/Developing)
5
+
6
+ ##Testing Principles
7
+
8
+ When writing tests for Umlaut, there are a few things you should keep in mind.
9
+
10
+ ### Dummy app
11
+
12
+ We used rails 3.1 `rails plugin new` generator to create a gem plugin skeleton for Umlaut.
13
+ One thing this did was create a `./test/dummy` dummy app in umlaut source.
14
+ This is meant for running tests against. Tests you write in `/test/*` will run against the dummy app.
15
+ The dummy app can have configuration customized (with those changes committed) if needed to exercise certain features
16
+ (although changing config 'live' and temporarily in a test itself would be preferable where feasible).
17
+ The dummy app doesn't have a `database.yml`, you'll need to add one pointing at a local mysql
18
+ (not sqlite3, umlaut won't work against sqlite3).
19
+
20
+ ### Test::Unit/Minitest please
21
+
22
+ Please use straight Test::Unit and/or Minitest. Please do not use rspec, cucumber, etc. Put tests in `./test`. There's already a `rake test` to run all tests.
23
+
24
+ ### Tests should pass locally for everyone
25
+
26
+ Tests should pass for everyone with a straight umlaut checkout without modifying any files but adding a database.yml.
27
+
28
+ Please don't add tests that raise or fail without a private API key or access to a private server.
29
+ We've started to use the [VCR](https://github.com/myronmarston/vcr) gem to record HTTP responses to provide deterministic testing results.
30
+ VCR "cassettes" are committed to the repo in `./test/vcr_cassettes/<module>`.
31
+ To run VCR tests, you can leverage the `TestWithCassette` support module following the example below.
32
+
33
+ class GoogleBookSearchTest < ActiveSupport::TestCase
34
+ extend TestWithCassette
35
+
36
+ # Use VCR to provide a deterministic GBS search.
37
+ test_with_cassette("frankenstein by OCLC number", :google_book_search) do
38
+ hashified_response = @gbs_default.do_query('OCLC2364071', requests(:frankenstein))
39
+ assert_not_nil hashified_response
40
+ assert_not_nil hashified_response["totalItems"]
41
+ assert_operator hashified_response["totalItems"], :>, 0
42
+ end
43
+ end
44
+
45
+ We still want to figure out a way for someone with access to the necessary third party platforms to
46
+ choose to run against 'live' too (for only specified services?)
47
+ (and then commit the new versions of the responses back to repo if they want).
48
+ There's some stuff to figure out, yeah.
49
+
50
+ If you really must write tests that require private api keys or access to private servers to pass,
51
+ then I guess that's better than no tests at all, but figure out a way to:
52
+
53
+ * Clearly document where the developer should put those private api keys or local server URLs to get tests to pass.
54
+ * Keep from interfering with running the rest of the test suite for a developer who does not have that private information filled out.
55
+ Ideally tests that require it would output a clear 'skipped' or 'pending' message
56
+ (explaining what needs to be configured to run them_ rather than failing.)
57
+ **In no cases should they raise exceptions in such a way that prevents the rest of the test suite from continuing.**
58
+
59
+ ### Test should pass on Travis, too
60
+
61
+ [Travis](http://travis-ci.org) is a continuous integration service for the open source community that Umlaut leverages to run tests.
62
+ One reason to use Test::Unit/Minitest is that [Travis](https://travis-ci.org/#!/team-umlaut/umlaut) will automatically run your tests.
63
+
64
+ Travis creates the necessary MySQL databases and runs tests against the dummy app based on the database configuration in
65
+ `./test/dummy/config/travis_database.yml`.
66
+
67
+ One specific test Travis runs is for SFX search functionality.
68
+ Travis uses the configuration in `./test/dummy/config/travis_database.yml` to create a mock instance of an
69
+ SFX global and local database, migrates the SFX database schema and the test populates the database with
70
+ deterministic SFX Object and AZ Title fixtures.
71
+ It tests basic search functionality and serves as a sanity check to make sure SFX searching is working as expected.
72
+ This test make @jrochkind very nervous, and **you probably shouldn't ever run this test locally**. The migrations and test code
73
+ only run in the case that the SFX database configuration is specified as a 'mock instance' in order to prevent overwriting
74
+ a real SFX database. (Yet another reason the Umlaut user that queries SFX should only have read permissions.)
75
+
@@ -65,10 +65,10 @@ class UmlautController < ApplicationController
65
65
  # and citation entry.
66
66
  search do
67
67
  # Is your SFX database connection, defined in database.yml under
68
- # sfx_db and used for A-Z searches, Sfx3 or Sfx4? Other SearchMethods
69
- # in addition to SFX direct db may be provided later.
68
+ # sfx_db and used for A-Z searches, Sfx4 or do you want to use Sfx4Solr?
69
+ # Other SearchMethods in addition to SFX direct db may be provided later.
70
70
  #az_search_method SearchMethods::Sfx4
71
- #az_search_method SearchMethods::Sfx3
71
+ #az_search_method SearchMethods::Sfx4Solr::Local
72
72
 
73
73
  # When talking directly to the SFX A-Z list database, you may
74
74
  # need to set this, if you have multiple A-Z profiles configured
@@ -4,6 +4,9 @@ require 'rails/all'
4
4
 
5
5
  Bundler.require
6
6
  require "umlaut"
7
+ require "sunspot_rails"
8
+
9
+ require 'jquery-rails' # Oddly neccesary in our dummy app see http://www.ruby-forum.com/topic/2484569#1021529
7
10
 
8
11
  module Dummy
9
12
  class Application < Rails::Application
@@ -0,0 +1,20 @@
1
+ # Dummy config for testing sfx4solr search module.
2
+ # Solr is not running on localhost. Instead we use a
3
+ # VCR cassette to test the expected result from Solr.
4
+ production:
5
+ solr:
6
+ hostname: localhost
7
+ port: 8983
8
+ log_level: WARNING
9
+
10
+ development:
11
+ solr:
12
+ hostname: localhost
13
+ port: 8982
14
+ log_level: INFO
15
+
16
+ test:
17
+ solr:
18
+ hostname: localhost
19
+ port: 8981
20
+ log_level: WARNING
@@ -0,0 +1,96 @@
1
+ # This file is used by travis to provide continuous
2
+ # integration for umlaut. It contains "mock instances"
3
+ # of the SFX4 Global and Local databases to provide
4
+ # sanity checks for SFX searching. The file is
5
+ # renamed to database.yml as part of the travis before script
6
+ # hook.
7
+ #
8
+ # MySQL. Versions 4.1 and 5.0 are recommended.
9
+ #
10
+ # Install the MYSQL driver
11
+ # gem install mysql2
12
+ #
13
+ # Ensure the MySQL gem is defined in your Gemfile
14
+ # gem 'mysql2'
15
+ #
16
+ # And be sure to use new-style password hashing:
17
+ # http://dev.mysql.com/doc/refman/5.0/en/old-client.html
18
+ #
19
+ # UMLAUT: mysql db with mysql2 adapter strongly recommended for Umlaut, in both
20
+ # production and development. sqlite3 has unclear semantics under threaded
21
+ # concurrency which umlaut uses, and in many cases simply does not work.
22
+ #
23
+ # A high (connection) pool setting is also, sadly, generally
24
+ # required at present.
25
+ #
26
+ # development:
27
+ # adapter: mysql2
28
+ # host:
29
+ # username:
30
+ # password:
31
+ # database:
32
+ # pool: 30
33
+
34
+ development:
35
+ adapter: <%= defined?(JRUBY_VERSION) ? "mysql" : "mysql2" %>
36
+ encoding: utf8
37
+ reconnect: false
38
+ database: umlaut3_development
39
+ pool: 5
40
+ username: root
41
+ password:
42
+
43
+ # Warning: The database defined as "test" will be erased and
44
+ # re-generated from your development database when you run "rake".
45
+ # Do not set this db to the same as development or production.
46
+ test:
47
+ adapter: <%= defined?(JRUBY_VERSION) ? "mysql" : "mysql2" %>
48
+ database: umlaut3_test
49
+ pool: 5
50
+ username: root
51
+ encoding: utf8
52
+
53
+ production:
54
+ adapter: <%= defined?(JRUBY_VERSION) ? "mysql" : "mysql2" %>
55
+ encoding: utf8
56
+ reconnect: false
57
+ database: umlaut3
58
+ pool: 30
59
+ username:
60
+ password:
61
+
62
+ #
63
+ # UMLAUT: for the 'search' functions (A-Z title lookup) to work, you need
64
+ # a direct database connection to the SFX database, under 'sfx_db' key.
65
+ # You should manually set up a new read-only MySQL account in the SFX db
66
+ # for this purpose, rather than use one of the full-access existing SFX
67
+ # mysql accounts.
68
+ #
69
+ # In this dummy app, the sfx_db configuation is used for SFX search testing.
70
+ # DO NOT SET THIS FOR ANYTHING LIKE A REAL SFX DATABASE.
71
+ sfx_db:
72
+ adapter: <%= defined?(JRUBY_VERSION) ? "mysql" : "mysql2" %>
73
+ database: sfxlcl41_test # or other sfx instance db
74
+ username: root
75
+ password:
76
+ pool: 5
77
+ encoding: utf8
78
+ # :mock_instance is used for SFX search testing.
79
+ # DO NOT SET :mock_instance TO TRUE FOR ANYTHING LIKE A REAL SFX DATABASE.
80
+ # If in doubt set :mock_instance => false
81
+ mock_instance: true
82
+
83
+ # This is used for SFX search testing.
84
+ # DO NOT SET THIS FOR ANYTHING LIKE A REAL SFX DATABASE.
85
+ sfx4_global:
86
+ adapter: <%= defined?(JRUBY_VERSION) ? "mysql" : "mysql2" %>
87
+ database: sfxglb41_test
88
+ username: root
89
+ password:
90
+ pool: 5
91
+ encoding: utf8
92
+ # :mock_instance is used for SFX search testing.
93
+ # DO NOT SET :mock_instance TO TRUE FOR ANYTHING LIKE A REAL SFX DATABASE.
94
+ # If in doubt set :mock_instance => false
95
+ mock_instance: true
96
+
@@ -22,32 +22,17 @@ default:
22
22
 
23
23
  SFX:
24
24
  type: Sfx
25
- disabled: true
26
25
  display_name: Find It
27
- base_url: YOUR_SFX_BASE_URL
26
+ base_url: http://sfx.library.edu/local
28
27
  priority: 3
28
+ roll_up_prefixes:
29
+ - 'EBSCOHOST_'
30
+ - 'JSTOR_'
31
+ - 'PROQUEST_'
32
+ - 'SPRINGER_LINK_'
33
+ - 'ELSEVIER_SD_'
34
+ - 'HIGHWIRE_'
29
35
 
30
- Primo:
31
- type: PrimoService
32
- disabled: false
33
- display_name: Primo
34
- priority: 3
35
- base_url: http://bobcat.library.nyu.edu
36
- vid: NYU
37
- institution: NYU
38
- holding_search_institution: NYU
39
- holding_search_text: Search for this title in Primo.
40
- suppress_holdings: [ !ruby/regexp '/\$\$LBWEB/', !ruby/regexp '/\$\$LNWEB/', !ruby/regexp '/\$\$LTWEB/', !ruby/regexp '/\$\$LWEB/', !ruby/regexp '/\$\$1Restricted Internet Resources/' ]
41
- ez_proxy: !ruby/regexp '/https\:\/\/ezproxy\.library\.nyu\.edu\/login\?url=/'
42
- service_types:
43
- - holding
44
- - holding_search
45
- - fulltext
46
- - table_of_contents
47
- - referent_enhance
48
- - cover_image
49
-
50
-
51
36
  # First half of Amazon, run in foreground, get metadata and cover images.
52
37
  Amazon:
53
38
  disabled: true
@@ -107,6 +92,14 @@ default:
107
92
  priority: c
108
93
  #api_key: 'YOUR_GBS_API_KEY'
109
94
 
95
+ DummyService:
96
+ type: DummyService
97
+ priority: c
98
+ responses:
99
+ - service_type_value: holding
100
+ display_text: Library holding
101
+ url: http://holding.library.edu/DOCID
102
+
110
103
  Ulrichs:
111
104
  display_name: "Ulrich's Directory"
112
105
  type: UlrichsLink
@@ -0,0 +1,26 @@
1
+ # This is used for SFX search testing.
2
+ # DO NOT USE THIS FOR ANYTHING LIKE A REAL SFX DATABASE.
3
+ class Sfx4Global < ActiveRecord::Migration
4
+ def connection
5
+ if sfx4_mock_instance?
6
+ Sfx4::Global::Base.connection.initialize_schema_migrations_table
7
+ return Sfx4::Global::Base.connection
8
+ end
9
+ end
10
+
11
+ def change
12
+ if sfx4_mock_instance?
13
+ create_table "KB_OBJECTS", {:id => false} do |t|
14
+ t.integer "OBJECT_ID", :default => 0, :null => false, :limit => 8
15
+ end
16
+ execute "ALTER TABLE KB_OBJECTS ADD PRIMARY KEY (OBJECT_ID);"
17
+ else
18
+ puts "Skipping SFX Global migration since SFX global DB specified is not a mock instance."
19
+ end
20
+ end
21
+
22
+ def sfx4_mock_instance?
23
+ (ActiveRecord::Base.configurations["sfx4_global"] and
24
+ ActiveRecord::Base.configurations["sfx4_global"]["mock_instance"])
25
+ end
26
+ end
@@ -0,0 +1,54 @@
1
+ # This is used for SFX search testing.
2
+ # DO NOT USE THIS FOR ANYTHING LIKE A REAL SFX DATABASE.
3
+ class Sfx4Local < ActiveRecord::Migration
4
+ def connection
5
+ if sfx4_mock_instance?
6
+ Sfx4::Local::Base.connection.initialize_schema_migrations_table
7
+ return Sfx4::Local::Base.connection
8
+ end
9
+ end
10
+
11
+ def change
12
+ if sfx4_mock_instance?
13
+ create_table "AZ_TITLE", {:id => false} do |t|
14
+ t.integer "AZ_TITLE_ID", :default => 0, :null => false
15
+ t.string "AZ_PROFILE", :limit => 100, :null => false
16
+ t.integer "OBJECT_ID", :default => 0, :null => false, :limit => 8
17
+ t.string "TITLE_DISPLAY", :limit => 255, :null => false
18
+ t.string "TITLE_SORT", :limit => 200, :null => false
19
+ t.string "SCRIPT", :limit => 20, :null => false
20
+ end
21
+ execute "ALTER TABLE AZ_TITLE ADD PRIMARY KEY (AZ_TITLE_ID);"
22
+
23
+ create_table "AZ_EXTRA_INFO", {:id => false} do |t|
24
+ t.integer "AZ_EXTRA_INFO_ID", :default => 0, :null => false
25
+ t.string "AZ_PROFILE", :limit => 100, :null => false
26
+ t.integer "OBJECT_ID", :default => 0, :null => false, :limit => 8
27
+ t.text "EXTRA_INFO_XML", :limit => 16777215
28
+ end
29
+ execute "ALTER TABLE AZ_EXTRA_INFO ADD PRIMARY KEY (AZ_EXTRA_INFO_ID);"
30
+
31
+ create_table "AZ_TITLE_SEARCH", {:id => false} do |t|
32
+ t.integer "AZ_TITLE_SEARCH_ID", :default => 0, :null => false
33
+ t.string "AZ_PROFILE", :limit => 100, :null => false
34
+ t.integer "AZ_TITLE_ID", :default => 0, :null => false
35
+ t.text "TITLE_SEARCH", :null => false
36
+ end
37
+ execute "ALTER TABLE AZ_TITLE_SEARCH ADD PRIMARY KEY (AZ_TITLE_SEARCH_ID);"
38
+
39
+ create_table "AZ_LETTER_GROUP", {:id => false} do |t|
40
+ t.integer "AZ_LETTER_GROUP_ID", :default => 0, :null => false
41
+ t.integer "AZ_TITLE_ID", :default => 0, :null => false
42
+ t.string "AZ_LETTER_GROUP_NAME", :limit => 10, :null => false
43
+ end
44
+ execute "ALTER TABLE AZ_LETTER_GROUP ADD PRIMARY KEY (AZ_LETTER_GROUP_ID);"
45
+ else
46
+ puts "Skipping SFX DB migration since the SFX DB specified is not a mock instance."
47
+ end
48
+ end
49
+
50
+ def sfx4_mock_instance?
51
+ (ActiveRecord::Base.configurations["sfx_db"] and
52
+ ActiveRecord::Base.configurations["sfx_db"]["mock_instance"])
53
+ end
54
+ end