groonga-client-rails 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +6 -0
- data/Gemfile +21 -0
- data/README.md +57 -0
- data/Rakefile +44 -0
- data/doc/text/lgpl-2.1.txt +502 -0
- data/doc/text/news.md +5 -0
- data/groonga-client-rails.gemspec +52 -0
- data/lib/groonga-client-rails.rb +23 -0
- data/lib/groonga/client/rails/fixture.rb +35 -0
- data/lib/groonga/client/rails/groonga_server_runner.rb +164 -0
- data/lib/groonga/client/rails/spec_helper.rb +39 -0
- data/lib/groonga/client/rails/test_helper.rb +39 -0
- data/lib/groonga/client/rails/version.rb +23 -0
- data/lib/groonga/client/railtie.rb +70 -0
- data/lib/groonga/client/searcher.rb +165 -0
- data/lib/groonga/client/searcher/error.rb +37 -0
- data/lib/groonga/client/searcher/raw_request.rb +85 -0
- data/lib/groonga/client/searcher/schema.rb +74 -0
- data/lib/groonga/client/searcher/schema_synchronizer.rb +137 -0
- data/lib/groonga/client/searcher/select.rb +18 -0
- data/lib/groonga/client/searcher/select/request.rb +266 -0
- data/lib/groonga/client/searcher/select/result_set.rb +117 -0
- data/lib/groonga/client/searcher/source.rb +59 -0
- data/test/apps/rails4-mongoid/Gemfile +50 -0
- data/test/apps/rails4-mongoid/Gemfile.lock +190 -0
- data/test/apps/rails4-mongoid/README.rdoc +28 -0
- data/test/apps/rails4-mongoid/Rakefile +6 -0
- data/test/apps/rails4-mongoid/app/assets/javascripts/application.js +16 -0
- data/test/apps/rails4-mongoid/app/assets/javascripts/posts.coffee +3 -0
- data/test/apps/rails4-mongoid/app/assets/stylesheets/application.css +15 -0
- data/test/apps/rails4-mongoid/app/assets/stylesheets/posts.scss +3 -0
- data/test/apps/rails4-mongoid/app/assets/stylesheets/scaffolds.scss +73 -0
- data/test/apps/rails4-mongoid/app/controllers/application_controller.rb +5 -0
- data/test/apps/rails4-mongoid/app/controllers/posts_controller.rb +74 -0
- data/test/apps/rails4-mongoid/app/helpers/application_helper.rb +2 -0
- data/test/apps/rails4-mongoid/app/helpers/posts_helper.rb +2 -0
- data/test/apps/rails4-mongoid/app/models/post.rb +12 -0
- data/test/apps/rails4-mongoid/app/searchers/application_searcher.rb +2 -0
- data/test/apps/rails4-mongoid/app/searchers/posts_searcher.rb +16 -0
- data/test/apps/rails4-mongoid/app/views/layouts/application.html.erb +14 -0
- data/test/apps/rails4-mongoid/app/views/posts/_form.html.erb +25 -0
- data/test/apps/rails4-mongoid/app/views/posts/edit.html.erb +6 -0
- data/test/apps/rails4-mongoid/app/views/posts/index.html.erb +29 -0
- data/test/apps/rails4-mongoid/app/views/posts/index.json.jbuilder +4 -0
- data/test/apps/rails4-mongoid/app/views/posts/new.html.erb +5 -0
- data/test/apps/rails4-mongoid/app/views/posts/show.html.erb +14 -0
- data/test/apps/rails4-mongoid/app/views/posts/show.json.jbuilder +1 -0
- data/test/apps/rails4-mongoid/bin/bundle +3 -0
- data/test/apps/rails4-mongoid/bin/rails +4 -0
- data/test/apps/rails4-mongoid/bin/rake +4 -0
- data/test/apps/rails4-mongoid/bin/setup +29 -0
- data/test/apps/rails4-mongoid/config.ru +4 -0
- data/test/apps/rails4-mongoid/config/application.rb +32 -0
- data/test/apps/rails4-mongoid/config/boot.rb +3 -0
- data/test/apps/rails4-mongoid/config/environment.rb +5 -0
- data/test/apps/rails4-mongoid/config/environments/development.rb +38 -0
- data/test/apps/rails4-mongoid/config/environments/production.rb +76 -0
- data/test/apps/rails4-mongoid/config/environments/test.rb +42 -0
- data/test/apps/rails4-mongoid/config/groonga_client.yml +22 -0
- data/test/apps/rails4-mongoid/config/initializers/assets.rb +11 -0
- data/test/apps/rails4-mongoid/config/initializers/backtrace_silencers.rb +7 -0
- data/test/apps/rails4-mongoid/config/initializers/cookies_serializer.rb +3 -0
- data/test/apps/rails4-mongoid/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/apps/rails4-mongoid/config/initializers/inflections.rb +16 -0
- data/test/apps/rails4-mongoid/config/initializers/mime_types.rb +4 -0
- data/test/apps/rails4-mongoid/config/initializers/session_store.rb +3 -0
- data/test/apps/rails4-mongoid/config/initializers/wrap_parameters.rb +9 -0
- data/test/apps/rails4-mongoid/config/locales/en.yml +23 -0
- data/test/apps/rails4-mongoid/config/mongoid.yml +142 -0
- data/test/apps/rails4-mongoid/config/routes.rb +57 -0
- data/test/apps/rails4-mongoid/config/secrets.yml +22 -0
- data/test/apps/rails4-mongoid/db/seeds.rb +7 -0
- data/test/apps/rails4-mongoid/log/development.log +764 -0
- data/test/apps/rails4-mongoid/log/test.log +15736 -0
- data/test/apps/rails4-mongoid/public/404.html +67 -0
- data/test/apps/rails4-mongoid/public/422.html +67 -0
- data/test/apps/rails4-mongoid/public/500.html +66 -0
- data/test/apps/rails4-mongoid/public/favicon.ico +0 -0
- data/test/apps/rails4-mongoid/public/robots.txt +5 -0
- data/test/apps/rails4-mongoid/test/controllers/posts_controller_test.rb +51 -0
- data/test/apps/rails4-mongoid/test/factories/posts.rb +6 -0
- data/test/apps/rails4-mongoid/test/models/post_test.rb +9 -0
- data/test/apps/rails4-mongoid/test/searchers/posts_searcher_test.rb +119 -0
- data/test/apps/rails4-mongoid/test/test_helper.rb +9 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/-Xhj-Mbb82rk571sDsQxrdCywGX36vsenBH1RUlK-LY.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/0f_MbWM7kHYaEii2fU46RtcPM1c5AvKKzZXw_HiM0CE.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/2PZE0O2lwq-MOTwxKTZxLxQwY8_QyhrbRsthl3Lc4lQ.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/5dV_yE4FDckg8xSumojLvTuflbNyhpApq7LPOy-e1X0.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/7efkcYvlMpIQU8kuDy1jAKDLjakVGoH6N5V-AuzuTZc.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/8Zm1d9-lBPsGG_HUw8FP2OCCVucGDVhWAOGaopvOdss.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/9B_fDWO-7yTtWLP7C6kgtW5LN2zlpAqr1km-1jSQx2w.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/9X7nmZiJ1BxgVp80vJFjKw2uuEfdS1ik3B66O4_iWPo.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/APY89OAPJx9A3D3xcCoktvEvQUs7NcWChYXnjjjPzz0.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/CWMzfW8FmEfR6gB4BwariPLjTZTtLc4bCVc0r0m2VV4.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/C_ZXB0e-P6-9Ty60eBWeAui5uzzA0NzDW8amqmtTk9g.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/Cg1VzEm4v80ed-e0X3WGAHJWYiC_ybnfBrRrIvltPXc.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/Cjhm36F4tzUHdc1e0Bho51N0H4HYybVTrxTmbtiqih4.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/DSOLSc6A5RVSmvM415eEWAWG_AgOvZcLZOXQjsXyWQA.cache +2 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/EBtbhweQl74JQNkwFL3ahZH_9x44ceqa9hOT8lQ_SfM.cache +2 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/EQICjEOYeXNTngMqEgET0L1SuE4AVuoKyJgio4ks43A.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/Edyy4hZsoEraZijGtQOEBXtG2121KJUoZeUxxPjVoD8.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/HfA_T6XraGo2Ny22jLyDJkU33FwcVIBOxUIXJAfTZnw.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/I-oUhfEICgXeCJ30YmQbpoYtgGAJK0-Pql8kOvfHUIs.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/ITBgBGR9-8E08Y63Vjo65c8DzPESTHJuYCXZp0y6k_I.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/JImLmTmbMkDKlN30hse8U-u0IV8hvfdebOL3EFz71FE.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/Joxxq6tZo5Z61fNSWcPCGgCyehta1sNKXM0i53ziK0o.cache +2 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/KPHQh44WoGRX0SuVORNxUqq129kPRQ4Sfwr0MgBGTWg.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/MQWJrWW-vCooFa9lpB2Z7KDIE9ilL54d5Sf_SRtQhTM.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/Olyga_OJ5Sz5He_RVZLO_BraSHgGvt9BG0ORecSD4A4.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/OoG10cMLeO2eGZxk483Gx75vNDQz7Id8sxVt3g26jQE.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/P2sNuT6usNXi8DQFFQ2SMByy1v98zmNdwdx6wduUQDg.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/Pm3ENYpCrQMOJGd-d8lACN_nbGZWiivq_KyPLJoD9Xk.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/PrxeUFTxE6CmNlJ4CQLxcmAQKwOGBKNCFYluKNhVPdI.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/PuNKoh-EB-UU-NnPetIEhS3emExlV586tfFJnBFhaxo.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/QyBzeHR44VD1fMDrJcMOaVyyn1xgHnmhPX2VL3R6EdE.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/QyU_Bdj5YdiIQef2XhSDP5MQf7l3u_A81md3KFPQ2N4.cache +2 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/R9YbLXVmFuZvXntmUsVoP9gdFgZaoKuww_0l-ulu_Sw.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/RbDvgwCB1ggHONj2Gglg9cljN_KExx-gHiSiItOFBVw.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/Rkd99KDYtUtVb3U566M9L4YD2Kh-Qp147dHVmyXnDhg.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/Sin6bEoASrNa45108CpfgF2jcifz-KpbsvvZJtqVZ68.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/SuhtC6f7E2-1SXl4bkRvOKqhzFKTjPvbglVtjbjV6WQ.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/WDXpPe61HDYBIqMMzcYJWujunl4HLJBvhn0OOP1yQso.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/Y2HHx2PygDVpbc258EY6XyZq_3ocHy5fEq-5UHSNfh0.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/Zot5Dwe9yQ1wvCpegdXXjC8DUGHfH1xLxerosBjUsns.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/ZwSejSAeaXOqaevCGNDw6GT4jzf6iGxiDfUGqtjYqxE.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/bsYyBqujQ9Bb_NkqKjx8J9lC8MPb-Ed59b__aV46Bic.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/cnfLEWE92uT-WDII157E3Z5XISKK99q6__D2IiTRhOM.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/cnk28xBZ2NhIHyeh4bImJu1D8MsQZksGaVeYZSDL-Mw.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/cyuaVF0ZckKku_VGsQYOntnl3oNlSP381WW5VhCMbE4.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/ee9ZqYM3D8GORlAyhQhVVtyNcEArBAXuuAcPhnfTNT8.cache +5 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/fQe7NSWabAv2wB6jtw0Tjp5CT06xwpla822ipJiUCy0.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/fme939QD_yb-kVcNE40VAdyOZYRTHgZCxYLVDZLuzF0.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/gl7MP7d46hviHXVnGFYORtcWessT58E75rSQUFjfiII.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/hHOboG408ksat1oQaCWVNxzf-FIyTREQFXHdFZurlZQ.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/i5GV8tvuWRKqi-plBB0bdaAqfdW_CpIMlk_3qZYyask.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/ioEvK0rblqqEotrMItm0VrKhWOXnC3vwC-CIU9UCZEg.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/ivzms341pOxkVrOTXM3Yog9cLwq3SmsXcwGMbRGmM6s.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/j0l28m8jfc6vnBWrkD0zWt2ELCJfEOMeEjW0Q4GADNY.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/jPuyl--LQd6DGNNoxSkPhBGx_ul_1kfka93EDJmnc8c.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/jaYo3RHF_E7SipTqBJcsnR0JcOOa0rFpEHmp3nLDrQI.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/kSkCWaAJCcTgZ_AhrRCjZhNtkE12cubiq70uNtditqk.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/mXFXPQpdpe6VdLyG_ATkrFvhK-DzKohwq6B2GOQo9R8.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/q2eC-e4sz4yzY37JZQfdjar0jjp4v7rHuGin5JEKV7Q.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/s6DK-YkFoxYJMKXt21m9PdMtZi3TJhRoHIi0R5i69Zs.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/sLDAakEn7_JrPiyZe0ZUsCLDnaTAal-5HajraaAgdhE.cache +2 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/teXpzhiur3Mnn2KsTY8q4HhEqpbdmKBfBW2iS5-MvUI.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/tgZjQMFX0Ebx2i8ovlwnvwULhvrhFNJLAIQjUNZN1RM.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/tihMlIo90U72qN2BzGajipIJOWppg8OIJuVnnluwVJM.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/vpD8YcdUFmWVggV1ANqLIWcTbMItiGv1aOUd3i_Sf_w.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/wBoZhq66JcV9m6-FvOoZ-Q3Cy9mgT-ynjPWZWZdafLw.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/wTWJ6pQBopl4RdCt1QzngFCI6BQsl97QiZJO8bkGZd4.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/wjVbFqqSw39d-ryprJ1NYmKProunHG47jEI6RFHcLM4.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/wm5Vu6DEN0ZExnKV0oAADsKfEn3yvO4aBQJwp6b8FbU.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/x0qPZqkeQj_x2GoHegxhwuHhPMrz8iHGdALgbSEtYB0.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/xESXQaQoarUInNLmS7yPvF7D9FlSfaR8n8CsT6vIfmU.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/xJpeFclkEQS028sCHKPl9C6EyiAcTgUW_lBAqjRuP_c.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/yinyMcV6eKC4p76ZeetFBkRq8qYD5b8fWOHbukaCUNk.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/ytg8J2fjBhc978nkpdl0f5cBPdcKpig523h4O4eN664.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/z5Cl2oKorg00CGt089PLdPdoE1ELvsz4CdtXnlUk7KM.cache +0 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/z6uhOy1uoRnC6c9iKrzc1vRqGH1KQrhArDe51rZL1_k.cache +1 -0
- data/test/apps/rails4-mongoid/tmp/cache/assets/sprockets/v3.0/zIFdfoc8nFjrQhTXHyamSnNA6CVVrOcsP4qfDQhOcVI.cache +1 -0
- data/test/run-test.rb +43 -0
- data/test/unit/run-test.rb +25 -0
- data/test/unit/searcher/select/filter_parameter_test.rb +99 -0
- data/test/unit/searcher/select/match_columns_parameter_test.rb +59 -0
- data/test/unit/searcher/select/output_columns_parameter_test.rb +68 -0
- data/test/unit/searcher/select/sortby_parameter_test.rb +63 -0
- data/test/unit/test_helper.rb +19 -0
- metadata +480 -0
@@ -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,51 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class PostsControllerTest < ActionController::TestCase
|
4
|
+
include Groonga::Client::Rails::TestHelper
|
5
|
+
|
6
|
+
setup do
|
7
|
+
@post = create(:post)
|
8
|
+
end
|
9
|
+
|
10
|
+
test "should get index" do
|
11
|
+
get :index
|
12
|
+
assert_response :success
|
13
|
+
assert_not_nil assigns(:posts)
|
14
|
+
end
|
15
|
+
|
16
|
+
test "should get new" do
|
17
|
+
get :new
|
18
|
+
assert_response :success
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should create post" do
|
22
|
+
assert_difference('Post.count') do
|
23
|
+
post :create, post: { body: @post.body, title: @post.title }
|
24
|
+
end
|
25
|
+
|
26
|
+
assert_redirected_to post_path(assigns(:post))
|
27
|
+
end
|
28
|
+
|
29
|
+
test "should show post" do
|
30
|
+
get :show, id: @post
|
31
|
+
assert_response :success
|
32
|
+
end
|
33
|
+
|
34
|
+
test "should get edit" do
|
35
|
+
get :edit, id: @post
|
36
|
+
assert_response :success
|
37
|
+
end
|
38
|
+
|
39
|
+
test "should update post" do
|
40
|
+
patch :update, id: @post, post: { body: @post.body, title: @post.title }
|
41
|
+
assert_redirected_to post_path(assigns(:post))
|
42
|
+
end
|
43
|
+
|
44
|
+
test "should destroy post" do
|
45
|
+
assert_difference('Post.count', -1) do
|
46
|
+
delete :destroy, id: @post
|
47
|
+
end
|
48
|
+
|
49
|
+
assert_redirected_to posts_path
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class PostsSearcherTest < ActionController::TestCase
|
4
|
+
include Groonga::Client::Rails::TestHelper
|
5
|
+
|
6
|
+
setup do
|
7
|
+
@searcher = PostsSearcher.new
|
8
|
+
end
|
9
|
+
|
10
|
+
test "should be untagged" do
|
11
|
+
create(:post, body: "<p>Hello <em>World</em></p>")
|
12
|
+
result_set = @searcher.search.result_set
|
13
|
+
assert_equal(["Hello World"],
|
14
|
+
result_set.records.collect {|record| record["body"]})
|
15
|
+
end
|
16
|
+
|
17
|
+
test "should be searchable without match_columns" do
|
18
|
+
create(:post, body: "Hello World")
|
19
|
+
create(:post, body: "Hello Rails")
|
20
|
+
result_set = @searcher.search.query("World").result_set
|
21
|
+
assert_equal(["Hello World"],
|
22
|
+
result_set.records.collect {|record| record["body"]})
|
23
|
+
end
|
24
|
+
|
25
|
+
test "should be searchable by a filter" do
|
26
|
+
create(:post, body: "Hello World")
|
27
|
+
create(:post, body: "Hello Rails")
|
28
|
+
result_set = @searcher.
|
29
|
+
search.
|
30
|
+
filter("body @ %{keyword}", {keyword: "World"}).
|
31
|
+
result_set
|
32
|
+
assert_equal(["Hello World"],
|
33
|
+
result_set.records.collect {|record| record["body"]})
|
34
|
+
end
|
35
|
+
|
36
|
+
test "should be searchable by filters" do
|
37
|
+
create(:post, body: "Hello World")
|
38
|
+
create(:post, body: "Hello Rails")
|
39
|
+
create(:post, body: "Hi World")
|
40
|
+
result_set = @searcher.
|
41
|
+
search.
|
42
|
+
filter("body @ %{keyword}", {keyword: "Hello"}).
|
43
|
+
filter("body @ %{keyword}", {keyword: "World"}).
|
44
|
+
result_set
|
45
|
+
assert_equal(["Hello World"],
|
46
|
+
result_set.records.collect {|record| record["body"]})
|
47
|
+
end
|
48
|
+
|
49
|
+
test "should be searchable with special characters by a filter" do
|
50
|
+
create(:post, body: "Hello \"Wo\\rld\"")
|
51
|
+
create(:post, body: "Hello Rails")
|
52
|
+
result_set = @searcher.
|
53
|
+
search.
|
54
|
+
filter("body @ %{keyword}", {keyword: "\"Wo\\rld\""}).
|
55
|
+
result_set
|
56
|
+
assert_equal(["Hello \"Wo\\rld\""],
|
57
|
+
result_set.records.collect {|record| record["body"]})
|
58
|
+
end
|
59
|
+
|
60
|
+
test "should support snippet_html in output_columns" do
|
61
|
+
create(:post, body: "Hello World")
|
62
|
+
create(:post, body: "Hi Rails! Hello!")
|
63
|
+
result_set = @searcher.
|
64
|
+
search.
|
65
|
+
query("Hello").
|
66
|
+
output_columns("snippet_html(body)").
|
67
|
+
result_set
|
68
|
+
snippet_htmls = result_set.records.collect do |record|
|
69
|
+
record["snippet_html"]
|
70
|
+
end
|
71
|
+
assert_equal([
|
72
|
+
["<span class=\"keyword\">Hello</span> World"],
|
73
|
+
["Hi Rails! <span class=\"keyword\">Hello</span>!"],
|
74
|
+
],
|
75
|
+
snippet_htmls)
|
76
|
+
end
|
77
|
+
|
78
|
+
test "should support Array for output_columns" do
|
79
|
+
post = create(:post, body: "Hello World")
|
80
|
+
result_set = @searcher.
|
81
|
+
search.
|
82
|
+
query("World").
|
83
|
+
output_columns(["_key", "body"]).
|
84
|
+
result_set
|
85
|
+
data = result_set.records.collect do |record|
|
86
|
+
[
|
87
|
+
record["_id"],
|
88
|
+
record["_key"],
|
89
|
+
record["body"],
|
90
|
+
]
|
91
|
+
end
|
92
|
+
assert_equal([
|
93
|
+
[
|
94
|
+
nil,
|
95
|
+
"#{post.class}-#{post.id}",
|
96
|
+
"Hello World",
|
97
|
+
],
|
98
|
+
],
|
99
|
+
data)
|
100
|
+
end
|
101
|
+
|
102
|
+
test "should support pagination" do
|
103
|
+
100.times do |i|
|
104
|
+
create(:post, body: "Hello #{i}")
|
105
|
+
end
|
106
|
+
result_set = @searcher.search.paginate(3, per_page: 5).result_set
|
107
|
+
data = result_set.records.collect do |record|
|
108
|
+
record["body"]
|
109
|
+
end
|
110
|
+
assert_equal([
|
111
|
+
"Hello 15",
|
112
|
+
"Hello 16",
|
113
|
+
"Hello 17",
|
114
|
+
"Hello 18",
|
115
|
+
"Hello 19",
|
116
|
+
],
|
117
|
+
data)
|
118
|
+
end
|
119
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
ENV['RAILS_ENV'] ||= 'test'
|
2
|
+
require File.expand_path('../../config/environment', __FILE__)
|
3
|
+
require 'rails/test_help'
|
4
|
+
require 'groonga/client/rails/test_helper'
|
5
|
+
|
6
|
+
class ActiveSupport::TestCase
|
7
|
+
# Add more helper methods to be used by all tests here...
|
8
|
+
include FactoryGirl::Syntax::Methods
|
9
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�app/assets/javascripts/application.js?type=application/javascript&id=02d56835bae1fe9be03bf2512363ac371851f28e05e4718b5e4753fd80fea12f:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
"%��B�����șo�$'�A�d��L���xR�U
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�/var/lib/gems/2.3.0/gems/jquery-rails-4.1.1/vendor/assets/javascripts/jquery_ujs.js?type=application/javascript&pipeline=self&id=d76aff351702380f762916523768e839f5bd35382d0203431db856332b046114:ET
|
Binary file
|
Binary file
|
Binary file
|