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,50 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
|
4
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
5
|
+
gem 'rails', '4.2.6'
|
6
|
+
# Use SCSS for stylesheets
|
7
|
+
gem 'sass-rails', '~> 5.0'
|
8
|
+
# Use Uglifier as compressor for JavaScript assets
|
9
|
+
gem 'uglifier', '>= 1.3.0'
|
10
|
+
# Use CoffeeScript for .coffee assets and views
|
11
|
+
gem 'coffee-rails', '~> 4.1.0'
|
12
|
+
# See https://github.com/rails/execjs#readme for more supported runtimes
|
13
|
+
# gem 'therubyracer', platforms: :ruby
|
14
|
+
|
15
|
+
# Use jquery as the JavaScript library
|
16
|
+
gem 'jquery-rails'
|
17
|
+
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
18
|
+
gem 'turbolinks'
|
19
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
20
|
+
gem 'jbuilder', '~> 2.0'
|
21
|
+
# bundle exec rake doc:rails generates the API under doc/api.
|
22
|
+
gem 'sdoc', '~> 0.4.0', group: :doc
|
23
|
+
|
24
|
+
# Use ActiveModel has_secure_password
|
25
|
+
# gem 'bcrypt', '~> 3.1.7'
|
26
|
+
|
27
|
+
# Use Unicorn as the app server
|
28
|
+
# gem 'unicorn'
|
29
|
+
|
30
|
+
# Use Capistrano for deployment
|
31
|
+
# gem 'capistrano-rails', group: :development
|
32
|
+
|
33
|
+
gem 'mongoid', '~> 5.1.1'
|
34
|
+
|
35
|
+
gem 'groonga-client-rails', path: '../../../'
|
36
|
+
|
37
|
+
group :development, :test do
|
38
|
+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
39
|
+
gem 'byebug'
|
40
|
+
|
41
|
+
gem 'factory_girl_rails'
|
42
|
+
end
|
43
|
+
|
44
|
+
group :development do
|
45
|
+
# Access an IRB console on exception pages or by using <%= console %> in views
|
46
|
+
gem 'web-console', '~> 2.0'
|
47
|
+
|
48
|
+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
49
|
+
gem 'spring'
|
50
|
+
end
|
@@ -0,0 +1,190 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../../../
|
3
|
+
specs:
|
4
|
+
groonga-client-rails (0.9.0)
|
5
|
+
groonga-client (>= 0.2.4)
|
6
|
+
rails
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actionmailer (4.2.6)
|
12
|
+
actionpack (= 4.2.6)
|
13
|
+
actionview (= 4.2.6)
|
14
|
+
activejob (= 4.2.6)
|
15
|
+
mail (~> 2.5, >= 2.5.4)
|
16
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
17
|
+
actionpack (4.2.6)
|
18
|
+
actionview (= 4.2.6)
|
19
|
+
activesupport (= 4.2.6)
|
20
|
+
rack (~> 1.6)
|
21
|
+
rack-test (~> 0.6.2)
|
22
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
23
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
24
|
+
actionview (4.2.6)
|
25
|
+
activesupport (= 4.2.6)
|
26
|
+
builder (~> 3.1)
|
27
|
+
erubis (~> 2.7.0)
|
28
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
29
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
30
|
+
activejob (4.2.6)
|
31
|
+
activesupport (= 4.2.6)
|
32
|
+
globalid (>= 0.3.0)
|
33
|
+
activemodel (4.2.6)
|
34
|
+
activesupport (= 4.2.6)
|
35
|
+
builder (~> 3.1)
|
36
|
+
activerecord (4.2.6)
|
37
|
+
activemodel (= 4.2.6)
|
38
|
+
activesupport (= 4.2.6)
|
39
|
+
arel (~> 6.0)
|
40
|
+
activesupport (4.2.6)
|
41
|
+
i18n (~> 0.7)
|
42
|
+
json (~> 1.7, >= 1.7.7)
|
43
|
+
minitest (~> 5.1)
|
44
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
45
|
+
tzinfo (~> 1.1)
|
46
|
+
arel (6.0.3)
|
47
|
+
binding_of_caller (0.7.2)
|
48
|
+
debug_inspector (>= 0.0.1)
|
49
|
+
bson (4.0.4)
|
50
|
+
builder (3.2.2)
|
51
|
+
byebug (8.2.2)
|
52
|
+
coffee-rails (4.1.1)
|
53
|
+
coffee-script (>= 2.2.0)
|
54
|
+
railties (>= 4.0.0, < 5.1.x)
|
55
|
+
coffee-script (2.4.1)
|
56
|
+
coffee-script-source
|
57
|
+
execjs
|
58
|
+
coffee-script-source (1.10.0)
|
59
|
+
concurrent-ruby (1.0.1)
|
60
|
+
debug_inspector (0.0.2)
|
61
|
+
erubis (2.7.0)
|
62
|
+
execjs (2.6.0)
|
63
|
+
factory_girl (4.5.0)
|
64
|
+
activesupport (>= 3.0.0)
|
65
|
+
factory_girl_rails (4.6.0)
|
66
|
+
factory_girl (~> 4.5.0)
|
67
|
+
railties (>= 3.0.0)
|
68
|
+
globalid (0.3.6)
|
69
|
+
activesupport (>= 4.1.0)
|
70
|
+
gqtp (1.0.6)
|
71
|
+
groonga-client (0.2.4)
|
72
|
+
gqtp (>= 1.0.4)
|
73
|
+
groonga-command (>= 1.2.0)
|
74
|
+
hashie
|
75
|
+
groonga-command (1.2.0)
|
76
|
+
json
|
77
|
+
hashie (3.4.3)
|
78
|
+
i18n (0.7.0)
|
79
|
+
jbuilder (2.4.1)
|
80
|
+
activesupport (>= 3.0.0, < 5.1)
|
81
|
+
multi_json (~> 1.2)
|
82
|
+
jquery-rails (4.1.1)
|
83
|
+
rails-dom-testing (>= 1, < 3)
|
84
|
+
railties (>= 4.2.0)
|
85
|
+
thor (>= 0.14, < 2.0)
|
86
|
+
json (1.8.3)
|
87
|
+
loofah (2.0.3)
|
88
|
+
nokogiri (>= 1.5.9)
|
89
|
+
mail (2.6.4)
|
90
|
+
mime-types (>= 1.16, < 4)
|
91
|
+
mime-types (3.0)
|
92
|
+
mime-types-data (~> 3.2015)
|
93
|
+
mime-types-data (3.2016.0221)
|
94
|
+
mini_portile2 (2.0.0)
|
95
|
+
minitest (5.8.4)
|
96
|
+
mongo (2.2.4)
|
97
|
+
bson (~> 4.0)
|
98
|
+
mongoid (5.1.1)
|
99
|
+
activemodel (~> 4.0)
|
100
|
+
mongo (~> 2.1)
|
101
|
+
origin (~> 2.2)
|
102
|
+
tzinfo (>= 0.3.37)
|
103
|
+
multi_json (1.11.2)
|
104
|
+
nokogiri (1.6.7.2)
|
105
|
+
mini_portile2 (~> 2.0.0.rc2)
|
106
|
+
origin (2.2.0)
|
107
|
+
rack (1.6.4)
|
108
|
+
rack-test (0.6.3)
|
109
|
+
rack (>= 1.0)
|
110
|
+
rails (4.2.6)
|
111
|
+
actionmailer (= 4.2.6)
|
112
|
+
actionpack (= 4.2.6)
|
113
|
+
actionview (= 4.2.6)
|
114
|
+
activejob (= 4.2.6)
|
115
|
+
activemodel (= 4.2.6)
|
116
|
+
activerecord (= 4.2.6)
|
117
|
+
activesupport (= 4.2.6)
|
118
|
+
bundler (>= 1.3.0, < 2.0)
|
119
|
+
railties (= 4.2.6)
|
120
|
+
sprockets-rails
|
121
|
+
rails-deprecated_sanitizer (1.0.3)
|
122
|
+
activesupport (>= 4.2.0.alpha)
|
123
|
+
rails-dom-testing (1.0.7)
|
124
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
125
|
+
nokogiri (~> 1.6.0)
|
126
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
127
|
+
rails-html-sanitizer (1.0.3)
|
128
|
+
loofah (~> 2.0)
|
129
|
+
railties (4.2.6)
|
130
|
+
actionpack (= 4.2.6)
|
131
|
+
activesupport (= 4.2.6)
|
132
|
+
rake (>= 0.8.7)
|
133
|
+
thor (>= 0.18.1, < 2.0)
|
134
|
+
rake (11.1.1)
|
135
|
+
rdoc (4.2.2)
|
136
|
+
json (~> 1.4)
|
137
|
+
sass (3.4.21)
|
138
|
+
sass-rails (5.0.4)
|
139
|
+
railties (>= 4.0.0, < 5.0)
|
140
|
+
sass (~> 3.1)
|
141
|
+
sprockets (>= 2.8, < 4.0)
|
142
|
+
sprockets-rails (>= 2.0, < 4.0)
|
143
|
+
tilt (>= 1.1, < 3)
|
144
|
+
sdoc (0.4.1)
|
145
|
+
json (~> 1.7, >= 1.7.7)
|
146
|
+
rdoc (~> 4.0)
|
147
|
+
spring (1.6.4)
|
148
|
+
sprockets (3.5.2)
|
149
|
+
concurrent-ruby (~> 1.0)
|
150
|
+
rack (> 1, < 3)
|
151
|
+
sprockets-rails (3.0.4)
|
152
|
+
actionpack (>= 4.0)
|
153
|
+
activesupport (>= 4.0)
|
154
|
+
sprockets (>= 3.0.0)
|
155
|
+
thor (0.19.1)
|
156
|
+
thread_safe (0.3.5)
|
157
|
+
tilt (2.0.2)
|
158
|
+
turbolinks (2.5.3)
|
159
|
+
coffee-rails
|
160
|
+
tzinfo (1.2.2)
|
161
|
+
thread_safe (~> 0.1)
|
162
|
+
uglifier (3.0.0)
|
163
|
+
execjs (>= 0.3.0, < 3)
|
164
|
+
web-console (2.3.0)
|
165
|
+
activemodel (>= 4.0)
|
166
|
+
binding_of_caller (>= 0.7.2)
|
167
|
+
railties (>= 4.0)
|
168
|
+
sprockets-rails (>= 2.0, < 4.0)
|
169
|
+
|
170
|
+
PLATFORMS
|
171
|
+
ruby
|
172
|
+
|
173
|
+
DEPENDENCIES
|
174
|
+
byebug
|
175
|
+
coffee-rails (~> 4.1.0)
|
176
|
+
factory_girl_rails
|
177
|
+
groonga-client-rails!
|
178
|
+
jbuilder (~> 2.0)
|
179
|
+
jquery-rails
|
180
|
+
mongoid (~> 5.1.1)
|
181
|
+
rails (= 4.2.6)
|
182
|
+
sass-rails (~> 5.0)
|
183
|
+
sdoc (~> 0.4.0)
|
184
|
+
spring
|
185
|
+
turbolinks
|
186
|
+
uglifier (>= 1.3.0)
|
187
|
+
web-console (~> 2.0)
|
188
|
+
|
189
|
+
BUNDLED WITH
|
190
|
+
1.11.2
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require turbolinks
|
16
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,73 @@
|
|
1
|
+
body {
|
2
|
+
background-color: #fff;
|
3
|
+
color: #333;
|
4
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
5
|
+
font-size: 13px;
|
6
|
+
line-height: 18px;
|
7
|
+
}
|
8
|
+
|
9
|
+
p, ol, ul, td {
|
10
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
11
|
+
font-size: 13px;
|
12
|
+
line-height: 18px;
|
13
|
+
}
|
14
|
+
|
15
|
+
pre {
|
16
|
+
background-color: #eee;
|
17
|
+
padding: 10px;
|
18
|
+
font-size: 11px;
|
19
|
+
}
|
20
|
+
|
21
|
+
a {
|
22
|
+
color: #000;
|
23
|
+
|
24
|
+
&:visited {
|
25
|
+
color: #666;
|
26
|
+
}
|
27
|
+
|
28
|
+
&:hover {
|
29
|
+
color: #fff;
|
30
|
+
background-color: #000;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
div {
|
35
|
+
&.field, &.actions {
|
36
|
+
margin-bottom: 10px;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
#notice {
|
41
|
+
color: green;
|
42
|
+
}
|
43
|
+
|
44
|
+
.field_with_errors {
|
45
|
+
padding: 2px;
|
46
|
+
background-color: red;
|
47
|
+
display: table;
|
48
|
+
}
|
49
|
+
|
50
|
+
#error_explanation {
|
51
|
+
width: 450px;
|
52
|
+
border: 2px solid red;
|
53
|
+
padding: 7px;
|
54
|
+
padding-bottom: 0;
|
55
|
+
margin-bottom: 20px;
|
56
|
+
background-color: #f0f0f0;
|
57
|
+
|
58
|
+
h2 {
|
59
|
+
text-align: left;
|
60
|
+
font-weight: bold;
|
61
|
+
padding: 5px 5px 5px 15px;
|
62
|
+
font-size: 12px;
|
63
|
+
margin: -7px;
|
64
|
+
margin-bottom: 0px;
|
65
|
+
background-color: #c00;
|
66
|
+
color: #fff;
|
67
|
+
}
|
68
|
+
|
69
|
+
ul li {
|
70
|
+
font-size: 12px;
|
71
|
+
list-style: square;
|
72
|
+
}
|
73
|
+
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
class PostsController < ApplicationController
|
2
|
+
before_action :set_post, only: [:show, :edit, :update, :destroy]
|
3
|
+
|
4
|
+
# GET /posts
|
5
|
+
# GET /posts.json
|
6
|
+
def index
|
7
|
+
@posts = Post.all
|
8
|
+
end
|
9
|
+
|
10
|
+
# GET /posts/1
|
11
|
+
# GET /posts/1.json
|
12
|
+
def show
|
13
|
+
end
|
14
|
+
|
15
|
+
# GET /posts/new
|
16
|
+
def new
|
17
|
+
@post = Post.new
|
18
|
+
end
|
19
|
+
|
20
|
+
# GET /posts/1/edit
|
21
|
+
def edit
|
22
|
+
end
|
23
|
+
|
24
|
+
# POST /posts
|
25
|
+
# POST /posts.json
|
26
|
+
def create
|
27
|
+
@post = Post.new(post_params)
|
28
|
+
|
29
|
+
respond_to do |format|
|
30
|
+
if @post.save
|
31
|
+
format.html { redirect_to @post, notice: 'Post was successfully created.' }
|
32
|
+
format.json { render :show, status: :created, location: @post }
|
33
|
+
else
|
34
|
+
format.html { render :new }
|
35
|
+
format.json { render json: @post.errors, status: :unprocessable_entity }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# PATCH/PUT /posts/1
|
41
|
+
# PATCH/PUT /posts/1.json
|
42
|
+
def update
|
43
|
+
respond_to do |format|
|
44
|
+
if @post.update(post_params)
|
45
|
+
format.html { redirect_to @post, notice: 'Post was successfully updated.' }
|
46
|
+
format.json { render :show, status: :ok, location: @post }
|
47
|
+
else
|
48
|
+
format.html { render :edit }
|
49
|
+
format.json { render json: @post.errors, status: :unprocessable_entity }
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# DELETE /posts/1
|
55
|
+
# DELETE /posts/1.json
|
56
|
+
def destroy
|
57
|
+
@post.destroy
|
58
|
+
respond_to do |format|
|
59
|
+
format.html { redirect_to posts_url, notice: 'Post was successfully destroyed.' }
|
60
|
+
format.json { head :no_content }
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
private
|
65
|
+
# Use callbacks to share common setup or constraints between actions.
|
66
|
+
def set_post
|
67
|
+
@post = Post.find(params[:id])
|
68
|
+
end
|
69
|
+
|
70
|
+
# Never trust parameters from the scary internet, only allow the white list through.
|
71
|
+
def post_params
|
72
|
+
params.require(:post).permit(:title, :body)
|
73
|
+
end
|
74
|
+
end
|