umlaut 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/resolve_controller.rb +15 -1
- data/app/controllers/search_methods/sfx4.rb +6 -2
- data/app/controllers/search_methods/sfx4_solr/searcher.rb +31 -3
- data/app/service_adaptors/bx.rb +1 -3
- data/app/service_adaptors/sfx.rb +175 -175
- data/lib/umlaut/version.rb +1 -1
- data/test/dummy/tmp/cache/assets/BFF/760/sprockets%2Fe00969069e468419c393709f042b4527 +0 -0
- data/test/dummy/tmp/cache/assets/C99/040/sprockets%2F84d95490d4855608b8dd8602192f4f9c +0 -0
- data/test/dummy/tmp/cache/assets/{DE8/790/sprockets%2Fd1333bde2b9aafcc712d11dd09ab35d8 → C9D/060/sprockets%2F5c8956a1666824a1d214531abd22e2a2} +0 -0
- data/test/dummy/tmp/cache/assets/CC7/D80/sprockets%2F62a4c21a1d5bac4064e25082f523f238 +0 -0
- data/test/dummy/tmp/cache/assets/CC8/C70/sprockets%2F397590f867a06c2d0595c75ed4269e9b +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/{D9A/2F0/sprockets%2Fbba0f4b972dc53c15ce6c8c1993b82a4 → CE3/1F0/sprockets%2F9a3b0380fe964d77f0013845d3d355fd} +0 -0
- data/test/dummy/tmp/cache/assets/{CC7/F10/sprockets%2F939637f806eef3f0f21584659458ab2e → CE7/FA0/sprockets%2F98df08987c1b5c0f643a21538a7182ec} +0 -0
- data/test/dummy/tmp/cache/assets/CEA/930/sprockets%2F42ebf67295336dfb5725a8bb12881a98 +0 -0
- data/test/dummy/tmp/cache/assets/{C49/730/sprockets%2F212d35831188417b5131e3e693aa69a6 → D02/B30/sprockets%2Fb9332ebd1d306cc9120a386ca986034d} +0 -0
- data/test/dummy/tmp/cache/assets/D15/FC0/sprockets%2F8cbf3a8b7acb7fc27a42168846226385 +0 -0
- data/test/dummy/tmp/cache/assets/{DF7/960/sprockets%2F99ac6db10b44a64fbba4ee847b35ba8b → D17/BC0/sprockets%2F1ae6578a93a7a3d848319dea314f592d} +0 -0
- data/test/dummy/tmp/cache/assets/{E02/C10/sprockets%2F1463cadfce3fc70e61d482f9fcb75ac7 → D2D/240/sprockets%2F6610ec2488ff4a57d54efb798f1a9994} +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D33/2C0/sprockets%2F790e9527eead8b020b92b34dc6a600d2 +0 -0
- data/test/dummy/tmp/cache/assets/{BBA/6A0/sprockets%2F2a335471966f33256b321f8324041981 → D38/930/sprockets%2F45cee52fe11df0057793a6751aa65a4c} +0 -0
- data/test/dummy/tmp/cache/assets/D39/B30/sprockets%2Fcb7b9f6963b829c678ff9267c63577ce +0 -0
- data/test/dummy/tmp/cache/assets/D47/690/sprockets%2Fd92186d33469ff2bd01ba096f33dfd78 +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/{C5A/A80/sprockets%2F2328c7370b56b4151776981a5f6d394e → D5F/690/sprockets%2Febe18c52ead548a955a1f2be191130b3} +0 -0
- data/test/dummy/tmp/cache/assets/{C70/4D0/sprockets%2F034ad2036e623081bd352800786dfe80 → D65/0D0/sprockets%2F9fd0b369f009be410bdb0b6e5458b3a6} +0 -0
- data/test/dummy/tmp/cache/assets/{E5E/5F0/sprockets%2Feffaeb4d7f9bf4c0cc840ff320fde046 → D65/820/sprockets%2Fae5318865ebb4a2b74e84c0e13fb921a} +0 -0
- data/test/dummy/tmp/cache/assets/D6A/A80/sprockets%2F22d5d4e74a9a3f3deb5a92704ae750f3 +0 -0
- data/test/dummy/tmp/cache/assets/{D9C/860/sprockets%2Fec2d9f20b270d70e698ff33e53c21fca → D6B/020/sprockets%2Ffba640f8143fc0c24e3e6616e2eb93a9} +0 -0
- data/test/dummy/tmp/cache/assets/D6B/8C0/sprockets%2Fa0dc07225af433e77fd6a9028a8e3c6e +0 -0
- data/test/dummy/tmp/cache/assets/D72/1E0/sprockets%2Fdee77a9fb00d0a6229fd6b54a8f14197 +0 -0
- data/test/dummy/tmp/cache/assets/D98/990/sprockets%2F710ede3e7f5ebab14e9772fa88c00c02 +0 -0
- data/test/dummy/tmp/cache/assets/{D6E/CF0/sprockets%2F5661c6e4f0cea86fe4523f27261aade5 → DAB/C70/sprockets%2Ff8ac0db14f84bce083a7c58f965e806f} +0 -0
- data/test/dummy/tmp/cache/assets/DAD/BA0/sprockets%2F193f81f7e4eae26eaaa7d909c0c8e956 +0 -0
- data/test/dummy/tmp/cache/assets/{D37/2B0/sprockets%2F40834fb07d7318c1fddd5003bd9e04f6 → DCB/620/sprockets%2F2332a294ceeab3ab9b5ee643989dc0eb} +0 -0
- data/test/dummy/tmp/cache/assets/{DB6/ED0/sprockets%2Ff4482d9b9f76fb65eef16430bde2f8e6 → DD1/120/sprockets%2Fbee5967b8282dab9fce5c242bcc14c55} +0 -0
- data/test/dummy/tmp/cache/assets/DD6/010/sprockets%2F15a8fcbaccc97804fce2ee514e371f79 +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/DEF/A60/sprockets%2F3fddcee3e5dbd24f28de1001e5f3a009 +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/{E50/F00/sprockets%2Fec61afdbb1cc4df075e3dad46f0af571 → E2E/350/sprockets%2Fbea81b7c4fdf19664eff44b21ea53dbe} +0 -0
- data/test/dummy/tmp/cache/assets/{DA9/BC0/sprockets%2Fcb9062b73291befe5e5bf2a70978dec8 → EF1/680/sprockets%2Fed8ede7dea4bd22aacb9584fbe7d6cad} +0 -0
- data/test/dummy/tmp/cache/sass/b43409235ed55124ccf6a0235156711682d0fe98/umlaut.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{93d65682d6bddb0b2e6788c1232f4849af20a35e → d2b87393a9fcb33d01e765e1c09b76db7f14f647}/bootstrap-responsive.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{93d65682d6bddb0b2e6788c1232f4849af20a35e → d2b87393a9fcb33d01e765e1c09b76db7f14f647}/bootstrap.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_accordion.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_alerts.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_breadcrumbs.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_button-groups.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_buttons.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_carousel.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_close.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_code.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_component-animations.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_dropdowns.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_forms.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_grid.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_hero-unit.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_labels-badges.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_layouts.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_media.scssc +0 -0
- data/test/dummy/tmp/cache/sass/db21ae7b0d8da2224e8e1d588985ee0507dc926a/_mixins.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_modals.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_navbar.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_navs.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_pager.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_pagination.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_popovers.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_progress-bars.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_reset.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_responsive-1200px-min.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_responsive-767px-max.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_responsive-768px-979px.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_responsive-navbar.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_responsive-utilities.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_scaffolding.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_sprites.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_tables.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_thumbnails.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_tooltip.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_type.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_utilities.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_variables.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/_wells.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/bootstrap.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{310d901c169042855feb8cf3903e1e2821d27f13 → db21ae7b0d8da2224e8e1d588985ee0507dc926a}/responsive.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{3af72421a0fbed39d3047687ca0ad6e6e5545041 → fc140da5c32e19b5c3f84a23bb2383ebc83fcc20}/_admin.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{3af72421a0fbed39d3047687ca0ad6e6e5545041 → fc140da5c32e19b5c3f84a23bb2383ebc83fcc20}/_az.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{3af72421a0fbed39d3047687ca0ad6e6e5545041 → fc140da5c32e19b5c3f84a23bb2383ebc83fcc20}/_forms.scssc +0 -0
- data/test/dummy/tmp/cache/sass/fc140da5c32e19b5c3f84a23bb2383ebc83fcc20/_icons.scssc +0 -0
- data/test/dummy/tmp/cache/sass/fc140da5c32e19b5c3f84a23bb2383ebc83fcc20/_layout.scssc +0 -0
- data/test/dummy/tmp/cache/sass/fc140da5c32e19b5c3f84a23bb2383ebc83fcc20/_misc.scssc +0 -0
- data/test/dummy/tmp/cache/sass/fc140da5c32e19b5c3f84a23bb2383ebc83fcc20/_mixins.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{3af72421a0fbed39d3047687ca0ad6e6e5545041 → fc140da5c32e19b5c3f84a23bb2383ebc83fcc20}/_modal.scssc +0 -0
- data/test/dummy/tmp/cache/sass/fc140da5c32e19b5c3f84a23bb2383ebc83fcc20/_resolve.scssc +0 -0
- data/test/dummy/tmp/cache/sass/fc140da5c32e19b5c3f84a23bb2383ebc83fcc20/_results.scssc +0 -0
- data/test/dummy/tmp/cache/sass/fc140da5c32e19b5c3f84a23bb2383ebc83fcc20/_search.scssc +0 -0
- data/test/dummy/tmp/cache/sass/{3af72421a0fbed39d3047687ca0ad6e6e5545041 → fc140da5c32e19b5c3f84a23bb2383ebc83fcc20}/_spinner.scssc +0 -0
- data/test/dummy/tmp/cache/sass/fc140da5c32e19b5c3f84a23bb2383ebc83fcc20/_variables.scssc +0 -0
- data/test/fixtures/permalinks.yml +1 -1
- data/test/fixtures/referent_values.yml +107 -85
- data/test/fixtures/referents.yml +10 -9
- data/test/fixtures/requests.yml +10 -14
- data/test/fixtures/service_responses.yml +12 -12
- data/test/functional/resolve_controller_test.rb +23 -1
- data/test/test_helper.rb +1 -0
- data/test/unit/README.md +126 -0
- data/test/unit/bx_test.rb +39 -0
- data/test/unit/collection_test.rb +1 -1
- data/test/unit/service_test.rb +1 -1
- data/test/unit/sfx4_solr_search_test.rb +9 -5
- data/test/unit/sfx_test.rb +1 -0
- data/test/vcr_cassettes/bx/article_that_has_recommendations.yml +65 -0
- data/test/vcr_cassettes/sfx4_solr/find_by_group.yml +108 -92
- data/test/vcr_cassettes/sfx4_solr/find_by_title_begins_with.yml +52 -14
- data/test/vcr_cassettes/sfx4_solr/find_by_title_contains.yml +53 -15
- data/test/vcr_cassettes/sfx4_solr/find_by_title_exact.yml +17 -13
- metadata +536 -566
- checksums.yaml +0 -15
- data/app/assets/stylesheets/umlaut/_expand_contract.scss +0 -10
- data/app/controllers/journal_tocs_controller +0 -90
- data/app/models/service_store.rb-NEW +0 -73
- data/app/service_adaptors/tr_link.rb +0 -267
- data/app/service_adaptors/tr_links.rb +0 -278
- data/lib/tasks/Untitled-1 +0 -8
- data/test/dummy/config/umlaut_services-JH.yml +0 -223
- data/test/dummy/config/umlaut_services-TEST.yml +0 -37
- data/test/dummy/tmp/cache/assets/C2A/410/sprockets%2Fd654b74912b4773a2534616863fb6565 +0 -0
- data/test/dummy/tmp/cache/assets/C45/A30/sprockets%2F39494895e462697b478d3d0c79298a26 +0 -0
- data/test/dummy/tmp/cache/assets/C55/1D0/sprockets%2F5af2f2a3403040f736981863fd278529 +0 -0
- data/test/dummy/tmp/cache/assets/C5F/340/sprockets%2F99692920160b7a279b86a80415b79db7 +0 -0
- data/test/dummy/tmp/cache/assets/C80/980/sprockets%2Fc94807409c1523d43e18d25f35d93c41 +0 -0
- data/test/dummy/tmp/cache/assets/C94/E20/sprockets%2F19579abc248373f419b1c3e287d74598 +0 -0
- data/test/dummy/tmp/cache/assets/C98/330/sprockets%2F0c81574ba94abc10657315d4190c201f +0 -0
- data/test/dummy/tmp/cache/assets/CA4/440/sprockets%2F0feb4425db6319d7d0582192a503671b +0 -0
- data/test/dummy/tmp/cache/assets/CA7/E80/sprockets%2F33310f455a870eaedd6d938e30620714 +0 -0
- data/test/dummy/tmp/cache/assets/CB8/3C0/sprockets%2F697cd846490fda9f0e20c558320610f8 +0 -0
- data/test/dummy/tmp/cache/assets/CBD/730/sprockets%2F034c1086748b981c36672d5a56e7fed6 +0 -0
- data/test/dummy/tmp/cache/assets/CBF/B60/sprockets%2F08ca89671549936265dcb673bf02e36f +0 -0
- data/test/dummy/tmp/cache/assets/CC9/9F0/sprockets%2F306166316e2cafd13c15e62b51a2339d +0 -0
- data/test/dummy/tmp/cache/assets/CD1/F20/sprockets%2F385e5fb31cf27e262480d1174be1d500 +0 -0
- data/test/dummy/tmp/cache/assets/CF7/2B0/sprockets%2F25a7c73655bd3598173b39d9f98bcd46 +0 -0
- data/test/dummy/tmp/cache/assets/CF8/DA0/sprockets%2Ff5b8c8499d3da954d392fa57739503c5 +0 -0
- data/test/dummy/tmp/cache/assets/CF9/590/sprockets%2F096bcc45cd31b3796fa2121cd203215f +0 -0
- data/test/dummy/tmp/cache/assets/CFE/080/sprockets%2F37fe9f4255baddbd549a659914929398 +0 -0
- data/test/dummy/tmp/cache/assets/D04/CC0/sprockets%2Fe9c1b92f2e437e1bbbe020d718739220 +0 -0
- data/test/dummy/tmp/cache/assets/D0B/090/sprockets%2F58009091c95e3ac328c91c68fca30e0e +0 -0
- data/test/dummy/tmp/cache/assets/D16/F90/sprockets%2F5fe3c021048c6f9a6086bed7736d87b1 +0 -0
- data/test/dummy/tmp/cache/assets/D1A/B50/sprockets%2F2db5892438129fe94da8429b8be114ec +0 -0
- data/test/dummy/tmp/cache/assets/D24/360/sprockets%2F6987b047a96dc685ba3cf39b31477f6d +0 -0
- data/test/dummy/tmp/cache/assets/D2D/1A0/sprockets%2F376426b4896a3cff7969ce6c7b387e0e +0 -0
- data/test/dummy/tmp/cache/assets/D43/0D0/sprockets%2F682843a8d0795a5fbcfeb2f0c81727d0 +0 -0
- data/test/dummy/tmp/cache/assets/D46/F80/sprockets%2Fb15c08e749067d7aad9baf5e9388221c +0 -0
- data/test/dummy/tmp/cache/assets/D6C/7D0/sprockets%2F8a05d6981ec0d38c51739bef0b3a9c2b +0 -0
- data/test/dummy/tmp/cache/assets/D94/FF0/sprockets%2F3b56a1aa77de0d570c38a4a9d5f4b1d6 +0 -0
- data/test/dummy/tmp/cache/assets/D97/6B0/sprockets%2Fb070e8c799d1a4ad5e62e0a1ae3b83e6 +0 -0
- data/test/dummy/tmp/cache/assets/DA6/A80/sprockets%2F92e26d8e58d5bcc8b8f6c25d1b05b9c1 +0 -0
- data/test/dummy/tmp/cache/assets/DA8/BB0/sprockets%2F0cf1c7e9f966dce425517c0e2a844efe +0 -0
- data/test/dummy/tmp/cache/assets/DC0/D20/sprockets%2F1ccf7405cd252dcec4bf23af82e2563a +0 -0
- data/test/dummy/tmp/cache/assets/DCF/7B0/sprockets%2Ffaa6a4d1af3261fca7b6ddc987386b90 +0 -0
- data/test/dummy/tmp/cache/assets/DD2/D80/sprockets%2Fc66d103807d0f971fbbcf9aa8b8b27ee +0 -0
- data/test/dummy/tmp/cache/assets/DFC/040/sprockets%2F15ea81cf915c0cb1dfc9cc04c9fef364 +0 -0
- data/test/dummy/tmp/cache/assets/DFD/300/sprockets%2Fabac9489cf7f1db8ef00d72a1571ee1e +0 -0
- data/test/dummy/tmp/cache/assets/E38/FE0/sprockets%2Fe1fc875efa817cbb94a5d8de25ea4e6b +0 -0
- data/test/dummy/tmp/cache/assets/E5F/960/sprockets%2Fdc007b6cad5c7ef08e33ec28cfff0ef6 +0 -0
- data/test/dummy/tmp/cache/sass/310d901c169042855feb8cf3903e1e2821d27f13/_mixins.scssc +0 -0
- data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_base.scssc +0 -0
- data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_icons.scssc +0 -0
- data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_misc.scssc +0 -0
- data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_mixins.scssc +0 -0
- data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_resolve.scssc +0 -0
- data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_results.scssc +0 -0
- data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_search.scssc +0 -0
- data/test/dummy/tmp/cache/sass/3af72421a0fbed39d3047687ca0ad6e6e5545041/_variables.scssc +0 -0
- data/test/dummy/tmp/cache/sass/fb58c04fd15fcc38a8c4d91b7070bcfeaf1c3799/umlaut.css.scssc +0 -0
- data/test/dummy/tmp/performance/BenchmarkerTest#test_puts_foo_gc_runs.csv +0 -2
- data/test/dummy/tmp/performance/BenchmarkerTest#test_puts_foo_gc_time.csv +0 -2
- data/test/dummy/tmp/performance/BenchmarkerTest#test_puts_foo_memory.csv +0 -2
- data/test/dummy/tmp/performance/BenchmarkerTest#test_puts_foo_objects.csv +0 -2
- data/test/dummy/tmp/performance/BenchmarkerTest#test_puts_foo_wall_time.csv +0 -2
- data/test/dummy/tmp/performance/ProfilerTest#test_puts_foo_process_time_flat.txt +0 -11
- data/test/dummy/tmp/performance/ProfilerTest#test_puts_foo_process_time_graph.html +0 -303
- data/test/dummy/tmp/performance/ProfilerTest#test_puts_foo_process_time_stack.html +0 -546
- data/test/dummy/tmp/performance/ProfilerTest#test_puts_foo_process_time_tree.txt +0 -38
- data/test/dummy/tmp/performance/empty.png +0 -0
- data/test/dummy/tmp/performance/minus.png +0 -0
- data/test/dummy/tmp/performance/plus.png +0 -0
@@ -5,6 +5,12 @@
|
|
5
5
|
class ResolveController < UmlautController
|
6
6
|
before_filter :init_processing
|
7
7
|
|
8
|
+
# We need to NOT require a CSRF token on post to #index,
|
9
|
+
# to allow POSTed OpenURLs
|
10
|
+
protect_from_forgery :except => :index
|
11
|
+
# POST'ed OpenURLs are a mess, redirect them to GETs
|
12
|
+
before_filter :post_to_get, :only => :index
|
13
|
+
|
8
14
|
# Init processing will look at this list, and for actions mentioned,
|
9
15
|
# will not create a @user_request if an existing one can't be found.
|
10
16
|
# Used for actions meant only to deal with existing requests.
|
@@ -129,14 +135,22 @@ class ResolveController < UmlautController
|
|
129
135
|
|
130
136
|
protected
|
131
137
|
|
138
|
+
def post_to_get
|
139
|
+
if request.method == "POST"
|
140
|
+
redirect_to url_for(params)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
132
144
|
# Retrives or sets up the relevant Umlaut Request, and returns it.
|
133
|
-
def init_processing
|
145
|
+
def init_processing
|
134
146
|
# intentionally trigger creation of session if it didn't already exist
|
135
147
|
# because we need to track session ID for caching. Can't find any
|
136
148
|
# way to force session creation without setting a value in session,
|
137
149
|
# so we do this weird one.
|
138
150
|
session[nil] = nil
|
139
151
|
|
152
|
+
|
153
|
+
|
140
154
|
# We have to clean the params of bad char encoding bytes, or it causes
|
141
155
|
# no end of problems later. We can't just refuse to process, sources
|
142
156
|
# do send us bad bytes, I'm afraid.
|
@@ -40,7 +40,7 @@ module SearchMethods
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# Needs to return ContextObjects
|
43
|
-
def find_by_title
|
43
|
+
def find_by_title
|
44
44
|
connection = sfx4_db_connection
|
45
45
|
query_match_clause = case search_type_param
|
46
46
|
when "contains"
|
@@ -51,8 +51,12 @@ module SearchMethods
|
|
51
51
|
end
|
52
52
|
# Then make each term required, but stemmed. Seems to match SFX4,
|
53
53
|
# and more importantly give us decent results.
|
54
|
+
#
|
55
|
+
# For reasons we can't entirely tell, the wildcard "*" on terms of less
|
56
|
+
# than 2 causes false negatives. Otherwise we use it to be consistent
|
57
|
+
# with SFX. This reverse-engineering is full of pitfalls.
|
54
58
|
query = terms.collect do |term|
|
55
|
-
"+" + connection.quote_string(term) + "*"
|
59
|
+
"+" + connection.quote_string(term) + (term.length > 2 ? "*" : "")
|
56
60
|
end.join(" ")
|
57
61
|
"MATCH (TS.TITLE_SEARCH) AGAINST ('#{query}' IN BOOLEAN MODE)"
|
58
62
|
when "begins"
|
@@ -28,24 +28,52 @@ module SearchMethods
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def _search_by_title(query, search_type, page=1)
|
31
|
+
# 20 per page
|
32
|
+
# TODO: Make this configurable
|
33
|
+
per_page = 20
|
34
|
+
# Upcase the query since SFX normalizes titles
|
35
|
+
# by doing the same.
|
36
|
+
query = query.upcase
|
37
|
+
# Remove "the", "a", and "an" from the query
|
38
|
+
# so that a search for "the economist" and a
|
39
|
+
# search for "economist" return the same results.
|
40
|
+
# Seems to be remotely similar to how SFX works
|
41
|
+
# though I'm not sure if that's the best example
|
42
|
+
# to follow.
|
43
|
+
[/^THE /, /^AN? /].each do |article|
|
44
|
+
query.gsub! article, ""
|
45
|
+
end
|
46
|
+
# Sunspot DSL per search type
|
31
47
|
search = case search_type
|
32
48
|
when "contains"
|
33
49
|
az_title_klass.search {
|
34
50
|
keywords query, :fields => [:title]
|
51
|
+
# Order by relevance, since we can
|
52
|
+
order_by(:score, :desc)
|
53
|
+
# Order by title after relevance
|
35
54
|
order_by(:title_sort, :asc)
|
36
|
-
|
55
|
+
# Pagination
|
56
|
+
paginate(:page => page, :per_page => per_page)
|
37
57
|
}
|
38
58
|
when "begins"
|
39
59
|
az_title_klass.search {
|
40
60
|
with(:title_exact).starting_with(query)
|
61
|
+
# Order by relevance, since we can
|
62
|
+
order_by(:score, :desc)
|
63
|
+
# Order by title after relevance
|
41
64
|
order_by(:title_sort, :asc)
|
42
|
-
|
65
|
+
# Pagination
|
66
|
+
paginate(:page => page, :per_page => per_page)
|
43
67
|
}
|
44
68
|
else # exact
|
45
69
|
az_title_klass.search {
|
46
70
|
with(:title_exact, query)
|
71
|
+
# Order by relevance, since we can
|
72
|
+
order_by(:score, :desc)
|
73
|
+
# Order by title after relevance
|
47
74
|
order_by(:title_sort, :asc)
|
48
|
-
|
75
|
+
# Pagination
|
76
|
+
paginate(:page => page, :per_page => per_page)
|
49
77
|
}
|
50
78
|
end
|
51
79
|
end
|
data/app/service_adaptors/bx.rb
CHANGED
@@ -30,11 +30,9 @@ class Bx < Service
|
|
30
30
|
format = "rss"
|
31
31
|
bx_url = "#{@base_url}?res_dat=format%3D#{format}%26source%3D#{@source}%26token%3D#{@token}%26maxRecords%3D#{@max_records}%26threshold%3D#{@threshold}%26baseUrl%3D#{@openurl_base}&#{request.to_context_object.kev}"
|
32
32
|
response = open(bx_url)
|
33
|
-
Rails.logger.debug("bX URL #{bx_url.inspect}")
|
34
33
|
response_xml_str = response.read
|
35
|
-
Rails.logger.debug("bX Response #{response_xml_str.inspect}")
|
36
34
|
response_xml = Nokogiri::XML(response_xml_str)
|
37
|
-
response_xml.search("//item") do |item|
|
35
|
+
response_xml.search("//item").each do |item|
|
38
36
|
title = item.at("title").inner_text
|
39
37
|
author = item.at("author").inner_text
|
40
38
|
display_text = (author.nil?)? "#{title}" : "#{author}; #{title}"
|