quick_search-core 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +43 -55
  3. data/Rakefile +30 -4
  4. data/app/assets/javascripts/quick_search/event_tracking.js.erb +2 -8
  5. data/app/assets/stylesheets/{quick_search.css.scss.erb → quick_search.scss.erb} +0 -0
  6. data/app/assets/stylesheets/quick_search/{appstats.css.scss → appstats.scss} +0 -0
  7. data/app/assets/stylesheets/quick_search/{opensearch.css.scss → opensearch.scss} +0 -0
  8. data/app/assets/stylesheets/quick_search/{pages.css.scss → pages.scss} +0 -0
  9. data/app/assets/stylesheets/quick_search/{quick_search.css.scss → quick_search.scss} +1 -0
  10. data/app/assets/stylesheets/quick_search/{search.css.scss → search.scss} +0 -0
  11. data/app/controllers/concerns/quick_search/searcher_concern.rb +8 -1
  12. data/app/controllers/concerns/quick_search/searcher_config.rb +5 -2
  13. data/app/controllers/quick_search/appstats_controller.rb +2 -2
  14. data/app/controllers/quick_search/search_controller.rb +7 -7
  15. data/app/models/application_record.rb +3 -0
  16. data/app/models/event.rb +1 -1
  17. data/app/models/search.rb +1 -1
  18. data/app/searchers/quick_search/best_bets_searcher.rb +25 -7
  19. data/app/views/layouts/quick_search/_google_analytics.html.erb +0 -9
  20. data/lib/generators/quick_search/install_generator.rb +101 -0
  21. data/lib/generators/quick_search/templates/best_bets.yml +86 -0
  22. data/lib/generators/quick_search/templates/post_install.txt +3 -1
  23. data/lib/generators/quick_search/templates/quick_search_config.yml +25 -3
  24. data/lib/quick_search.rb +0 -2
  25. data/lib/quick_search/engine.rb +16 -1
  26. data/lib/quick_search/version.rb +1 -1
  27. data/lib/tasks/best_bets.rake +2 -0
  28. data/test/controllers/concerns/doi_trap_test.rb +3 -3
  29. data/test/controllers/concerns/on_campus_test.rb +4 -4
  30. data/test/controllers/concerns/query_parser_test.rb +6 -6
  31. data/test/controllers/{appstats_controller_test.rb → quick_search/appstats_controller_test.rb} +1 -1
  32. data/test/controllers/{opensearch_controller_test.rb → quick_search/opensearch_controller_test.rb} +6 -1
  33. data/test/controllers/{pages_controller_test.rb → quick_search/pages_controller_test.rb} +1 -1
  34. data/test/controllers/quick_search/search_controller_test.rb +15 -0
  35. data/test/dummy/README.rdoc +28 -0
  36. data/test/dummy/Rakefile +6 -0
  37. data/test/dummy/app/assets/javascripts/application.js +13 -0
  38. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  39. data/test/dummy/app/controllers/application_controller.rb +5 -0
  40. data/test/dummy/app/helpers/application_helper.rb +2 -0
  41. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  42. data/test/dummy/bin/bundle +3 -0
  43. data/test/dummy/bin/rails +4 -0
  44. data/test/dummy/bin/rake +4 -0
  45. data/test/dummy/config.ru +4 -0
  46. data/{config → test/dummy/config}/application.rb +6 -8
  47. data/test/dummy/config/best_bets.yml +86 -0
  48. data/test/dummy/config/boot.rb +5 -0
  49. data/test/dummy/config/database.yml +25 -0
  50. data/test/dummy/config/environment.rb +5 -0
  51. data/test/dummy/config/environments/development.rb +37 -0
  52. data/test/dummy/config/environments/production.rb +78 -0
  53. data/test/dummy/config/environments/test.rb +39 -0
  54. data/test/dummy/config/initializers/assets.rb +8 -0
  55. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  56. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  57. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  58. data/test/dummy/config/initializers/inflections.rb +16 -0
  59. data/test/dummy/config/initializers/mime_types.rb +4 -0
  60. data/test/dummy/config/initializers/session_store.rb +3 -0
  61. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  62. data/test/dummy/config/locales/en.yml +23 -0
  63. data/test/dummy/config/quick_search_config.yml +58 -0
  64. data/test/dummy/config/routes.rb +6 -0
  65. data/test/dummy/config/secrets.yml +22 -0
  66. data/test/dummy/db/schema.rb +31 -0
  67. data/test/dummy/db/test.sqlite3 +0 -0
  68. data/test/dummy/log/benchmark.log +241 -0
  69. data/test/dummy/log/test.log +4762 -0
  70. data/test/dummy/public/404.html +67 -0
  71. data/test/dummy/public/422.html +67 -0
  72. data/test/dummy/public/500.html +66 -0
  73. data/test/dummy/public/favicon.ico +0 -0
  74. data/test/dummy/tmp/cache/assets/sprockets/v3.0/0_/0_w_ydOOEFQOoETxJa-IxKppQocaiDwM5V08djCPYso.cache +3 -0
  75. data/test/dummy/tmp/cache/assets/sprockets/v3.0/1n/1nStVaWIQEwAlksUpB1fInwq6v3TikPvuRaSwwCnCLQ.cache +1 -0
  76. data/test/dummy/tmp/cache/assets/sprockets/v3.0/3m/3mWfBeEpm_bJvaPQZYvnnAVtE_2helOWh_Tv-cEflrk.cache +5 -0
  77. data/test/dummy/tmp/cache/assets/sprockets/v3.0/4s/4sg52OgD5l4qx4GnojCVxg2itqwqb-KRanEdmdMus3Y.cache +0 -0
  78. data/test/dummy/tmp/cache/assets/sprockets/v3.0/5U/5UPnsccuZFLk9OqbmFMvB55mbvGptApx9Z55HWjEN90.cache +3 -0
  79. data/test/dummy/tmp/cache/assets/sprockets/v3.0/9a/9acKNgyVD8_WK401tMy6Ce98g-LS4VpwFvGQdzCV9mI.cache +0 -0
  80. data/test/dummy/tmp/cache/assets/sprockets/v3.0/B5/B5ptGSZGmgHvoK2UDCAtpMhWxJEKxKFhyL9ACeBfzQk.cache +1 -0
  81. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ba/BaymviI8cwAJQMOIzWCf6Lt-PM2sNFTvY9hQKsfDNNw.cache +3 -0
  82. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Dd/DdFHg3C_voetfvKGKX7t8PGzZlkO45-huHNtaou5rxg.cache +1 -0
  83. data/test/dummy/tmp/cache/assets/sprockets/v3.0/F0/F0oWBwLHpGFYNNtnGav-dJFH8rMDpNA5L8_aWm5Wq34.cache +0 -0
  84. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Fp/FprCQeeZguht46WNSpA3Y3JHKehovFXrj63nDrvvwFE.cache +1 -0
  85. data/test/dummy/tmp/cache/assets/sprockets/v3.0/GJ/GJrfWiarIi0Dt6sdKVMfUF1cdZ6NbqZxXHhzNbFtpBw.cache +1 -0
  86. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Gp/GpoziOxxB-hisco0rl7Nnsnw0UWud7R9Yge2Q3o1eN4.cache +2 -0
  87. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Hr/Hr-kCuPY72nIKAdnsDTz9JqXd_z1WL6FSGMAq4HppZg.cache +1 -0
  88. data/test/dummy/tmp/cache/assets/sprockets/v3.0/It/It5VkJv-53-LICLKZWWyp2WcbD86DGotAL0MY3hhfpg.cache +6 -0
  89. data/test/dummy/tmp/cache/assets/sprockets/v3.0/MA/MAY_nSUZSFcwPf9b-AWcqad4OIb_VKmHGs5E7PYdgvI.cache +2 -0
  90. data/test/dummy/tmp/cache/assets/sprockets/v3.0/O6/O6dw148Xya7NYlsRFMEzJyvRcySM6iOL1jRUpdQo9B8.cache +1 -0
  91. data/test/dummy/tmp/cache/assets/sprockets/v3.0/O8/O8akbUwAbmIKY-AhITimq-JDQ6IgsO3Hvq2v5etufFw.cache +2 -0
  92. data/test/dummy/tmp/cache/assets/sprockets/v3.0/OD/ODHapE0li3WI1laVJoksoI5nmQd-8dDJXq_VxS4XefE.cache +1 -0
  93. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Oj/OjMkKTW7OkthjJAQHDID8GV30IZC9F0dJ1zGiFame9U.cache +4 -0
  94. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Os/OsQkEOfE0Pfy_sIdEIVWLojZnQm4mcrZpXg4suYrV70.cache +2 -0
  95. data/test/dummy/tmp/cache/assets/sprockets/v3.0/SU/SUtZ_ltPqy9A9A-_zqNPhNPvjxCOnrdqXHSZv5S9mOk.cache +1 -0
  96. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Tv/TvZgmm69VEMHUJQIBoij61oXMkgzp6whVo7l8mJ9qpw.cache +3 -0
  97. data/test/dummy/tmp/cache/assets/sprockets/v3.0/UA/UAOIipK_ejTAUFI6XxASoweyUiC3t64VfVzV-MfsFD8.cache +0 -0
  98. data/test/dummy/tmp/cache/assets/sprockets/v3.0/YJ/YJZdK01T1KTS84Mb6p_2TasmJNZeGZc4FMtBPCKGr_M.cache +3 -0
  99. data/test/dummy/tmp/cache/assets/sprockets/v3.0/ah/ahhhd3ysbQmVDNzq2L_rb4t6rqqdnqeY6ujztBoZDA8.cache +1 -0
  100. data/test/dummy/tmp/cache/assets/sprockets/v3.0/dz/dzCaa80YgyvJINTgsyrVhKv9UQ1OC82GfAsA-IP96iQ.cache +0 -0
  101. data/test/dummy/tmp/cache/assets/sprockets/v3.0/fI/fInu_Gja7ik39t207tqj4CtlL0akQRbjD2T7qEtd0zE.cache +1 -0
  102. data/test/dummy/tmp/cache/assets/sprockets/v3.0/gv/gvZKkbgiExbcQrT4eo0HB-j4JoDRAxdmDjKRxeEdK0Y.cache +1 -0
  103. data/test/dummy/tmp/cache/assets/sprockets/v3.0/hj/hj_r-O1QjHJIPcZVnlB_FGPdIRAi9NkxpT2oXDRIsGE.cache +1 -0
  104. data/test/dummy/tmp/cache/assets/sprockets/v3.0/jj/jjdQCKZsewws2eRP7b2AVxRMvseOp8djjlDkB8UOtac.cache +3 -0
  105. data/test/dummy/tmp/cache/assets/sprockets/v3.0/o2/o2V1ahk8vFR6sXWNh5BB7w6MBj04zCyX-o1xFZONydE.cache +1 -0
  106. data/test/dummy/tmp/cache/assets/sprockets/v3.0/o6/o6ZQbq1aBFuVrE2xLbSbyZH2736sWM3Yj4ky9chT1bI.cache +1 -0
  107. data/test/dummy/tmp/cache/assets/sprockets/v3.0/os/os0qWv3yDfep0e7vVSGTgfn_n3xc4C4QZgmMzLQn0Ks.cache +1 -0
  108. data/test/dummy/tmp/cache/assets/sprockets/v3.0/pO/pO8hHVwybv1ZJBdPa2YC6bjqmk020OYFl85TYxtmrWQ.cache +0 -0
  109. data/test/dummy/tmp/cache/assets/sprockets/v3.0/pj/pjJDYrBipDo6Tr9_-W4UDzfZZ4UPTy9YpXrBQFRXnlo.cache +3 -0
  110. data/test/dummy/tmp/cache/assets/sprockets/v3.0/pw/pwiIhcWPwTuy5Miz5zqOQGYFx-K3TbaCVQ6ls7EBkk0.cache +0 -0
  111. data/test/dummy/tmp/cache/assets/sprockets/v3.0/sR/sRU-UT8qK_38kkiFDXKBPogO1oOZuSvJFH-pgqPL_Ms.cache +0 -0
  112. data/test/dummy/tmp/cache/assets/sprockets/v3.0/tE/tEO71oPPFXN_2c4p39nU0OiF9ARg13fjdQlnPqAx1KY.cache +4 -0
  113. data/test/dummy/tmp/cache/assets/sprockets/v3.0/tP/tPF6H9NRpGO3whu2y5_e_R_1EACKdCwu5437D83qJT0.cache +2 -0
  114. data/test/dummy/tmp/cache/assets/sprockets/v3.0/tW/tWFRsAv4WWu2ch-x3AJZd3KOvBXG3MwH6Q6Xn-tFBtw.cache +1 -0
  115. data/test/dummy/tmp/cache/assets/sprockets/v3.0/x6/x6W754ylumshr3wBUHHmcgyWs8UR3Od7FaI6tqvjKmk.cache +1 -0
  116. data/test/dummy/tmp/cache/assets/sprockets/v3.0/yy/yyJ1P7RQciOiW8TgQiu1RMDdbWd4rqxd2BGU9HkY3L8.cache +0 -0
  117. data/test/integration/searching_test.rb +15 -27
  118. data/test/searcher/best_bets_test.rb +13 -18
  119. data/test/test_helper.rb +23 -10
  120. data/test/vcr_cassettes/searches/best_bets_acm.yml +31 -0
  121. data/test/vcr_cassettes/searches/harry_potter.yml +6901 -0
  122. data/test/vcr_cassettes/searches/hunt_library.yml +66736 -0
  123. data/test/vcr_cassettes/searches/printing.yml +191 -0
  124. data/test/vcr_cassettes/searches/speling.yml +1172 -0
  125. metadata +197 -71
  126. data/test/controllers/search_controller_test.rb +0 -15
  127. data/test/integration/catalog_search_test.rb +0 -8
  128. data/test/integration/google_analytics_test.rb +0 -23
  129. data/test/integration/smart_subjects_test.rb +0 -8
  130. data/test/integration/website_search_test.rb +0 -8
  131. data/test/searcher/catalog_test.rb +0 -35
  132. data/test/searcher/ematrix_database_test.rb +0 -27
  133. data/test/searcher/ematrix_journal_test.rb +0 -27
  134. data/test/searcher/faq_test.rb +0 -27
  135. data/test/searcher/smart_subjects_test.rb +0 -27
  136. data/test/searcher/summon_test.rb +0 -13
  137. data/test/searcher/website_test.rb +0 -34
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1,3 @@
1
+ [o:Set:
2
+ @hash}
3
+ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"processors:;TTI"�file-digest:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.woff2;TTF
@@ -0,0 +1 @@
1
+ "%��Rm�v�S3.��O�L���ڹc�ƕq�=_j�
@@ -0,0 +1,5 @@
1
+ {:uriI"�file:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.woff2?id=d6da1b37c1a290962c180a91d99d3cee41188daaa389af0c658c47112a80d40b:ET:load_pathI"Q/home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts;T:
2
+ @hash}
3
+ I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"processors:;TTI"�file-digest:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.woff2;TTF:dependencies_digest"%5a�c�
4
+ =P��0vY�J���6ۮ1D�g~:idI"Ed6da1b37c1a290962c180a91d99d3cee41188daaa389af0c658c47112a80d40b;F:
5
+ mtimel+\��W
@@ -0,0 +1,3 @@
1
+ [o:Set:
2
+ @hash}
3
+ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/vnd.ms-fontobject&file_type=application/vnd.ms-fontobject;TTI"file-digest:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.eot;TTF
@@ -0,0 +1 @@
1
+ "%)2���7>����P�kb�}�T�d>��1���M�
@@ -0,0 +1,3 @@
1
+ [o:Set:
2
+ @hash}
3
+ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"|file-digest:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/foundation-rails-5.4.5.0/vendor/assets/javascripts/vendor/modernizr.js;TTF
@@ -0,0 +1 @@
1
+ I"}app/assets/stylesheets/application.css?type=text/css&id=507d8a373b4cb94c94e1217ab853e26ad7174b43b1bc9d9f479f30fbc91d6f8f:ET
@@ -0,0 +1 @@
1
+ I"�/home/vagrant/.rvm/gems/ruby-2.3.1/gems/foundation-rails-5.4.5.0/vendor/assets/javascripts/vendor/modernizr.js?type=application/javascript&pipeline=self&id=f369cf8b4ad1fb7b2822d553fed545aa7a8cc51c981814318700e194862cf43e:ET
@@ -0,0 +1 @@
1
+ I"�/home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.woff?type=application/font-woff&id=45392820578b6a41a431b8ed4f2e94949fd707ae218a69f822ceee493f49dc50:ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"|file-digest:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/foundation-rails-5.4.5.0/vendor/assets/javascripts/vendor/modernizr.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTF
@@ -0,0 +1 @@
1
+ "%�01;�w�B~����!�����B�ii���;�
@@ -0,0 +1,6 @@
1
+ {:uriI"�file:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.eot?type=application/vnd.ms-fontobject&id=80a84b51c05da6291f8f5523de7f979438f53e6ae7745f2c07a6a11f3f034084:ET:load_pathI"Q/home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts;T:
2
+ �3��)�
3
+ ����ȉ�(�y��4���: lengthi�):dependencieso:Set:
4
+ @hash}
5
+ I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/vnd.ms-fontobject&file_type=application/vnd.ms-fontobject;TTI"file-digest:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.eot;TTF:dependencies_digest"%�5f��#�d��5Ҕ��&!?(&E��Ż:idI"E80a84b51c05da6291f8f5523de7f979438f53e6ae7745f2c07a6a11f3f034084;F:
6
+ mtimel+\��W
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"8file-digest://app/assets/javascripts/application.js;TTI")file-digest://app/assets/javascripts;TTF
@@ -0,0 +1 @@
1
+ I"�/home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.eot?type=application/vnd.ms-fontobject&id=80a84b51c05da6291f8f5523de7f979438f53e6ae7745f2c07a6a11f3f034084:ET
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"0processors:type=text/css&file_type=text/css;TTI"9file-digest://app/assets/stylesheets/application.css;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI")file-digest://app/assets/stylesheets;TTF
@@ -0,0 +1 @@
1
+ "%�f����2��ڂ���-�;2����8��P� ��
@@ -0,0 +1,4 @@
1
+ {:uriI"�file:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.ttf?type=application/x-font-ttf&id=270656e70591967ada09a65496dadc474150247d05b9b3cfadfa30e535ae7737:ET:load_pathI"Q/home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts;T:
2
+ @hash}
3
+ I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/x-font-ttf&file_type=application/x-font-ttf;TTI"file-digest:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.ttf;TTF:dependencies_digest"%��Z�<����p��;`��$���\+pM���G~{:idI"E270656e70591967ada09a65496dadc474150247d05b9b3cfadfa30e535ae7737;F:
4
+ mtimel+\��W
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/javascript&file_type=application/javascript;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI")file-digest://app/assets/javascripts;TTF
@@ -0,0 +1 @@
1
+ I"�/home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.ttf?type=application/x-font-ttf&id=270656e70591967ada09a65496dadc474150247d05b9b3cfadfa30e535ae7737:ET
@@ -0,0 +1,3 @@
1
+ [o:Set:
2
+ @hash}
3
+ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Lprocessors:type=application/x-font-ttf&file_type=application/x-font-ttf;TTI"file-digest:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.ttf;TTF
@@ -0,0 +1,3 @@
1
+ [o:Set:
2
+ @hash}
3
+ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI"Jprocessors:type=application/font-woff&file_type=application/font-woff;TTI"�file-digest:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.woff;TTF
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&id=b454be629435675b95779ff1e1705f4282cde73a371badd2e0f1139f6aa7a840:ET
@@ -0,0 +1 @@
1
+ "%]!�K��X�K�֓�ޖ���';�����4x��
@@ -0,0 +1 @@
1
+ I"�app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=0a3009357131e8c5d331eb9af0be51c44bc46683e6de6adb0d6735fde77ebc58:ET
@@ -0,0 +1 @@
1
+ I"�/home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.woff2?id=d6da1b37c1a290962c180a91d99d3cee41188daaa389af0c658c47112a80d40b:ET
@@ -0,0 +1,3 @@
1
+ [o:Set:
2
+ @hash}
3
+ I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI":processors:type=image/svg+xml&file_type=image/svg+xml;TTI"file-digest:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.svg;TTF
@@ -0,0 +1 @@
1
+ I"�/home/vagrant/.rvm/gems/ruby-2.3.1/gems/foundation-rails-5.4.5.0/vendor/assets/javascripts/vendor/modernizr.js?type=application/javascript&id=c721a0ff0aeb848f7a812c5e2bdc4fd4da16b255c59fa1d718a3644938fb33da:ET
@@ -0,0 +1 @@
1
+ "%5���}=�z��C�Ϣ�Z
@@ -0,0 +1 @@
1
+ "%}�>�<�ǯ��ͬ8�ȸ�}x`Ⱥ ����
@@ -0,0 +1,3 @@
1
+ "%���n �
2
+ �3��)�
3
+ ����ȉ�(�y��4���
@@ -0,0 +1,4 @@
1
+ {:uriI"�file:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.woff?type=application/font-woff&id=45392820578b6a41a431b8ed4f2e94949fd707ae218a69f822ceee493f49dc50:ET:load_pathI"Q/home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts;T:
2
+ @hash}
3
+ I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Jprocessors:type=application/font-woff&file_type=application/font-woff;TTI"�file-digest:///home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.woff;TTF:dependencies_digest"%���E��������O�[Q_.�րs.;�'�':idI"E45392820578b6a41a431b8ed4f2e94949fd707ae218a69f822ceee493f49dc50;F:
4
+ mtimel+\��W
@@ -0,0 +1,2 @@
1
+ [o:Set:
2
+ @hash} I"environment-version:ETTI"environment-paths;TTI"rails-env;TTI">processors:type=text/css&file_type=text/css&pipeline=self;TTI"9file-digest://app/assets/stylesheets/application.css;TTI")file-digest://app/assets/stylesheets;TTF
@@ -0,0 +1 @@
1
+ I"�/home/vagrant/.rvm/gems/ruby-2.3.1/gems/font-awesome-sass-4.6.2/assets/fonts/font-awesome/fontawesome-webfont.svg?type=image/svg+xml&id=408b62e7ec3c2401d91633963c3fde13081d41e7de9c920ed06d30c93589c793:ET
@@ -0,0 +1 @@
1
+ I"�app/assets/stylesheets/application.css?type=text/css&pipeline=self&id=3cdfa6a52ee7a8340390c3eba97e5bc5fd039a04cc20c747ccc20394e8becf68:ET
@@ -2,39 +2,27 @@ require 'test_helper'
2
2
 
3
3
  class SearchingTest < ActionDispatch::IntegrationTest
4
4
 
5
- vcr_test "search box should give search results", "searches", cassette: 'printing' do
6
- visit root_path
7
- within('#quicksearch') do
8
- fill_in :q, with: 'printing'
9
- click_on('Search')
10
- assert page.has_content?('Articles')
11
- end
5
+ vcr_test "included searchers should appear on results page", "searches", cassette: 'printing' do
6
+ visit root_path(:q => 'printing')
7
+ assert page.assert_text('Wikipedia')
8
+ assert page.has_content?('OpenLibrary')
9
+ assert page.has_content?('arXiv')
10
+ assert page.has_content?('Placeholder')
12
11
  end
13
12
 
14
- vcr_test "should have article results", "searches", cassette: 'printing' do
15
- visit root_path
16
- within('#quicksearch') do
17
- fill_in :q, with: 'printing'
18
- click_on('Search')
19
- assert page.has_content?('Beginning Os X Lion Apps ')
20
- end
13
+ vcr_test "should have wikipedia results", "searches", cassette: 'hunt_library' do
14
+ visit root_path(:q => 'James B. Hunt Jr. Library')
15
+ assert page.has_content?('James B. Hunt Jr. Library')
21
16
  end
22
17
 
23
18
  vcr_test "should present a spelling suggestion", "searches", cassette: 'speling' do
24
- visit root_path
25
- within('#quicksearch') do
26
- fill_in :q, with: 'speling'
27
- click_on('Search')
28
- assert page.has_content?('Did you mean')
29
- end
19
+ visit root_path(:q => 'speling')
20
+ assert page.has_content?('Did you mean')
30
21
  end
31
22
 
32
- vcr_test "should have FAQ results", "searches", cassette: 'printing' do
33
- visit root_path
34
- within('#quicksearch') do
35
- fill_in :q, with: 'printing'
36
- click_on('Search')
37
- assert page.has_content?('Where is the Makerspace in Hunt Library')
38
- end
23
+ vcr_test "should have Open Library results", "searches", cassette: 'harry potter' do
24
+ visit root_path(:q => 'harry potter')
25
+ assert page.has_content?('Harry Potter')
39
26
  end
27
+
40
28
  end
@@ -3,33 +3,28 @@ require 'test_helper'
3
3
  class BestBetsSearcherTest < ActiveSupport::TestCase
4
4
 
5
5
  setup do
6
- @best_bets = QuickSearch::BestBetsSearcher.new(HTTPClient.new, 'printing', 1)
7
- @best_bets_journal = QuickSearch::BestBetsSearcher.new(HTTPClient.new, 'journal of cell science', 1)
8
- @best_bets_database = QuickSearch::BestBetsSearcher.new(HTTPClient.new, 'encyclopedia of life sciences', 1)
6
+ @best_bets = QuickSearch::BestBetsSearcher.new(HTTPClient.new, 'acm digital library', 1)
7
+ @best_bets_eric = QuickSearch::BestBetsSearcher.new(HTTPClient.new, 'eric', 1)
9
8
  end
10
9
 
11
10
  test "should have http client, query, and per_page" do
12
11
  assert @best_bets.http.is_a? HTTPClient
13
- assert @best_bets.q == 'printing'
12
+ assert @best_bets.q == 'acm digital library'
14
13
  assert_equal 1, @best_bets.per_page
15
14
  end
16
15
 
17
- vcr_test "should have parsed results", 'searches', cassette: 'best_bets_printing' do
18
- @best_bets.search
19
- parsed_results = @best_bets.results
20
- assert parsed_results.first.title.include?('Print')
21
- end
22
-
23
- vcr_test "should have journal result", 'searches', cassette: 'best_bets_journal' do
24
- @best_bets_journal.search
25
- parsed_results = @best_bets_journal.results
26
- assert parsed_results.first.title.include?('Journal of cell science')
16
+ test "should fall back to local yml file if no solr url defined" do
17
+ QuickSearch::Engine::APP_CONFIG['best_bets']['solr_url'] = ''
18
+ @best_bets_eric.search
19
+ parsed_results = @best_bets_eric.results
20
+ assert parsed_results.first.title.include?('ERIC (Educational Resource Information Center)')
27
21
  end
28
22
 
29
- vcr_test "should have database result", 'searches', cassette: 'best_bets_database' do
30
- @best_bets_database.search
31
- parsed_results = @best_bets_database.results
32
- assert parsed_results.first.title.include?('Encyclopedia of life sciences')
23
+ vcr_test "should make request to solr if solr_url defined", 'searches', cassette: 'best_bets_acm' do
24
+ QuickSearch::Engine::APP_CONFIG['best_bets']['solr_url'] = 'http://localhost:8983/solr/bestbets/select?'
25
+ @best_bets.search
26
+ parsed_results = @best_bets.results
27
+ assert parsed_results.first.title.include?('ACM')
33
28
  end
34
29
 
35
30
  end