umlaut_borrow_direct 1.0.0.pre.alpha.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (277) hide show
  1. checksums.yaml +5 -13
  2. data/app/controllers/umlaut_borrow_direct/controller_implementation.rb +18 -3
  3. data/app/helpers/borrow_direct_presenter.rb +1 -1
  4. data/app/service_adaptors/borrow_direct_adaptor.rb +13 -5
  5. data/app/views/borrow_direct/_resolve_section.html.erb +7 -1
  6. data/config/locales/en.yml +4 -3
  7. data/lib/tasks/umlaut_borrow_direct_tasks.rake +118 -0
  8. data/lib/umlaut_borrow_direct/engine.rb +10 -0
  9. data/lib/umlaut_borrow_direct/version.rb +2 -2
  10. data/test/dummy/log/development.log +0 -0
  11. data/test/dummy/log/production.log +0 -0
  12. data/test/dummy/log/test.log +39242 -0
  13. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_alerts.scssc +0 -0
  14. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_background-variant.scssc +0 -0
  15. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_border-radius.scssc +0 -0
  16. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_buttons.scssc +0 -0
  17. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_center-block.scssc +0 -0
  18. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_clearfix.scssc +0 -0
  19. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_forms.scssc +0 -0
  20. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_gradients.scssc +0 -0
  21. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_grid-framework.scssc +0 -0
  22. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_grid.scssc +0 -0
  23. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_hide-text.scssc +0 -0
  24. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_image.scssc +0 -0
  25. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_labels.scssc +0 -0
  26. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_list-group.scssc +0 -0
  27. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_nav-divider.scssc +0 -0
  28. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_nav-vertical-align.scssc +0 -0
  29. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_opacity.scssc +0 -0
  30. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_pagination.scssc +0 -0
  31. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_panels.scssc +0 -0
  32. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_progress-bar.scssc +0 -0
  33. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_reset-filter.scssc +0 -0
  34. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_resize.scssc +0 -0
  35. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_responsive-visibility.scssc +0 -0
  36. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_size.scssc +0 -0
  37. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_tab-focus.scssc +0 -0
  38. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_table-row.scssc +0 -0
  39. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_text-emphasis.scssc +0 -0
  40. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_text-overflow.scssc +0 -0
  41. data/test/dummy/tmp/cache/assets/test/sass/102c044502bdc36901c19eb737fa94eb5d511cbc/_vendor-prefixes.scssc +0 -0
  42. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_alerts.scssc +0 -0
  43. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_badges.scssc +0 -0
  44. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_breadcrumbs.scssc +0 -0
  45. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_button-groups.scssc +0 -0
  46. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_buttons.scssc +0 -0
  47. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_carousel.scssc +0 -0
  48. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_close.scssc +0 -0
  49. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_code.scssc +0 -0
  50. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_component-animations.scssc +0 -0
  51. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_dropdowns.scssc +0 -0
  52. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_forms.scssc +0 -0
  53. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_glyphicons.scssc +0 -0
  54. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_grid.scssc +0 -0
  55. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_input-groups.scssc +0 -0
  56. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_jumbotron.scssc +0 -0
  57. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_labels.scssc +0 -0
  58. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_list-group.scssc +0 -0
  59. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_media.scssc +0 -0
  60. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_mixins.scssc +0 -0
  61. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_modals.scssc +0 -0
  62. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_navbar.scssc +0 -0
  63. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_navs.scssc +0 -0
  64. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_normalize.scssc +0 -0
  65. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_pager.scssc +0 -0
  66. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_pagination.scssc +0 -0
  67. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_panels.scssc +0 -0
  68. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_popovers.scssc +0 -0
  69. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_print.scssc +0 -0
  70. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_progress-bars.scssc +0 -0
  71. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_responsive-embed.scssc +0 -0
  72. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_responsive-utilities.scssc +0 -0
  73. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_scaffolding.scssc +0 -0
  74. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_tables.scssc +0 -0
  75. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_thumbnails.scssc +0 -0
  76. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_tooltip.scssc +0 -0
  77. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_type.scssc +0 -0
  78. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_utilities.scssc +0 -0
  79. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_variables.scssc +0 -0
  80. data/test/dummy/tmp/cache/assets/test/sass/1362b85f37ca4c085c17817dd2a4f41eb3ed56e6/_wells.scssc +0 -0
  81. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_admin.scssc +0 -0
  82. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_az.scssc +0 -0
  83. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_forms.scssc +0 -0
  84. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_icons.scssc +0 -0
  85. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_layout.scssc +0 -0
  86. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_misc.scssc +0 -0
  87. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_mixins.scssc +0 -0
  88. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_modal.scssc +0 -0
  89. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_resolve.scssc +0 -0
  90. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_results.scssc +0 -0
  91. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_search.scssc +0 -0
  92. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_spinner.scssc +0 -0
  93. data/test/dummy/tmp/cache/assets/test/sass/2366d925eea0f2ec723ea30502f282b3e0163b3f/_variables.scssc +0 -0
  94. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_alerts.scssc +0 -0
  95. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_background-variant.scssc +0 -0
  96. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_border-radius.scssc +0 -0
  97. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_buttons.scssc +0 -0
  98. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_center-block.scssc +0 -0
  99. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_clearfix.scssc +0 -0
  100. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_forms.scssc +0 -0
  101. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_gradients.scssc +0 -0
  102. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_grid-framework.scssc +0 -0
  103. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_grid.scssc +0 -0
  104. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_hide-text.scssc +0 -0
  105. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_image.scssc +0 -0
  106. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_labels.scssc +0 -0
  107. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_list-group.scssc +0 -0
  108. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_nav-divider.scssc +0 -0
  109. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_nav-vertical-align.scssc +0 -0
  110. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_opacity.scssc +0 -0
  111. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_pagination.scssc +0 -0
  112. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_panels.scssc +0 -0
  113. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_progress-bar.scssc +0 -0
  114. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_reset-filter.scssc +0 -0
  115. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_resize.scssc +0 -0
  116. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_responsive-visibility.scssc +0 -0
  117. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_size.scssc +0 -0
  118. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_tab-focus.scssc +0 -0
  119. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_table-row.scssc +0 -0
  120. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_text-emphasis.scssc +0 -0
  121. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_text-overflow.scssc +0 -0
  122. data/test/dummy/tmp/cache/assets/test/sass/5c5a3985fee424ec97ed23d23a371c871a5b5096/_vendor-prefixes.scssc +0 -0
  123. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_admin.scssc +0 -0
  124. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_az.scssc +0 -0
  125. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_forms.scssc +0 -0
  126. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_icons.scssc +0 -0
  127. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_layout.scssc +0 -0
  128. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_misc.scssc +0 -0
  129. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_mixins.scssc +0 -0
  130. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_modal.scssc +0 -0
  131. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_resolve.scssc +0 -0
  132. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_results.scssc +0 -0
  133. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_search.scssc +0 -0
  134. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_spinner.scssc +0 -0
  135. data/test/dummy/tmp/cache/assets/test/sass/6337f8aad3321406d744d874ba09d39420a15a6e/_variables.scssc +0 -0
  136. data/test/dummy/tmp/cache/assets/test/sass/6af13790192839af69f92a6361b85e5bf9b1f008/umlaut.css.scssc +0 -0
  137. data/test/dummy/tmp/cache/assets/test/sass/a2d59a70ef53ef9b8d319a70f93eadd4d6ccb126/_bootstrap-sprockets.scssc +0 -0
  138. data/test/dummy/tmp/cache/assets/test/sass/a2d59a70ef53ef9b8d319a70f93eadd4d6ccb126/_bootstrap.scssc +0 -0
  139. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_alerts.scssc +0 -0
  140. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_badges.scssc +0 -0
  141. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_breadcrumbs.scssc +0 -0
  142. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_button-groups.scssc +0 -0
  143. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_buttons.scssc +0 -0
  144. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_carousel.scssc +0 -0
  145. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_close.scssc +0 -0
  146. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_code.scssc +0 -0
  147. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_component-animations.scssc +0 -0
  148. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_dropdowns.scssc +0 -0
  149. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_forms.scssc +0 -0
  150. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_glyphicons.scssc +0 -0
  151. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_grid.scssc +0 -0
  152. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_input-groups.scssc +0 -0
  153. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_jumbotron.scssc +0 -0
  154. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_labels.scssc +0 -0
  155. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_list-group.scssc +0 -0
  156. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_media.scssc +0 -0
  157. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_mixins.scssc +0 -0
  158. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_modals.scssc +0 -0
  159. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_navbar.scssc +0 -0
  160. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_navs.scssc +0 -0
  161. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_normalize.scssc +0 -0
  162. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_pager.scssc +0 -0
  163. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_pagination.scssc +0 -0
  164. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_panels.scssc +0 -0
  165. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_popovers.scssc +0 -0
  166. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_print.scssc +0 -0
  167. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_progress-bars.scssc +0 -0
  168. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_responsive-embed.scssc +0 -0
  169. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_responsive-utilities.scssc +0 -0
  170. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_scaffolding.scssc +0 -0
  171. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_tables.scssc +0 -0
  172. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_thumbnails.scssc +0 -0
  173. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_tooltip.scssc +0 -0
  174. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_type.scssc +0 -0
  175. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_utilities.scssc +0 -0
  176. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_variables.scssc +0 -0
  177. data/test/dummy/tmp/cache/assets/test/sass/b0564f39a7876132cb716c2170a588633246ce83/_wells.scssc +0 -0
  178. data/test/dummy/tmp/cache/assets/test/sass/b05e8727119abef6b70673f3bdb183ff28fb8943/umlaut.css.scssc +0 -0
  179. data/test/dummy/tmp/cache/assets/test/sass/e2a705bfc1ef6c76a6399e6f52cd3315823299ec/_bootstrap-sprockets.scssc +0 -0
  180. data/test/dummy/tmp/cache/assets/test/sass/e2a705bfc1ef6c76a6399e6f52cd3315823299ec/_bootstrap.scssc +0 -0
  181. data/test/dummy/tmp/cache/assets/test/sprockets/037c47fab55b719f8ac156700cbac0c3 +0 -0
  182. data/test/dummy/tmp/cache/assets/test/sprockets/07a4694fe07acf1c2fedda2cac798bc9 +0 -0
  183. data/test/dummy/tmp/cache/assets/test/sprockets/0eeb71456042967187f5a31ab6a3286c +0 -0
  184. data/test/dummy/tmp/cache/assets/test/sprockets/106e1fc43e312baa3b63fb356d84e56a +0 -0
  185. data/test/dummy/tmp/cache/assets/test/sprockets/1360c5743e6c56b131feeb8bd4692855 +0 -0
  186. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  187. data/test/dummy/tmp/cache/assets/test/sprockets/1447c69f602d8988ba7d3613374b9192 +0 -0
  188. data/test/dummy/tmp/cache/assets/test/sprockets/14e244a20d79f91a83f6e3b6c5fc17c8 +0 -0
  189. data/test/dummy/tmp/cache/assets/test/sprockets/163be0ba2b5dff96e7722afcc85c0219 +0 -0
  190. data/test/dummy/tmp/cache/assets/test/sprockets/1898cdf9f07847e531543baa63512abb +0 -0
  191. data/test/dummy/tmp/cache/assets/test/sprockets/1bfffcd5b44eb2cd74a3e1128f93384c +0 -0
  192. data/test/dummy/tmp/cache/assets/test/sprockets/1ded392702443b3183fe4593decc78a1 +0 -0
  193. data/test/dummy/tmp/cache/assets/test/sprockets/22260295a87f82075dd962cc923febe2 +0 -0
  194. data/test/dummy/tmp/cache/assets/test/sprockets/28d1b98052a09b97bbc88fbe5961fa0b +0 -0
  195. data/test/dummy/tmp/cache/assets/test/sprockets/29d0613d0840db28760e690a78988697 +0 -0
  196. data/test/dummy/tmp/cache/assets/test/sprockets/2cdc36aa44975a7764e7731d48d78df4 +0 -0
  197. data/test/dummy/tmp/cache/assets/test/sprockets/2e0c51d5557aa5342438b9151117b726 +0 -0
  198. data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  199. data/test/dummy/tmp/cache/assets/test/sprockets/306cfd89581a76ae90e5620130d1230f +0 -0
  200. data/test/dummy/tmp/cache/assets/test/sprockets/30be3635c79c29c7186830aa8d2a53dd +0 -0
  201. data/test/dummy/tmp/cache/assets/test/sprockets/30fb4ef5fa7250298ffc5fe002e97f3c +0 -0
  202. data/test/dummy/tmp/cache/assets/test/sprockets/31603c401447ef43ed7749623b20173f +0 -0
  203. data/test/dummy/tmp/cache/assets/test/sprockets/32ad950b7ebecda82d083379010f094f +0 -0
  204. data/test/dummy/tmp/cache/assets/test/sprockets/34a91e558d222e4927b61dfedde2741f +0 -0
  205. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  206. data/test/dummy/tmp/cache/assets/test/sprockets/3aadcc958ae811675d9cbf13dde3bc47 +0 -0
  207. data/test/dummy/tmp/cache/assets/test/sprockets/3c44ea539affd4538b10b2c277db54d4 +0 -0
  208. data/test/dummy/tmp/cache/assets/test/sprockets/3c48d963e9cb0ab17a3c2df71845c65e +0 -0
  209. data/test/dummy/tmp/cache/assets/test/sprockets/3ddf45a801ac35fd463044eb92ce9e0f +0 -0
  210. data/test/dummy/tmp/cache/assets/test/sprockets/3f32f3449ed90d9bc5a66801249e057e +0 -0
  211. data/test/dummy/tmp/cache/assets/test/sprockets/41b5737df347367ac2d25d056942953c +0 -0
  212. data/test/dummy/tmp/cache/assets/test/sprockets/44a41c9477f0bd8b127b8a402059ec0c +0 -0
  213. data/test/dummy/tmp/cache/assets/test/sprockets/48dfa26841dd8bcf58cfa12d9ca8dd02 +0 -0
  214. data/test/dummy/tmp/cache/assets/test/sprockets/4a69dcaff39c483365574b8a5adf8c1e +0 -0
  215. data/test/dummy/tmp/cache/assets/test/sprockets/4ad1fdc86af351b6095128a16905d34b +0 -0
  216. data/test/dummy/tmp/cache/assets/test/sprockets/5261e14c939f24d69198e8cc8cbe77b8 +0 -0
  217. data/test/dummy/tmp/cache/assets/test/sprockets/5282063d0bc5fdc4b86a9aa07a16c5ca +0 -0
  218. data/test/dummy/tmp/cache/assets/test/sprockets/57b8645734a1dd6817b4879c005219ca +0 -0
  219. data/test/dummy/tmp/cache/assets/test/sprockets/59e30bd46b8b43100a4a34c94a39c21f +0 -0
  220. data/test/dummy/tmp/cache/assets/test/sprockets/5b910420983cbd1e8fc373433ea92fa4 +0 -0
  221. data/test/dummy/tmp/cache/assets/test/sprockets/5c800bc7359704d5f137390363f6ab95 +0 -0
  222. data/test/dummy/tmp/cache/assets/test/sprockets/5cec1b0830a49fb304d40e8f13ac8282 +0 -0
  223. data/test/dummy/tmp/cache/assets/test/sprockets/63d6cc65a5a6fcbf12fe6c35f2d27813 +0 -0
  224. data/test/dummy/tmp/cache/assets/test/sprockets/65d602bdfff59430dc54cc10b37b160d +0 -0
  225. data/test/dummy/tmp/cache/assets/test/sprockets/6a813e9c25d7fa816423dd429340ab72 +0 -0
  226. data/test/dummy/tmp/cache/assets/test/sprockets/6f6b80b3e5ef142338834285588b36b1 +0 -0
  227. data/test/dummy/tmp/cache/assets/test/sprockets/708df3603ec349b4c670880711c5217d +0 -0
  228. data/test/dummy/tmp/cache/assets/test/sprockets/71e965f04677975ae4c1d12798ab78f6 +0 -0
  229. data/test/dummy/tmp/cache/assets/test/sprockets/7e084c8e088f8174ec37d8e45c9541ee +0 -0
  230. data/test/dummy/tmp/cache/assets/test/sprockets/81418fe0b09e8c9f3755326c90b99735 +0 -0
  231. data/test/dummy/tmp/cache/assets/test/sprockets/849f6fb10152fba29f54c231518d1a17 +0 -0
  232. data/test/dummy/tmp/cache/assets/test/sprockets/8768c04463df6739a6f5fb3693822fb0 +0 -0
  233. data/test/dummy/tmp/cache/assets/test/sprockets/88bc1406a8138ef2a28d6e727a2e92a8 +0 -0
  234. data/test/dummy/tmp/cache/assets/test/sprockets/8a571b88845483039807b38c9723e008 +0 -0
  235. data/test/dummy/tmp/cache/assets/test/sprockets/8fecdaba532a2a1bba14d55bc0406535 +0 -0
  236. data/test/dummy/tmp/cache/assets/test/sprockets/90ffaedd040e74db95a36ef02142f477 +0 -0
  237. data/test/dummy/tmp/cache/assets/test/sprockets/91ca2fb64bf748b6238c146752a7c864 +0 -0
  238. data/test/dummy/tmp/cache/assets/test/sprockets/94090977c499b165894487a5798769f4 +0 -0
  239. data/test/dummy/tmp/cache/assets/test/sprockets/969436ba628003a935bff5c5a2b3c8d4 +0 -0
  240. data/test/dummy/tmp/cache/assets/test/sprockets/98b7467b5bc515c9f8e057d29d5d9d1b +0 -0
  241. data/test/dummy/tmp/cache/assets/test/sprockets/9a904d3d8213e27362869cc784026346 +0 -0
  242. data/test/dummy/tmp/cache/assets/test/sprockets/9dfdc03c7dc6f850f8f458127e18a49a +0 -0
  243. data/test/dummy/tmp/cache/assets/test/sprockets/9e1bec0d6ebb8c974a303a5a4833b22d +0 -0
  244. data/test/dummy/tmp/cache/assets/test/sprockets/9f7eeacf9cc771edd46b4d5c84172c04 +0 -0
  245. data/test/dummy/tmp/cache/assets/test/sprockets/a2ea4b719ca9026220a671803b988a31 +0 -0
  246. data/test/dummy/tmp/cache/assets/test/sprockets/a70424fe2d1cdc6b718024d0eae0b05a +0 -0
  247. data/test/dummy/tmp/cache/assets/test/sprockets/aa6c6aa8db2af9c4b297ebeefa8c05b6 +0 -0
  248. data/test/dummy/tmp/cache/assets/test/sprockets/aaacdb1fe2cf7871dbb4df1566a44f82 +0 -0
  249. data/test/dummy/tmp/cache/assets/test/sprockets/af74d07fcf5742fbd68f99e201d37400 +0 -0
  250. data/test/dummy/tmp/cache/assets/test/sprockets/b2a88fbe23104d46dc94eb2f8aed3992 +0 -0
  251. data/test/dummy/tmp/cache/assets/test/sprockets/b2ecbebd998b7c7c7729ead4017d30ce +0 -0
  252. data/test/dummy/tmp/cache/assets/test/sprockets/b3578e64c31fe804f95589727da2126e +0 -0
  253. data/test/dummy/tmp/cache/assets/test/sprockets/b3f151531550c6e907ec763ae5bfe373 +0 -0
  254. data/test/dummy/tmp/cache/assets/test/sprockets/b5a4a06cb538064453bb7de543777071 +0 -0
  255. data/test/dummy/tmp/cache/assets/test/sprockets/b76fe5c6b9c99e9ec616db4b60385d9c +0 -0
  256. data/test/dummy/tmp/cache/assets/test/sprockets/b96fbde526f7d9458f59e2ada8672feb +0 -0
  257. data/test/dummy/tmp/cache/assets/test/sprockets/be60636c6dce7b9a885ac478f1442743 +0 -0
  258. data/test/dummy/tmp/cache/assets/test/sprockets/bfbe85ac371f9400596db784ebf70ee7 +0 -0
  259. data/test/dummy/tmp/cache/assets/test/sprockets/c3a7673cbf27d723a50e936436cde8a3 +0 -0
  260. data/test/dummy/tmp/cache/assets/test/sprockets/cf69ee834be97434e1f0ef8bcbd10bbf +0 -0
  261. data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  262. data/test/dummy/tmp/cache/assets/test/sprockets/d009317a0978714955954142f41ba552 +0 -0
  263. data/test/dummy/tmp/cache/assets/test/sprockets/d08802d82ae1799fefdb574fff989be1 +0 -0
  264. data/test/dummy/tmp/cache/assets/test/sprockets/d24b368a700785843ef809627f42ab7e +0 -0
  265. data/test/dummy/tmp/cache/assets/test/sprockets/d2513075960221bb28c50204eb1e4192 +0 -0
  266. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  267. data/test/dummy/tmp/cache/assets/test/sprockets/d83c50bcae636fca84642bcc6132dcdf +0 -0
  268. data/test/dummy/tmp/cache/assets/test/sprockets/e7a60400c5aedaed6411358a09ab3c96 +0 -0
  269. data/test/dummy/tmp/cache/assets/test/sprockets/eb92072a752570fb6117792f175a9154 +0 -0
  270. data/test/dummy/tmp/cache/assets/test/sprockets/f62eef088a833d88f92a38fff8d31a91 +0 -0
  271. data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  272. data/test/dummy/tmp/cache/assets/test/sprockets/f92edeb4e4e73c8b19ed3520bd8c00c3 +0 -0
  273. data/test/dummy/tmp/cache/assets/test/sprockets/f93aefd3b059f9814da72bdc0cb0828e +0 -0
  274. data/test/dummy/tmp/cache/assets/test/sprockets/fedb2b01e83bd131bc90e797455ee4ca +0 -0
  275. data/test/dummy/tmp/cache/assets/test/sprockets/feebc3acf7e4e294abc6864d6a61f3f6 +0 -0
  276. data/test/dummy/tmp/cache/assets/test/sprockets/ff998e50e77822cf6d4d4f0c2ffeeefe +0 -0
  277. metadata +545 -25
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NWFkNDIxZDUyOWZhZmIxMDJjNzkxY2FmMTc1Yjc2OGU0NjZlZTU3Yw==
5
- data.tar.gz: !binary |-
6
- ZDEwNzk3YmE3ODVlZWNmYTRkMGE1MjEwMDEwODMyMmYwOGJiZmZlYg==
2
+ SHA1:
3
+ metadata.gz: 379ad3faee548537a8547a5bcab491e78c9e6caf
4
+ data.tar.gz: d73efae851761ae8b66b6b4268e19cbea0febc1d
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- OWY5NTIwZGU2MDIwZDJlNWQzMDg0ZmM1ODgxODM4Zjg3Y2MwYWY3NzQ1MGNj
10
- ZjYyZTUwZTg2MTY3MGUxMjU3NDMxZTc2ODg0ZDAwNzgzODFiNmRmMWU3YzZh
11
- Mjk0NmVmMDRlZjc1NzVlNDQwZmZmZWJlYjY4YjliMzMxZmM2MjQ=
12
- data.tar.gz: !binary |-
13
- MWY3YzM4MzUwNGY0Yjc3ODgyNjMzNWExZDFkMDBhZDdjNWVmZjcwMDM1MTE1
14
- MGUyZGZjZmVhYWUwNGY2MmIyMTg4NjcwMzIwZGRkMzI1YjhjMzU1OGViNjBj
15
- OTQzNDk0MzJlMDk4Y2FmMTczN2Y5NWJkZDJiZTc3NDU5N2EwYzg=
6
+ metadata.gz: 4af2e830f50d29dd4a7ba516af419cc872da6e933aae373d6da62926116a19f7af5210025d21f968d77344fdaa73bb68e6f479587933b11dcdafd0f275ed22fc
7
+ data.tar.gz: 35372508b02225c3aee4abbe6ab55adfde0714052f091f2e7399de5bd7cbbf5f9ea5cafa0143b7825be81a8ffa88a2abd11526a776c676199da4c8aa87289ff2
@@ -44,10 +44,15 @@ module UmlautBorrowDirect
44
44
  # Saving the @bg_thread only so in testing we can wait on it.
45
45
  @bg_thread = Thread.new(@request, @service, @request.referent.isbn) do |request, service, isbn|
46
46
  begin
47
+ ActiveRecord::Base.forbid_implicit_checkout_for_thread!
47
48
 
48
49
  requester = BorrowDirect::RequestItem.new(self.patron_barcode, service.library_symbol)
49
50
  requester.timeout = @service.http_timeout
50
- request_number = requester.make_request!(params[:pickup_location], :isbn => isbn)
51
+
52
+ # remove hyphens, BD likes it better.
53
+ normalized_isbn = isbn.gsub('-', '') if isbn
54
+
55
+ request_number = requester.make_request!(params[:pickup_location], :isbn => normalized_isbn)
51
56
 
52
57
  ActiveRecord::Base.connection_pool.with_connection do
53
58
  service.bd_api_log(isbn, "RequestItem", "SUCCESS", requester.last_request_time)
@@ -56,7 +61,17 @@ module UmlautBorrowDirect
56
61
  set_status_response({:status => Successful, :request_number => request_number }, request)
57
62
  end
58
63
 
59
- rescue StandardError => e
64
+ rescue StandardError => e
65
+ # If it was an AR error in the first place, forget trying to record
66
+ # it.
67
+ if e.kind_of?(ActiveRecord::ActiveRecordError)
68
+ Rails.logger.fatal("BorrowDirect: Error placing request, and we could not log to database (#{e}): #{e.class} #{e.message}. Backtrace:\n #{Umlaut::Util.clean_backtrace(e).join("\n ")}\n")
69
+
70
+ # Nothing will do anything with this since we aren't waiting on
71
+ # the thread, but oh well.
72
+ raise e
73
+ end
74
+
60
75
  ActiveRecord::Base.connection_pool.with_connection do
61
76
  Rails.logger.error("BorrowDirect: Error placing request: #{e.class} #{e.message}. Backtrace:\n #{Umlaut::Util.clean_backtrace(e).join("\n ")}\n")
62
77
 
@@ -68,7 +83,7 @@ module UmlautBorrowDirect
68
83
  set_status_response(status_response_data, request)
69
84
 
70
85
  if service
71
- service.bd_api_log(isbn, "RequestItem", e, requester.last_request_time)
86
+ service.bd_api_log(isbn, "RequestItem", e, (requester.last_request_time if requester))
72
87
  end
73
88
 
74
89
 
@@ -81,7 +81,7 @@ class BorrowDirectPresenter
81
81
  end
82
82
 
83
83
  def show_link_response?
84
- self.link_response && ! self.show_confirmation?
84
+ self.link_response && (! self.show_confirmation?) && (! self.show_request_form?)
85
85
  end
86
86
 
87
87
  def could_not_place_request?
@@ -29,7 +29,7 @@ class BorrowDirectAdaptor < Service
29
29
  @bd_api_logger_level = nil
30
30
  # Abort for these rfr_id's -- keep from searching BD when
31
31
  # we came from BD.
32
- @suppress_rfr_ids = ["info:sid/BD"]
32
+ @suppress_rfr_ids = ["info:sid/BD", "info:sid/BD-Unfilled"]
33
33
 
34
34
  # Should we use the api at all? Set to false to disable API
35
35
  # entirely, because you think it performs too crappily or
@@ -47,6 +47,11 @@ class BorrowDirectAdaptor < Service
47
47
  return ! title_is_serial?(request.referent)
48
48
  end
49
49
 
50
+ # Make sure there are no hyphens, BD doesn't seem to like it
51
+ def isbn(request)
52
+ request.referent.isbn && request.referent.isbn.gsub('-', '')
53
+ end
54
+
50
55
  def handle(request)
51
56
  if request.referrer_id && @suppress_rfr_ids.include?(request.referrer_id)
52
57
  return request.dispatched(self, true)
@@ -70,10 +75,10 @@ class BorrowDirectAdaptor < Service
70
75
  begin
71
76
  finditem = BorrowDirect::FindItem.new(@find_item_patron_barcode, @library_symbol)
72
77
  finditem.timeout = @http_timeout
73
- response = finditem.find(:isbn => request.referent.isbn)
78
+ response = finditem.find(:isbn => isbn(request))
74
79
 
75
80
  # Log success if configured, used for looking at error rate
76
- bd_api_log(request.referent.isbn, "FindItem", "SUCCESS", finditem.last_request_time)
81
+ bd_api_log(isbn(request), "FindItem", "SUCCESS", finditem.last_request_time)
77
82
 
78
83
  if response.requestable?
79
84
  # Mark it requestable!
@@ -100,7 +105,7 @@ class BorrowDirectAdaptor < Service
100
105
  Rails.logger.error(msg)
101
106
 
102
107
  # Special BD error log if configured
103
- bd_api_log(request.referent.isbn, "FindItem", e, finditem.last_request_time)
108
+ bd_api_log(isbn(request), "FindItem", e, finditem.last_request_time)
104
109
 
105
110
  # And mark it as an error so error message will be displayed. Let's
106
111
  # mark it a temporary error, so it'll be tried again later, it might
@@ -123,12 +128,15 @@ class BorrowDirectAdaptor < Service
123
128
  def can_precheck_borrow_direct?(request)
124
129
  return false unless @use_bd_api
125
130
 
126
- request.referent.isbn.present?
131
+ isbn(request).present?
127
132
  end
128
133
 
129
134
  def bd_api_log(isbn, action, result, timing)
130
135
  if result.kind_of? Exception
131
136
  result = "#{result.class}/#{result.message}"
137
+ if result.respond_to?(:bd_code) && result.bd_code.present?
138
+ result += "/#{result.bd_code}"
139
+ end
132
140
  end
133
141
 
134
142
  if @bd_api_log_level
@@ -27,6 +27,12 @@
27
27
  </p>
28
28
  <% end %>
29
29
  <%= render "borrow_direct/request_form", :response => bd_presenter.request_prompt_response %>
30
+ <% if bd_presenter.link_response && ! bd_presenter.show_link_response? %>
31
+ <%= link_to t('umlaut.services.borrow_direct_adaptor.bd_request_prompt.direct_link'),
32
+ link_router_url(bd_presenter.link_response),
33
+ :class => "bd-direct-link",
34
+ :target => "_blank" %>
35
+ <% end %>
30
36
  <% end %>
31
37
 
32
38
  <% if bd_presenter.show_not_available? %>
@@ -59,7 +65,7 @@ errors = umlaut_request.
59
65
  if errors.present?
60
66
  %>
61
67
 
62
- <% if bd_presenter.show_link_response? %>
68
+ <% if bd_presenter.show_link_response? && (! bd_presenter.error_div_classes.include?('alert'))%>
63
69
  <hr>
64
70
  <% end %>
65
71
 
@@ -23,9 +23,10 @@ en:
23
23
  request: Request
24
24
  pickup_validation: "You must choose a pickup location"
25
25
  progress: "Checking BorrowDirect availability for you"
26
+ direct_link: "You can also check BorrowDirect for other editions."
26
27
  bd_not_available:
27
28
  display_text: "This edition is not available via BorrowDirect."
28
- workaround_link: "You can check BorrowDirect manually for other editions."
29
+ workaround_link: "You can check BorrowDirect for other editions."
29
30
  bd_request_status:
30
31
  progress: "Placing the request to BorrowDirect"
31
32
  error: "There was a problem submitting your request to BorrowDirect."
@@ -34,6 +35,6 @@ en:
34
35
  borrow_direct:
35
36
  title: "Request a copy from BorrowDirect"
36
37
  prompt: "Get item from one of our partner libraries in 3-6 days. Checkout period is 12 weeks, with no renewals."
37
- error: Unable to determine BorrowDirect availability for this edition.
38
- workaround_link: Please check BorrowDirect for this item manually.
38
+ error: Unable to automatically determine BorrowDirect availability for this edition.
39
+ workaround_link: Please check BorrowDirect for this item.
39
40
 
@@ -2,3 +2,121 @@
2
2
  # task :umlaut_borrow_direct do
3
3
  # # Task goes here
4
4
  # end
5
+ namespace :umlaut_borrow_direct do
6
+ desc "BD API stats calc"
7
+ task :api_stats, [:filename] do |t, args|
8
+
9
+ stats = {
10
+ "FindItem" => {
11
+ :times => [],
12
+ :errors => [],
13
+ :timeouts => [],
14
+ :count => 0
15
+ },
16
+ "RequestItem" => {
17
+ :times => [],
18
+ :errors => [],
19
+ :timeouts => [],
20
+ :count => 0
21
+ }
22
+ }
23
+
24
+ if args["filename"] == "stdin"
25
+ file = STDIN
26
+ else
27
+ file = File.open(File.expand_path args[:filename])
28
+ end
29
+
30
+ file.each_line do |line|
31
+
32
+ if line =~ /BD API log\t([^\t]*)\t([^\t]*)\t([^\t]*)\t([^\t]*)/
33
+ action = $1
34
+ result = $2
35
+ timing = $3
36
+ query = $4
37
+
38
+ if timing.present? && (timing.to_f == 0)
39
+ raise "Timing does not look like a float: #{timingf}"
40
+ end
41
+ timing = timing.to_f
42
+
43
+ if ["FindItem", "RequestItem"].include? action
44
+ stats[action][:count] += 1
45
+
46
+ if line =~ /(\d\d\d\d-\d\d-\d\d)/
47
+
48
+ date = Date.parse($1)
49
+
50
+ stats[action][:min_date] = date if stats[action][:min_date].nil? || (date < stats[action][:min_date])
51
+ stats[action][:max_date] = date if stats[action][:max_date].nil? || (date > stats[action][:max_date])
52
+ end
53
+
54
+ value_dict = {:action => action, :result => result, :timing => timing, :query => query}
55
+
56
+ stats[action][:times] << timing unless timing == 0
57
+ unless result == "SUCCESS"
58
+ (exception_class, exception_message) = result.split("/")
59
+ value_dict[:exception_class] = exception_class
60
+ value_dict[:exception_message] = exception_message
61
+ if exception_class == "BorrowDirect::HttpTimeoutError"
62
+ stats[action][:timeouts] << value_dict
63
+ else
64
+ stats[action][:errors] << value_dict
65
+ end
66
+ end
67
+ else
68
+ puts "Warning, unrecognized action: #{action}"
69
+ end
70
+ end
71
+ end
72
+
73
+ ["FindItem", "RequestItem"].each do |action|
74
+ sorted_times = stats[action][:times].sort
75
+
76
+ next if sorted_times.empty?
77
+
78
+ puts "\n\n#{action} API: #{stats[action][:count]} requests from #{stats[action][:min_date]} to #{stats[action][:max_date]}"
79
+ puts " Timing (not including timeouts):"
80
+ puts " Min: #{sorted_times.first}"
81
+ puts " 25th %ile: #{percentile sorted_times, 25}"
82
+ puts " Median: #{percentile sorted_times, 50}"
83
+ puts " 60th %ile: #{percentile sorted_times, 60}"
84
+ puts " 75th %ile: #{percentile sorted_times, 75}"
85
+ puts " 95th %ile: #{percentile sorted_times, 95}"
86
+ puts " 99th %ile: #{percentile sorted_times, 99}"
87
+ puts " Max: #{sorted_times.last}"
88
+ puts ""
89
+ puts " Timeouts: #{stats[action][:timeouts].count}"
90
+ puts " Errors: #{stats[action][:errors].count}"
91
+
92
+ #error_types = stats[action][:errors].group_by {|dict| dict[:exception_class]}
93
+ #error_types.each_pair do |type, list|
94
+ # puts " #{type} (#{list.count}) #{list}"
95
+ #end
96
+
97
+ end
98
+ puts "\n\n"
99
+
100
+
101
+ end
102
+
103
+ # pass in a SORTED array a
104
+ def percentile a, p
105
+ rank = (p.to_f / 100) * (a.length + 1)
106
+
107
+ if a.length == 0
108
+ return nil
109
+ elsif rank.modulo(1) != 0
110
+
111
+
112
+ sample_0 = a[rank.truncate - 1]
113
+ sample_1 = a[rank.truncate]
114
+
115
+
116
+ return sample_0 if sample_1.nil?
117
+ return (sample_1 + sample_0) / 2
118
+ else
119
+ return a[rank - 1]
120
+ end
121
+ end
122
+ end
@@ -27,5 +27,15 @@ module UmlautBorrowDirect
27
27
  end
28
28
  end
29
29
 
30
+ initializer "umlaut_borrow_direct.set_api_base" do
31
+ # We just set the default api_base in production, hopefully
32
+ # that won't cause any problems, local app could do something different
33
+ # in it's own initializer I think.
34
+ if Rails.env.production?
35
+ require 'borrow_direct'
36
+ BorrowDirect::Defaults.api_base = BorrowDirect::Defaults::PRODUCTION_API_BASE
37
+ end
38
+ end
39
+
30
40
  end
31
41
  end
@@ -1,3 +1,3 @@
1
1
  module UmlautBorrowDirect
2
- VERSION = "1.0.0-alpha.1"
3
- end
2
+ VERSION = "1.0.0"
3
+ end
File without changes
File without changes