groonga-client-rails 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (212) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -0
  3. data/doc/text/news.md +9 -0
  4. data/groonga-client-rails.gemspec +1 -1
  5. data/lib/groonga/client/rails/spec_helper.rb +6 -8
  6. data/lib/groonga/client/rails/test_helper.rb +11 -8
  7. data/lib/groonga/client/rails/test_synchronizer.rb +17 -0
  8. data/lib/groonga/client/rails/version.rb +1 -1
  9. data/lib/groonga/client/searcher/select_request.rb +63 -0
  10. data/lib/groonga/client/searcher.rb +3 -3
  11. data/test/apps/rails4-mongoid/Gemfile +1 -0
  12. data/test/apps/rails4-mongoid/Gemfile.lock +53 -47
  13. data/test/apps/rails4-mongoid/log/test.log +5338 -0
  14. data/test/apps/rails5-activerecord/Gemfile +52 -0
  15. data/test/apps/rails5-activerecord/Gemfile.lock +205 -0
  16. data/test/apps/rails5-activerecord/README.md +24 -0
  17. data/test/apps/rails5-activerecord/Rakefile +6 -0
  18. data/test/apps/rails5-activerecord/app/assets/config/manifest.js +3 -0
  19. data/test/apps/rails5-activerecord/app/assets/javascripts/application.js +16 -0
  20. data/test/apps/rails5-activerecord/app/assets/javascripts/cable.js +13 -0
  21. data/test/apps/rails5-activerecord/app/assets/javascripts/posts.coffee +3 -0
  22. data/test/apps/rails5-activerecord/app/assets/stylesheets/application.css +15 -0
  23. data/test/apps/rails5-activerecord/app/assets/stylesheets/posts.scss +7 -0
  24. data/test/apps/rails5-activerecord/app/assets/stylesheets/scaffolds.scss +89 -0
  25. data/test/apps/rails5-activerecord/app/channels/application_cable/channel.rb +4 -0
  26. data/test/apps/rails5-activerecord/app/channels/application_cable/connection.rb +4 -0
  27. data/test/apps/rails5-activerecord/app/controllers/application_controller.rb +3 -0
  28. data/test/apps/rails5-activerecord/app/controllers/posts_controller.rb +90 -0
  29. data/test/apps/rails5-activerecord/app/helpers/application_helper.rb +2 -0
  30. data/test/apps/rails5-activerecord/app/helpers/posts_helper.rb +2 -0
  31. data/test/apps/rails5-activerecord/app/jobs/application_job.rb +2 -0
  32. data/test/apps/rails5-activerecord/app/mailers/application_mailer.rb +4 -0
  33. data/test/apps/rails5-activerecord/app/models/application_record.rb +3 -0
  34. data/test/apps/rails5-activerecord/app/models/post.rb +7 -0
  35. data/test/apps/rails5-activerecord/app/searchers/application_searcher.rb +2 -0
  36. data/test/apps/rails5-activerecord/app/searchers/posts_searcher.rb +16 -0
  37. data/test/apps/rails5-activerecord/app/views/layouts/application.html.erb +14 -0
  38. data/test/apps/rails5-activerecord/app/views/layouts/mailer.html.erb +13 -0
  39. data/test/apps/rails5-activerecord/app/views/layouts/mailer.text.erb +1 -0
  40. data/test/apps/rails5-activerecord/app/views/posts/_form.html.erb +27 -0
  41. data/test/apps/rails5-activerecord/app/views/posts/_post.json.jbuilder +2 -0
  42. data/test/apps/rails5-activerecord/app/views/posts/edit.html.erb +6 -0
  43. data/test/apps/rails5-activerecord/app/views/posts/index.html.erb +45 -0
  44. data/test/apps/rails5-activerecord/app/views/posts/index.json.jbuilder +1 -0
  45. data/test/apps/rails5-activerecord/app/views/posts/new.html.erb +5 -0
  46. data/test/apps/rails5-activerecord/app/views/posts/show.html.erb +14 -0
  47. data/test/apps/rails5-activerecord/app/views/posts/show.json.jbuilder +1 -0
  48. data/test/apps/rails5-activerecord/bin/bundle +3 -0
  49. data/test/apps/rails5-activerecord/bin/rails +9 -0
  50. data/test/apps/rails5-activerecord/bin/rake +9 -0
  51. data/test/apps/rails5-activerecord/bin/setup +34 -0
  52. data/test/apps/rails5-activerecord/bin/spring +16 -0
  53. data/test/apps/rails5-activerecord/bin/update +29 -0
  54. data/test/apps/rails5-activerecord/config/application.rb +15 -0
  55. data/test/apps/rails5-activerecord/config/boot.rb +3 -0
  56. data/test/apps/rails5-activerecord/config/cable.yml +9 -0
  57. data/test/apps/rails5-activerecord/config/database.yml +25 -0
  58. data/test/apps/rails5-activerecord/config/environment.rb +5 -0
  59. data/test/apps/rails5-activerecord/config/environments/development.rb +54 -0
  60. data/test/apps/rails5-activerecord/config/environments/production.rb +86 -0
  61. data/test/apps/rails5-activerecord/config/environments/test.rb +42 -0
  62. data/test/apps/rails5-activerecord/config/groonga_client.yml +22 -0
  63. data/test/apps/rails5-activerecord/config/initializers/application_controller_renderer.rb +6 -0
  64. data/test/apps/rails5-activerecord/config/initializers/assets.rb +11 -0
  65. data/test/apps/rails5-activerecord/config/initializers/backtrace_silencers.rb +7 -0
  66. data/test/apps/rails5-activerecord/config/initializers/cookies_serializer.rb +5 -0
  67. data/test/apps/rails5-activerecord/config/initializers/filter_parameter_logging.rb +4 -0
  68. data/test/apps/rails5-activerecord/config/initializers/inflections.rb +16 -0
  69. data/test/apps/rails5-activerecord/config/initializers/mime_types.rb +4 -0
  70. data/test/apps/rails5-activerecord/config/initializers/new_framework_defaults.rb +24 -0
  71. data/test/apps/rails5-activerecord/config/initializers/session_store.rb +3 -0
  72. data/test/apps/rails5-activerecord/config/initializers/wrap_parameters.rb +14 -0
  73. data/test/apps/rails5-activerecord/config/locales/en.yml +23 -0
  74. data/test/apps/rails5-activerecord/config/puma.rb +47 -0
  75. data/test/apps/rails5-activerecord/config/routes.rb +4 -0
  76. data/test/apps/rails5-activerecord/config/secrets.yml +22 -0
  77. data/test/apps/rails5-activerecord/config/spring.rb +6 -0
  78. data/test/apps/rails5-activerecord/config.ru +5 -0
  79. data/test/apps/rails5-activerecord/db/development.sqlite3 +0 -0
  80. data/test/apps/rails5-activerecord/db/migrate/20161212004726_create_posts.rb +10 -0
  81. data/test/apps/rails5-activerecord/db/schema.rb +22 -0
  82. data/test/apps/rails5-activerecord/db/seeds.rb +7 -0
  83. data/test/apps/rails5-activerecord/db/test.sqlite3 +0 -0
  84. data/test/apps/rails5-activerecord/log/development.log +808 -0
  85. data/test/apps/rails5-activerecord/log/test.log +1137 -0
  86. data/test/apps/rails5-activerecord/public/404.html +67 -0
  87. data/test/apps/rails5-activerecord/public/422.html +67 -0
  88. data/test/apps/rails5-activerecord/public/500.html +66 -0
  89. data/test/apps/rails5-activerecord/public/apple-touch-icon-precomposed.png +0 -0
  90. data/test/apps/rails5-activerecord/public/apple-touch-icon.png +0 -0
  91. data/test/apps/rails5-activerecord/public/favicon.ico +0 -0
  92. data/test/apps/rails5-activerecord/public/robots.txt +5 -0
  93. data/test/apps/rails5-activerecord/test/controllers/posts_controller_test.rb +50 -0
  94. data/test/apps/rails5-activerecord/test/fixtures/posts.yml +9 -0
  95. data/test/apps/rails5-activerecord/test/models/post_test.rb +7 -0
  96. data/test/apps/rails5-activerecord/test/searchers/posts_searcher_test.rb +120 -0
  97. data/test/apps/rails5-activerecord/test/test_helper.rb +11 -0
  98. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/04/04zh1ytKDagWzWcqUyadXtzzohCn9iVvSVG4KrjpfPU.cache +0 -0
  99. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/0M/0M4bZ4tQh0MQYZMb72U5yr-ELStAsUSb8akkTME9TPM.cache +0 -0
  100. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/0g/0gB1rYz79RuAa43DzVci1GUjc5so0F1dU_LyLSmm3oQ.cache +0 -0
  101. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/1w/1w3lEnPL9oZPD-uk9Y9HOAO5TBywbDUumPsLKAD1trs.cache +1 -0
  102. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/2g/2gve43APDqh4mVsNSvvDZWU7XBUFJ22DjchDFC7BLHE.cache +1 -0
  103. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/3F/3Fsw9a9YyB3-WaDSpA1HTGJrWn_7xMLLpUYcNv4f4zs.cache +1 -0
  104. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/3P/3Px3lDIUtsiFfGy4nQGown3yldwKCp1MNuWbSDX1pvg.cache +0 -0
  105. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/4z/4zN1uyLrntkJkbS2fdatLGK7KyyLUl2uufUks7wTDjQ.cache +1 -0
  106. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/6C/6CiFiBprKrfOQZWs4gi3u2dD5mFuRjvrvkBi6BdwwMo.cache +0 -0
  107. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/6a/6ae9A4LxsOF8WxXqTRrY_OfmiKLzuX-k8CdxcYhyH2w.cache +0 -0
  108. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/6g/6gfb-nNauXmim2itNUscPWKLGmjzBgnE4ee76bNftS4.cache +1 -0
  109. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/6n/6n_6crFw4ICv3THdmoHgXfEXbykmN_3Qh0M3Y7BYoPA.cache +1 -0
  110. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/6r/6rrJLZY0-_gdJxgMUZBZIn-wf8bPVArYjXhIIrt_O5Y.cache +1 -0
  111. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/7-/7-Zu1JSO2hqoAENLcGCtMh1TuhXyUjvzDCR1BAU-whs.cache +1 -0
  112. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/7G/7GXxgDjc3_xi8wt4fJkmv_XE9W19LHgDDmJIOJL8B8E.cache +0 -0
  113. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/7X/7XEN3CPn0h-3vjvFpHuvqByvBbmKNG0WgmdvlCrHmI8.cache +1 -0
  114. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/7l/7lu9duHmsh9ktTH4DbSPnN7p_Xz59VwGcX2J8XDP66Q.cache +1 -0
  115. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/7u/7uFy7yq8C8xezFbAvr8RzLaJRyEY34DlqcIsygk5u48.cache +0 -0
  116. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/8Z/8Zm1d9-lBPsGG_HUw8FP2OCCVucGDVhWAOGaopvOdss.cache +3 -0
  117. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/9p/9pkKAqd_Ia0HpbbUCZtpJ8WiDzr5stcFJsnqsOsJwCc.cache +0 -0
  118. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/9w/9w_czK8Y6L_1dHF-b-aFykWLeiPmTlnI_vTHsNG1Mow.cache +0 -0
  119. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/B9/B9QeeLv4GR9sOdrwyvxa8jIr4MkxjYh4Ow6MOZ8slX8.cache +0 -0
  120. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/BK/BKtHbqHUW-BUh6yXbZoSBLGYZdH4xpyEVJZ85mre3dI.cache +1 -0
  121. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Bn/BnqImgz8w0eyrrFRDbwQXdI6oPEBaakRHuxqdDfCA6g.cache +0 -0
  122. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Bx/BxzoG0KxeNLac4xTNeJv3qfeytbNBw58xj2zD-xdbrE.cache +0 -0
  123. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/DG/DGB9_ZZc6xf8xDs1C8MTwsnZGITqTg5w6Fi8loIoAz0.cache +1 -0
  124. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/DI/DIQbAB3xoMpwIuVisoyQuLOOLReZGqTzMsMSqPTvNlU.cache +1 -0
  125. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/DY/DYQB1uQOZWEQCZyNqRYGbp3TUGnhwGln6l0LJxvfdSM.cache +0 -0
  126. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Dw/DwMpASR_zMhZCB0WD5ibeEaOAEhod-gPDA-cl83A0NQ.cache +1 -0
  127. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Fp/FpDNzaN6X2qtiDvQrm2u2kFkPCkFxqjQWh8FcB2wcow.cache +1 -0
  128. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Fu/FuDP2r9jXh_VnQRBnJO9wYbxDUivFdL1tVpdpp3GUgQ.cache +0 -0
  129. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/G0/G0kukI-r0q0Vbrg6e_jnYJoYcOX8K__h-mwKbCf4twE.cache +2 -0
  130. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/H4/H4qMae4wP-2E0IT3OzIKJm7TAmkfgTg5GG-mDvrpRr8.cache +1 -0
  131. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/H8/H84Co5MLW6jHqkSepLLZXA99CN3Pj4Orn146jUdB-7Q.cache +0 -0
  132. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/HJ/HJmxnxAVu4ESMb2RUFATQhzd8xP7qwk0i7Or2WU6tHY.cache +1 -0
  133. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/I4/I4vFFlIVkL7O3GA9sTW-w6J6yRUCLLl9YNRmfxrqswI.cache +1 -0
  134. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/IM/IMjPkcjxzZVEDA07aU4zncnyk1cKAnqE0QWlQ05eF_I.cache +1 -0
  135. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/IX/IXa4w4VzXhmtd6DpleMPZTaZo-ak-2VW39_rTlS_82A.cache +0 -0
  136. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Mw/MwUXpv2ArJcHhHfRN-i_SHhOyrhE2ED5DP6j2_tHtDM.cache +1 -0
  137. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/N6/N6_UDcd-9vm063oO9Kj2UKERXHyG53mpljIHhMP_sX0.cache +1 -0
  138. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/O_/O_d1EuhZnMhlM56iFmcx1Yr-tKS2-F8XK2Ck4thkxfw.cache +0 -0
  139. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Oa/Oapw1N5wZtnRU54bGH1T0T5WvFHcAO8pp8RiEBPvgio.cache +1 -0
  140. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Oj/OjcwYv10xeNyxU4ma4rSL7scLtN1VSqgQtpmLAkKa1s.cache +0 -0
  141. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Ou/Ouwd1f-B-Ub4MsspZT6taABsir9tZQ3Lgk0Yqv0cxYE.cache +1 -0
  142. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/QT/QTeyXBrKqJWoMRN63_SDKm0DCFLsggXpmWSa1om_1lI.cache +2 -0
  143. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Qf/Qff9sy3RsADWqwgXy563eZw2BMxHil52FiOxDmKQnn4.cache +1 -0
  144. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Qw/QwtseSptjk29vLQAs9XVSY_9GY6mR4wLQ6e3xJZzwuo.cache +1 -0
  145. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Rf/RfAETGxupO0E6Sf50S9Rs_7H_8IFQkZ0V_Ot0qRcMaM.cache +1 -0
  146. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Sh/ShN-ZUpoxLJLJiMV5gFDP00vcSMHw87YzFBlXH4adPA.cache +0 -0
  147. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Si/Sin6bEoASrNa45108CpfgF2jcifz-KpbsvvZJtqVZ68.cache +0 -0
  148. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Ss/SsUxWtOAxDX66Ss49rvswWEE6LOPrbBTnxaY9OJWizk.cache +1 -0
  149. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Uw/Uws4qYyGLobvE_JD4L6dQNcIOOhv4LEZ3D0mK86tZOA.cache +1 -0
  150. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Vt/VtVyxYXmlAEeORF9LOH-DbqhYCV0kSXXBINi9BY3snA.cache +1 -0
  151. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Wm/WmtvDDxglSnhmavMeA7WNn7waN3QbagRHeoZHvZJN84.cache +1 -0
  152. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/X6/X6u2Cul1j8SpBq0WC1S8WhzGiT6f-6L_djUngh_gQfw.cache +0 -0
  153. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/XJ/XJRPx7aZ4ajZ72O37hx53ZFkfXSHpDDpCy78LI0leqM.cache +1 -0
  154. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/XL/XLmhbBwmjyGt7wnSpdFhJl1d66h1gXmGMr2IKRsPlKY.cache +1 -0
  155. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Ya/YayMISAqD-Y3vBFywwKrXbUovGf5o77HUF5s8mnQgO0.cache +0 -0
  156. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Zj/ZjPZKMxS8BzA1QxHFURXSpprFItP8iIYNCg6yfbO69Y.cache +1 -0
  157. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/Zp/Zpsgmz0pdcpEUMODH-KOoEAJu0RLiNBG5_id1Nf4Vro.cache +0 -0
  158. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/_G/_GwD5pS-87WWo17f6dUcFYGFT8h6uDWR6QdHajFQ050.cache +1 -0
  159. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/aa/aaHS7n54GBP_AiELufudftqA7C4tZhFBH9VGYdybJr8.cache +2 -0
  160. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/aq/aqjR2hhB4hrgzOzUkhuiAL1DPqVmVI4OsnJb8KyCpRI.cache +1 -0
  161. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/bS/bS7RTBMfq7yErvNUrJroVgliHjy91XOcgiXzD50OvvQ.cache +0 -0
  162. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/c9/c9YydpmE9rI8VeQ4sVqd5JrA1VSEFGGzpuMBUSrAGac.cache +0 -0
  163. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/de/dep71WPFUs1sHIqTVNqe1rFl1LFWoNyCEoVy0n6nTTg.cache +0 -0
  164. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/eQ/eQxzX_D16-XyOt1WTkYEC0qDvRbjXcCgQgnd9pBrg7o.cache +1 -0
  165. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/fs/fsOGJq1Cf6bkAY-rQw_0-E3_SR3wCq32URYNGrkpra8.cache +1 -0
  166. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/gF/gFlNnL_JJ9wEwdiM694Q0NJO7dBi7x3O2kyUIIZOydY.cache +1 -0
  167. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/gu/guDotVUAVpm_e8AAnaLB25fL5q9nVvbnd5DFP2BxmAQ.cache +0 -0
  168. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/h3/h3iZNjBA2CDMexgKNJ4fSFfDiZ_37c72HncCttwZ4q0.cache +1 -0
  169. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/he/heptoj4xFW23bqbGAnQ2g6MsS3OKgswQZOu4EFQA9CE.cache +1 -0
  170. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/kN/kNQUVmgZpBoZh9oC57J3qRmnvFOb8zfDeJWar6cPJFM.cache +1 -0
  171. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/km/km1UJe7Uvz3cE03ctzec3Mpcow_vgKO36rq50_Szy3o.cache +5 -0
  172. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/kz/kzw210ITXFWNFV8kw5e-_kRlpS48lGotSQWKPlUfMJ4.cache +0 -0
  173. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/ml/mlRB5mvsqzeYz3r37_UHdnW4NOillPXmunrGdwZYTHA.cache +0 -0
  174. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +0 -0
  175. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +0 -0
  176. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/oU/oU63Z9l_0IaXAW3TtHWxMULUMeuVLfhm4JTQmjJZrWU.cache +0 -0
  177. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/p8/p8ScAOn0EywLQE0ZoyA5zwrJlr4BIt67RbiYm8jsJMY.cache +1 -0
  178. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/pH/pHU4zRTrCWZeiDw5r9Sx1F_edVOO_yCGQXumtTI04to.cache +1 -0
  179. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/pI/pImLE-1HdM_Pm_YDztsV-98V1_qngUx98EVI_90rD0I.cache +1 -0
  180. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/pb/pb0V-IHbOTzmTuDDHO7dn8kl3G4RWqXYY1-Gtuklh-M.cache +1 -0
  181. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/q9/q9zC8RrLhOO1dVXJ3fZqc9dSbshhjSpsDQxh5MpbnDA.cache +0 -0
  182. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/qP/qPmv5snMrDw830S6hSICDcnIy7kVEWoFKXhGKT38lG4.cache +0 -0
  183. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/rF/rF2vahiCQKUhJ8McEG0p8B7csWsz-dL13EQ7r2APOxc.cache +1 -0
  184. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/rn/rnjUJtM3qyEybb7S3NaVbV36OvY6ulGzqxgvp6vtkW0.cache +1 -0
  185. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/s8/s85RambnXGg0AXRuWcCg0nv0_yQuuimoB-efYJZXR_g.cache +0 -0
  186. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/sS/sSg6UsW5PPi591GTK35btFew1r3_HpbNHoyZv3vZ_HY.cache +1 -0
  187. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/sW/sWkhnUHFHtFl9YPE6ipfrFL8zC0XPcgjPpwKYIiLGmQ.cache +0 -0
  188. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/s_/s_Kwboiht6NBnTgNZxLOjhdTdW5OETSG1i9v_nYwTbg.cache +0 -0
  189. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/sk/skhQpKGMHfNuU9HmJ5SsawJxYVAfktwxv24N4uNMrfc.cache +0 -0
  190. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/t3/t39F_1zIFMdWiKVUNJyhWOOnP8Lgr6AD5R1HWdVYwbU.cache +0 -0
  191. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/t_/t_jrBzlnaAwG3v7X5kQsHXmVKIL167gvY-CegXdW-38.cache +1 -0
  192. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/wq/wq2DrniT-R28eVCkWJ2LyZjvT8phxRe31mas90YVz2M.cache +0 -0
  193. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/x7/x7PYh8DJvPykcEqpVab2vcY9-GFz-3cqtoMlRAu94Uc.cache +0 -0
  194. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/yO/yO6BxW_KpdFMPjQgywUZXxLvdVM639GnboZKUb3K7kA.cache +1 -0
  195. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/yj/yjqd7Lagqg4Ar_2z5oQo--OO15mhsi97lixJZbk_xrw.cache +0 -0
  196. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/z6/z6juZG91PfdGTEhEife_MlutAwyoheFYa52JtbCUvBM.cache +0 -0
  197. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/zh/zhmfmdnnow0QqwfT_7IXfN-FAU8qAMm03N7XQjFct6E.cache +1 -0
  198. data/test/apps/rails5-activerecord/tmp/cache/assets/sprockets/v3.0/zz/zzyY0k_acKQ2rB0GJcjv6jioH5c2iq-jMM_qIhbfdnI.cache +0 -0
  199. data/test/apps/rails5-activerecord/tmp/pids/server.pid +1 -0
  200. data/test/apps/rails5-activerecord/tmp/restart.txt +0 -0
  201. metadata +381 -21
  202. data/lib/groonga/client/rails/fixture.rb +0 -35
  203. data/lib/groonga/client/rails/groonga_server_runner.rb +0 -164
  204. data/lib/groonga/client/searcher/error.rb +0 -37
  205. data/lib/groonga/client/searcher/raw_request.rb +0 -85
  206. data/lib/groonga/client/searcher/select/request.rb +0 -283
  207. data/lib/groonga/client/searcher/select/result_set.rb +0 -117
  208. data/lib/groonga/client/searcher/select.rb +0 -18
  209. data/test/unit/searcher/select/filter_parameter_test.rb +0 -99
  210. data/test/unit/searcher/select/match_columns_parameter_test.rb +0 -59
  211. data/test/unit/searcher/select/output_columns_parameter_test.rb +0 -68
  212. data/test/unit/searcher/select/sortby_parameter_test.rb +0 -63
@@ -0,0 +1,52 @@
1
+ source 'https://rubygems.org'
2
+
3
+
4
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5
+ gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
6
+ # Use sqlite3 as the database for Active Record
7
+ gem 'sqlite3'
8
+ # Use Puma as the app server
9
+ gem 'puma', '~> 3.0'
10
+ # Use SCSS for stylesheets
11
+ gem 'sass-rails', '~> 5.0'
12
+ # Use Uglifier as compressor for JavaScript assets
13
+ gem 'uglifier', '>= 1.3.0'
14
+ # Use CoffeeScript for .coffee assets and views
15
+ gem 'coffee-rails', '~> 4.2'
16
+ # See https://github.com/rails/execjs#readme for more supported runtimes
17
+ # gem 'therubyracer', platforms: :ruby
18
+
19
+ # Use jquery as the JavaScript library
20
+ gem 'jquery-rails'
21
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
22
+ gem 'turbolinks', '~> 5'
23
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
24
+ gem 'jbuilder', '~> 2.5'
25
+ # Use Redis adapter to run Action Cable in production
26
+ # gem 'redis', '~> 3.0'
27
+ # Use ActiveModel has_secure_password
28
+ # gem 'bcrypt', '~> 3.1.7'
29
+
30
+ # Use Capistrano for deployment
31
+ # gem 'capistrano-rails', group: :development
32
+
33
+ gem 'groonga-client-rails', path: '../../../'
34
+ gem 'groonga-client', path: '../../../../groonga-client'
35
+ gem 'kaminari'
36
+
37
+ group :development, :test do
38
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
39
+ gem 'byebug', platform: :mri
40
+ end
41
+
42
+ group :development do
43
+ # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
44
+ gem 'web-console'
45
+ gem 'listen', '~> 3.0.5'
46
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
47
+ gem 'spring'
48
+ gem 'spring-watcher-listen', '~> 2.0.0'
49
+ end
50
+
51
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
52
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
@@ -0,0 +1,205 @@
1
+ PATH
2
+ remote: ../../../../groonga-client
3
+ specs:
4
+ groonga-client (0.3.9)
5
+ gqtp (>= 1.0.4)
6
+ groonga-command (>= 1.2.8)
7
+ groonga-command-parser (>= 1.0.7)
8
+ hashie
9
+
10
+ PATH
11
+ remote: ../../../
12
+ specs:
13
+ groonga-client-rails (0.9.5)
14
+ groonga-client (>= 0.3.4)
15
+ rails
16
+
17
+ GEM
18
+ remote: https://rubygems.org/
19
+ specs:
20
+ actioncable (5.0.0.1)
21
+ actionpack (= 5.0.0.1)
22
+ nio4r (~> 1.2)
23
+ websocket-driver (~> 0.6.1)
24
+ actionmailer (5.0.0.1)
25
+ actionpack (= 5.0.0.1)
26
+ actionview (= 5.0.0.1)
27
+ activejob (= 5.0.0.1)
28
+ mail (~> 2.5, >= 2.5.4)
29
+ rails-dom-testing (~> 2.0)
30
+ actionpack (5.0.0.1)
31
+ actionview (= 5.0.0.1)
32
+ activesupport (= 5.0.0.1)
33
+ rack (~> 2.0)
34
+ rack-test (~> 0.6.3)
35
+ rails-dom-testing (~> 2.0)
36
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
37
+ actionview (5.0.0.1)
38
+ activesupport (= 5.0.0.1)
39
+ builder (~> 3.1)
40
+ erubis (~> 2.7.0)
41
+ rails-dom-testing (~> 2.0)
42
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
43
+ activejob (5.0.0.1)
44
+ activesupport (= 5.0.0.1)
45
+ globalid (>= 0.3.6)
46
+ activemodel (5.0.0.1)
47
+ activesupport (= 5.0.0.1)
48
+ activerecord (5.0.0.1)
49
+ activemodel (= 5.0.0.1)
50
+ activesupport (= 5.0.0.1)
51
+ arel (~> 7.0)
52
+ activesupport (5.0.0.1)
53
+ concurrent-ruby (~> 1.0, >= 1.0.2)
54
+ i18n (~> 0.7)
55
+ minitest (~> 5.1)
56
+ tzinfo (~> 1.1)
57
+ arel (7.1.4)
58
+ builder (3.2.2)
59
+ byebug (9.0.6)
60
+ coffee-rails (4.2.1)
61
+ coffee-script (>= 2.2.0)
62
+ railties (>= 4.0.0, < 5.2.x)
63
+ coffee-script (2.4.1)
64
+ coffee-script-source
65
+ execjs
66
+ coffee-script-source (1.11.1)
67
+ concurrent-ruby (1.0.2)
68
+ debug_inspector (0.0.2)
69
+ erubis (2.7.0)
70
+ execjs (2.7.0)
71
+ ffi (1.9.14)
72
+ globalid (0.3.7)
73
+ activesupport (>= 4.1.0)
74
+ gqtp (1.0.6)
75
+ groonga-command (1.3.1)
76
+ json
77
+ groonga-command-parser (1.0.7)
78
+ groonga-command (>= 1.0.9)
79
+ json-stream
80
+ hashie (3.4.6)
81
+ i18n (0.7.0)
82
+ jbuilder (2.6.1)
83
+ activesupport (>= 3.0.0, < 5.1)
84
+ multi_json (~> 1.2)
85
+ jquery-rails (4.2.1)
86
+ rails-dom-testing (>= 1, < 3)
87
+ railties (>= 4.2.0)
88
+ thor (>= 0.14, < 2.0)
89
+ json (2.0.2)
90
+ json-stream (0.2.1)
91
+ kaminari (0.17.0)
92
+ actionpack (>= 3.0.0)
93
+ activesupport (>= 3.0.0)
94
+ listen (3.0.8)
95
+ rb-fsevent (~> 0.9, >= 0.9.4)
96
+ rb-inotify (~> 0.9, >= 0.9.7)
97
+ loofah (2.0.3)
98
+ nokogiri (>= 1.5.9)
99
+ mail (2.6.4)
100
+ mime-types (>= 1.16, < 4)
101
+ method_source (0.8.2)
102
+ mime-types (3.1)
103
+ mime-types-data (~> 3.2015)
104
+ mime-types-data (3.2016.0521)
105
+ mini_portile2 (2.1.0)
106
+ minitest (5.10.1)
107
+ multi_json (1.12.1)
108
+ nio4r (1.2.1)
109
+ nokogiri (1.6.8.1)
110
+ mini_portile2 (~> 2.1.0)
111
+ puma (3.6.2)
112
+ rack (2.0.1)
113
+ rack-test (0.6.3)
114
+ rack (>= 1.0)
115
+ rails (5.0.0.1)
116
+ actioncable (= 5.0.0.1)
117
+ actionmailer (= 5.0.0.1)
118
+ actionpack (= 5.0.0.1)
119
+ actionview (= 5.0.0.1)
120
+ activejob (= 5.0.0.1)
121
+ activemodel (= 5.0.0.1)
122
+ activerecord (= 5.0.0.1)
123
+ activesupport (= 5.0.0.1)
124
+ bundler (>= 1.3.0, < 2.0)
125
+ railties (= 5.0.0.1)
126
+ sprockets-rails (>= 2.0.0)
127
+ rails-dom-testing (2.0.1)
128
+ activesupport (>= 4.2.0, < 6.0)
129
+ nokogiri (~> 1.6.0)
130
+ rails-html-sanitizer (1.0.3)
131
+ loofah (~> 2.0)
132
+ railties (5.0.0.1)
133
+ actionpack (= 5.0.0.1)
134
+ activesupport (= 5.0.0.1)
135
+ method_source
136
+ rake (>= 0.8.7)
137
+ thor (>= 0.18.1, < 2.0)
138
+ rake (12.0.0)
139
+ rb-fsevent (0.9.8)
140
+ rb-inotify (0.9.7)
141
+ ffi (>= 0.5.0)
142
+ sass (3.4.22)
143
+ sass-rails (5.0.6)
144
+ railties (>= 4.0.0, < 6)
145
+ sass (~> 3.1)
146
+ sprockets (>= 2.8, < 4.0)
147
+ sprockets-rails (>= 2.0, < 4.0)
148
+ tilt (>= 1.1, < 3)
149
+ spring (2.0.0)
150
+ activesupport (>= 4.2)
151
+ spring-watcher-listen (2.0.1)
152
+ listen (>= 2.7, < 4.0)
153
+ spring (>= 1.2, < 3.0)
154
+ sprockets (3.7.0)
155
+ concurrent-ruby (~> 1.0)
156
+ rack (> 1, < 3)
157
+ sprockets-rails (3.2.0)
158
+ actionpack (>= 4.0)
159
+ activesupport (>= 4.0)
160
+ sprockets (>= 3.0.0)
161
+ sqlite3 (1.3.12)
162
+ thor (0.19.4)
163
+ thread_safe (0.3.5)
164
+ tilt (2.0.5)
165
+ turbolinks (5.0.1)
166
+ turbolinks-source (~> 5)
167
+ turbolinks-source (5.0.0)
168
+ tzinfo (1.2.2)
169
+ thread_safe (~> 0.1)
170
+ uglifier (3.0.4)
171
+ execjs (>= 0.3.0, < 3)
172
+ web-console (3.4.0)
173
+ actionview (>= 5.0)
174
+ activemodel (>= 5.0)
175
+ debug_inspector
176
+ railties (>= 5.0)
177
+ websocket-driver (0.6.4)
178
+ websocket-extensions (>= 0.1.0)
179
+ websocket-extensions (0.1.2)
180
+
181
+ PLATFORMS
182
+ ruby
183
+
184
+ DEPENDENCIES
185
+ byebug
186
+ coffee-rails (~> 4.2)
187
+ groonga-client!
188
+ groonga-client-rails!
189
+ jbuilder (~> 2.5)
190
+ jquery-rails
191
+ kaminari
192
+ listen (~> 3.0.5)
193
+ puma (~> 3.0)
194
+ rails (~> 5.0.0, >= 5.0.0.1)
195
+ sass-rails (~> 5.0)
196
+ spring
197
+ spring-watcher-listen (~> 2.0.0)
198
+ sqlite3
199
+ turbolinks (~> 5)
200
+ tzinfo-data
201
+ uglifier (>= 1.3.0)
202
+ web-console
203
+
204
+ BUNDLED WITH
205
+ 1.13.6
@@ -0,0 +1,24 @@
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
+ * ...
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative 'config/application'
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -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. JavaScript code in this file should be added after the last require_* statement.
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,13 @@
1
+ // Action Cable provides the framework to deal with WebSockets in Rails.
2
+ // You can generate new channels where WebSocket features live using the rails generate channel command.
3
+ //
4
+ //= require action_cable
5
+ //= require_self
6
+ //= require_tree ./channels
7
+
8
+ (function() {
9
+ this.App || (this.App = {});
10
+
11
+ App.cable = ActionCable.createConsumer();
12
+
13
+ }).call(this);
@@ -0,0 +1,3 @@
1
+ # Place all the behaviors and hooks related to the matching controller here.
2
+ # All this logic will automatically be available in application.js.
3
+ # You can use CoffeeScript in this file: http://coffeescript.org/
@@ -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 other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,7 @@
1
+ // Place all the styles related to the posts controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
4
+
5
+ .keyword {
6
+ color: red;
7
+ }
@@ -0,0 +1,89 @@
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
+ margin: 33px;
8
+ }
9
+
10
+ p, ol, ul, td {
11
+ font-family: verdana, arial, helvetica, sans-serif;
12
+ font-size: 13px;
13
+ line-height: 18px;
14
+ margin: 33px;
15
+ }
16
+
17
+ pre {
18
+ background-color: #eee;
19
+ padding: 10px;
20
+ font-size: 11px;
21
+ }
22
+
23
+ a {
24
+ color: #000;
25
+
26
+ &:visited {
27
+ color: #666;
28
+ }
29
+
30
+ &:hover {
31
+ color: #fff;
32
+ background-color: #000;
33
+ }
34
+ }
35
+
36
+ th {
37
+ padding-bottom: 5px;
38
+ }
39
+
40
+ td {
41
+ padding-bottom: 7px;
42
+ padding-left: 5px;
43
+ padding-right: 5px;
44
+ }
45
+
46
+ div {
47
+ &.field, &.actions {
48
+ margin-bottom: 10px;
49
+ }
50
+ }
51
+
52
+ #notice {
53
+ color: green;
54
+ }
55
+
56
+ .field_with_errors {
57
+ padding: 2px;
58
+ background-color: red;
59
+ display: table;
60
+ }
61
+
62
+ #error_explanation {
63
+ width: 450px;
64
+ border: 2px solid red;
65
+ padding: 7px;
66
+ padding-bottom: 0;
67
+ margin-bottom: 20px;
68
+ background-color: #f0f0f0;
69
+
70
+ h2 {
71
+ text-align: left;
72
+ font-weight: bold;
73
+ padding: 5px 5px 5px 15px;
74
+ font-size: 12px;
75
+ margin: -7px;
76
+ margin-bottom: 0;
77
+ background-color: #c00;
78
+ color: #fff;
79
+ }
80
+
81
+ ul li {
82
+ font-size: 12px;
83
+ list-style: square;
84
+ }
85
+ }
86
+
87
+ label {
88
+ display: block;
89
+ }
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Channel < ActionCable::Channel::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
3
+ end
@@ -0,0 +1,90 @@
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
+ search = PostsSearcher.new.search
8
+ query = params[:query]
9
+ if query.blank?
10
+ search = search.sort_keys("-updated_at")
11
+ else
12
+ search = search.
13
+ query(query).
14
+ sort_keys("-_score")
15
+ end
16
+ search = search.
17
+ output_columns([
18
+ "_key",
19
+ "highlight_html(title)",
20
+ "snippet_html(body)",
21
+ ]).
22
+ paginate(params[:page])
23
+ @result_set = search.result_set
24
+ end
25
+
26
+ # GET /posts/1
27
+ # GET /posts/1.json
28
+ def show
29
+ end
30
+
31
+ # GET /posts/new
32
+ def new
33
+ @post = Post.new
34
+ end
35
+
36
+ # GET /posts/1/edit
37
+ def edit
38
+ end
39
+
40
+ # POST /posts
41
+ # POST /posts.json
42
+ def create
43
+ @post = Post.new(post_params)
44
+
45
+ respond_to do |format|
46
+ if @post.save
47
+ format.html { redirect_to @post, notice: 'Post was successfully created.' }
48
+ format.json { render :show, status: :created, location: @post }
49
+ else
50
+ format.html { render :new }
51
+ format.json { render json: @post.errors, status: :unprocessable_entity }
52
+ end
53
+ end
54
+ end
55
+
56
+ # PATCH/PUT /posts/1
57
+ # PATCH/PUT /posts/1.json
58
+ def update
59
+ respond_to do |format|
60
+ if @post.update(post_params)
61
+ format.html { redirect_to @post, notice: 'Post was successfully updated.' }
62
+ format.json { render :show, status: :ok, location: @post }
63
+ else
64
+ format.html { render :edit }
65
+ format.json { render json: @post.errors, status: :unprocessable_entity }
66
+ end
67
+ end
68
+ end
69
+
70
+ # DELETE /posts/1
71
+ # DELETE /posts/1.json
72
+ def destroy
73
+ @post.destroy
74
+ respond_to do |format|
75
+ format.html { redirect_to posts_url, notice: 'Post was successfully destroyed.' }
76
+ format.json { head :no_content }
77
+ end
78
+ end
79
+
80
+ private
81
+ # Use callbacks to share common setup or constraints between actions.
82
+ def set_post
83
+ @post = Post.find(params[:id])
84
+ end
85
+
86
+ # Never trust parameters from the scary internet, only allow the white list through.
87
+ def post_params
88
+ params.require(:post).permit(:title, :body)
89
+ end
90
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module PostsHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -0,0 +1,7 @@
1
+ class Post < ApplicationRecord
2
+ PostsSearcher.source(self).title = :title
3
+ PostsSearcher.source(self).body = lambda do |model|
4
+ model.body.gsub(/<.*?>/, "")
5
+ end
6
+ PostsSearcher.source(self).updated_at = true
7
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationSearcher < Groonga::Client::Searcher
2
+ end
@@ -0,0 +1,16 @@
1
+ class PostsSearcher < ApplicationSearcher
2
+ schema.column :title, {
3
+ type: "ShortText",
4
+ index: true,
5
+ index_type: :full_text_search,
6
+ }
7
+ schema.column :body, {
8
+ type: "Text",
9
+ index: true,
10
+ index_type: :full_text_search,
11
+ }
12
+ schema.column :updated_at, {
13
+ type: "Time",
14
+ index: true,
15
+ }
16
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Blog</title>
5
+ <%= csrf_meta_tags %>
6
+
7
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
8
+ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9
+ </head>
10
+
11
+ <body>
12
+ <%= yield %>
13
+ </body>
14
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1,27 @@
1
+ <%= form_for(post) do |f| %>
2
+ <% if post.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(post.errors.count, "error") %> prohibited this post from being saved:</h2>
5
+
6
+ <ul>
7
+ <% post.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :title %>
16
+ <%= f.text_field :title %>
17
+ </div>
18
+
19
+ <div class="field">
20
+ <%= f.label :body %>
21
+ <%= f.text_area :body %>
22
+ </div>
23
+
24
+ <div class="actions">
25
+ <%= f.submit %>
26
+ </div>
27
+ <% end %>
@@ -0,0 +1,2 @@
1
+ json.extract! post, :id, :title, :body, :created_at, :updated_at
2
+ json.url post_url(post, format: :json)
@@ -0,0 +1,6 @@
1
+ <h1>Editing Post</h1>
2
+
3
+ <%= render 'form', post: @post %>
4
+
5
+ <%= link_to 'Show', @post %> |
6
+ <%= link_to 'Back', posts_path %>