groonga-client-model 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 (218) hide show
  1. checksums.yaml +4 -4
  2. data/doc/text/news.md +13 -0
  3. data/lib/groonga-client-model.rb +1 -0
  4. data/lib/groonga_client_model/attribute_assignment.rb +34 -0
  5. data/lib/groonga_client_model/client.rb +1 -1
  6. data/lib/groonga_client_model/record.rb +37 -16
  7. data/lib/groonga_client_model/version.rb +1 -1
  8. data/test/apps/rails4/Gemfile +55 -0
  9. data/test/apps/rails4/Gemfile.lock +206 -0
  10. data/test/apps/rails4/README.md +24 -0
  11. data/test/apps/rails4/Rakefile +6 -0
  12. data/test/apps/rails4/app/assets/config/manifest.js +3 -0
  13. data/test/apps/rails4/app/assets/javascripts/application.js +16 -0
  14. data/test/apps/rails4/app/assets/javascripts/cable.js +13 -0
  15. data/test/apps/rails4/app/assets/javascripts/posts.coffee +3 -0
  16. data/test/apps/rails4/app/assets/stylesheets/application.css +15 -0
  17. data/test/apps/rails4/app/assets/stylesheets/posts.scss +3 -0
  18. data/test/apps/rails4/app/assets/stylesheets/scaffolds.scss +89 -0
  19. data/test/apps/rails4/app/channels/application_cable/channel.rb +4 -0
  20. data/test/apps/rails4/app/channels/application_cable/connection.rb +4 -0
  21. data/test/apps/rails4/app/controllers/application_controller.rb +3 -0
  22. data/test/apps/rails4/app/controllers/posts_controller.rb +74 -0
  23. data/test/apps/rails4/app/helpers/application_helper.rb +2 -0
  24. data/test/apps/rails4/app/helpers/posts_helper.rb +2 -0
  25. data/test/apps/rails4/app/jobs/application_job.rb +2 -0
  26. data/test/apps/rails4/app/mailers/application_mailer.rb +4 -0
  27. data/test/apps/rails4/app/models/post.rb +2 -0
  28. data/test/apps/rails4/app/views/layouts/application.html.erb +14 -0
  29. data/test/apps/rails4/app/views/layouts/mailer.html.erb +13 -0
  30. data/test/apps/rails4/app/views/layouts/mailer.text.erb +1 -0
  31. data/test/apps/rails4/app/views/posts/_form.html.erb +27 -0
  32. data/test/apps/rails4/app/views/posts/_post.json.jbuilder +2 -0
  33. data/test/apps/rails4/app/views/posts/edit.html.erb +6 -0
  34. data/test/apps/rails4/app/views/posts/index.html.erb +29 -0
  35. data/test/apps/rails4/app/views/posts/index.json.jbuilder +1 -0
  36. data/test/apps/rails4/app/views/posts/new.html.erb +5 -0
  37. data/test/apps/rails4/app/views/posts/show.html.erb +14 -0
  38. data/test/apps/rails4/app/views/posts/show.json.jbuilder +1 -0
  39. data/test/apps/rails4/bin/bundle +3 -0
  40. data/test/apps/rails4/bin/rails +9 -0
  41. data/test/apps/rails4/bin/rake +9 -0
  42. data/test/apps/rails4/bin/setup +34 -0
  43. data/test/apps/rails4/bin/spring +16 -0
  44. data/test/apps/rails4/bin/update +29 -0
  45. data/test/apps/rails4/config/application.rb +25 -0
  46. data/test/apps/rails4/config/boot.rb +3 -0
  47. data/test/apps/rails4/config/cable.yml +9 -0
  48. data/test/apps/rails4/config/environment.rb +5 -0
  49. data/test/apps/rails4/config/environments/development.rb +51 -0
  50. data/test/apps/rails4/config/environments/production.rb +83 -0
  51. data/test/apps/rails4/config/environments/test.rb +42 -0
  52. data/test/apps/rails4/config/groonga.yml +8 -0
  53. data/test/apps/rails4/config/initializers/application_controller_renderer.rb +6 -0
  54. data/test/apps/rails4/config/initializers/assets.rb +11 -0
  55. data/test/apps/rails4/config/initializers/backtrace_silencers.rb +7 -0
  56. data/test/apps/rails4/config/initializers/cookies_serializer.rb +5 -0
  57. data/test/apps/rails4/config/initializers/filter_parameter_logging.rb +4 -0
  58. data/test/apps/rails4/config/initializers/inflections.rb +16 -0
  59. data/test/apps/rails4/config/initializers/mime_types.rb +4 -0
  60. data/test/apps/rails4/config/initializers/new_framework_defaults.rb +21 -0
  61. data/test/apps/rails4/config/initializers/session_store.rb +3 -0
  62. data/test/apps/rails4/config/initializers/wrap_parameters.rb +9 -0
  63. data/test/apps/rails4/config/locales/en.yml +23 -0
  64. data/test/apps/rails4/config/puma.rb +47 -0
  65. data/test/apps/rails4/config/routes.rb +4 -0
  66. data/test/apps/rails4/config/secrets.yml +22 -0
  67. data/test/apps/rails4/config/spring.rb +6 -0
  68. data/test/apps/rails4/config.ru +5 -0
  69. data/test/apps/rails4/db/schema.grn +9 -0
  70. data/test/apps/rails4/db/seeds.rb +7 -0
  71. data/test/apps/rails4/log/development.log +0 -0
  72. data/test/apps/rails4/log/test.log +207 -0
  73. data/test/apps/rails4/public/404.html +67 -0
  74. data/test/apps/rails4/public/422.html +67 -0
  75. data/test/apps/rails4/public/500.html +66 -0
  76. data/test/apps/rails4/public/apple-touch-icon-precomposed.png +0 -0
  77. data/test/apps/rails4/public/apple-touch-icon.png +0 -0
  78. data/test/apps/rails4/public/favicon.ico +0 -0
  79. data/test/apps/rails4/public/robots.txt +5 -0
  80. data/test/apps/rails4/test/controllers/posts_controller_test.rb +50 -0
  81. data/test/apps/rails4/test/factories/posts.rb +6 -0
  82. data/test/apps/rails4/test/test_helper.rb +9 -0
  83. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/0I/0Ihy3SE8nTe---ZtfB9WjKd6UOgmtLFlyhbw1R2BDFs.cache +1 -0
  84. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/0M/0M4bZ4tQh0MQYZMb72U5yr-ELStAsUSb8akkTME9TPM.cache +3 -0
  85. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/0g/0gB1rYz79RuAa43DzVci1GUjc5so0F1dU_LyLSmm3oQ.cache +3 -0
  86. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/17/17ACx-zXgzaAZBriGH5oeRJJ9hMIlwP9bWBPlEMoY-0.cache +1 -0
  87. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/6a/6ae9A4LxsOF8WxXqTRrY_OfmiKLzuX-k8CdxcYhyH2w.cache +3 -0
  88. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/6r/6rrJLZY0-_gdJxgMUZBZIn-wf8bPVArYjXhIIrt_O5Y.cache +1 -0
  89. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/8Z/8Zm1d9-lBPsGG_HUw8FP2OCCVucGDVhWAOGaopvOdss.cache +3 -0
  90. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/8d/8dPRKWI4by88Sxw2Ybxs2Y3jz-1b6FQAc1e3i1ve5go.cache +0 -0
  91. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/8i/8iQwPHnNGnDGUJBtgrVMB7FceEuaXnCBF1671S9jJgo.cache +1 -0
  92. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/B6/B6nLb8yGukrJQUpa3aPtLwrmBPnh2_8ZFkSTc5T8c0k.cache +1 -0
  93. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Bh/BhBHwSo9EwfIYTDkA21FIndZkPsZ28CYARi4iBDw608.cache +1 -0
  94. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Bj/BjttQ669rtLFSU4Oq7YxTtumvpgsHKREjOND3HIVJx8.cache +0 -0
  95. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Bx/BxzoG0KxeNLac4xTNeJv3qfeytbNBw58xj2zD-xdbrE.cache +2 -0
  96. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/C3/C3hMQl1ywl9gQ3OFdiiVc8l1y2gP7GWN37t9DDEaoy4.cache +1 -0
  97. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/FT/FTiuNlnEJN59jNEEgEfQazsLhj_YTdIQnCuFC2EM7qw.cache +1 -0
  98. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/JX/JXqwLmb9hlO9nmp2kJYEcKaKy9RMO-HxwnptsiVAADc.cache +1 -0
  99. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/K9/K9G8c-hzp4a8xRtPMnSQf6bsziHMznJz-OvHDz7w3rE.cache +0 -0
  100. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Kq/KqsxRPBMXWQubUa9Ab4tmgT4j4DM5-A89_rh15MNlmI.cache +0 -0
  101. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Kz/KznX4kBl2yjCE-XZL5bNAJ0xXrLVL6nJEJWMYLY3X7I.cache +1 -0
  102. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/N1/N1cFx1cQirDbaPCgGKbLjIcxsOM8ODiP98PZWSHDzyE.cache +0 -0
  103. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/QH/QHW6bVAXmJeybTQiApxxYej1wQkNigo-KRbnXDwd1Mk.cache +1 -0
  104. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/R7/R7bSW7yrMkNVznGUpcDS6MXM3ZziGA7RrQGogNiuVTA.cache +1 -0
  105. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/RH/RHIJ8umE9bWwt5xXi8SJ4RYpZqFvt88JBVNo4lTPg0U.cache +1 -0
  106. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Rt/Rtg9DogJyyU6DIW9gV2GCVTWMF0GYLevAVNvv3bEDeI.cache +1 -0
  107. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Ru/Ru1MOhJ8ZzL7pBzPr_QeTTd0LnfWx4DcM0iVcL4cTzo.cache +2 -0
  108. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/S3/S3OZbpxIypECjqQj77Gb9Oc6A-q0U1fKpzMbPVMoubk.cache +1 -0
  109. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Si/Sin6bEoASrNa45108CpfgF2jcifz-KpbsvvZJtqVZ68.cache +3 -0
  110. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/VQ/VQNk5aqOyF22mFE5NhdDjfBZeFpSfgaaZdyngvHYi48.cache +1 -0
  111. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Vw/Vwgy4zAZLGHF9RslYQ40wbF7NYW47NDE0wcA7T3HwxI.cache +1 -0
  112. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/W9/W9OEjda3McVaqzRMNGzY4zMzGFKwy-JYer2dt7dxRjQ.cache +1 -0
  113. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/XJ/XJRPx7aZ4ajZ72O37hx53ZFkfXSHpDDpCy78LI0leqM.cache +1 -0
  114. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Ya/YayMISAqD-Y3vBFywwKrXbUovGf5o77HUF5s8mnQgO0.cache +2 -0
  115. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Zs/Zs96XWLbB-Sp-R9P31ArcdU7j6VL_RBI-SwpwTE_TZA.cache +0 -0
  116. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Zv/ZvCEW2ZyS-k4cHH7Gd8P2nKFE9Uh1VOrfR-1PYY2yz8.cache +5 -0
  117. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/a5/a5Ai9QXaiRRSN7BXZZ3eZSL8mbwrdOKNM9Hco1Bp498.cache +1 -0
  118. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/aa/aaHS7n54GBP_AiELufudftqA7C4tZhFBH9VGYdybJr8.cache +2 -0
  119. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/bM/bMMUbhA2nFZ9dHAnzKZsPzKVcv-UlAWaVq92COmAHwI.cache +0 -0
  120. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/cc/ccFbs28DWObwrW_wnGA4cU9RmsKrBzb5xDaMu1-5QOo.cache +1 -0
  121. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/d8/d80_M7rvPV-A1sCjIEhieR5jS353S0hCykiWL6Qoy7Q.cache +3 -0
  122. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/do/doMYM14rQvSD5lPwCGe0ULzbXBwyBM-f1jOE0MzmEs4.cache +1 -0
  123. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/eA/eA_fQgrHsn-vD9XeNQyC8335oMP8k0cnmerzHzjEwLQ.cache +0 -0
  124. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/eQ/eQxzX_D16-XyOt1WTkYEC0qDvRbjXcCgQgnd9pBrg7o.cache +1 -0
  125. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/gl/glrAgaE6JUHFNGuQsy5qakLJ2Sjmq-O09QX7cJklxP4.cache +0 -0
  126. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/jt/jtP0R1pGResPYdA6O4Ph5x0W0T1If9yb0sRFijAemLY.cache +0 -0
  127. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/kz/kzw210ITXFWNFV8kw5e-_kRlpS48lGotSQWKPlUfMJ4.cache +3 -0
  128. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/mA/mAWsnX7Peh_B8DPSBTB4f9Yr4LFtZwOf5prl05GZY3g.cache +0 -0
  129. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/mX/mXbxFiGMdcA3j1srHRMPEBxhXw8udKgsNtXk6_Zl5ts.cache +1 -0
  130. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +2 -0
  131. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/nf/nfIObnkUaxVC6zkWxRI2Mzau2JKMWf2ii3dr0Q0IvNk.cache +1 -0
  132. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +2 -0
  133. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/rF/rF2vahiCQKUhJ8McEG0p8B7csWsz-dL13EQ7r2APOxc.cache +1 -0
  134. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/tH/tHi6ifML6NOeHhumbOb5hc1QFREX-LhACtiUhS54YPQ.cache +1 -0
  135. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/u3/u3DEuOZf5FZ_vumprxhkeIsi2jzeDJRxtjYbqNJ13wQ.cache +0 -0
  136. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/u_/u_yfB9bAyTK1suTw3FxVxx4Lv0U31dIL1G0uX9R9byU.cache +0 -0
  137. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/vH/vHuuPjMkmfpQ2eqHofMJprX6McDX-BRf-OZLe-Zy0uM.cache +0 -0
  138. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/wq/wqEwEzqpIhD5Ie3bMy9VSp3TZI4lqTUROqfAYdpO83g.cache +1 -0
  139. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/x7/x7PYh8DJvPykcEqpVab2vcY9-GFz-3cqtoMlRAu94Uc.cache +2 -0
  140. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/yO/yO6BxW_KpdFMPjQgywUZXxLvdVM639GnboZKUb3K7kA.cache +1 -0
  141. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/yZ/yZz4rIdiAxAUWJ7Io7t9ZdVN8fjEjgzn8MfNKrBdIR0.cache +1 -0
  142. data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/zQ/zQ9ej9LKS_XIns0yfDEKXZaCGO7n1sA2dRjIsPO9Krg.cache +1 -0
  143. data/test/apps/rails5/Gemfile.lock +37 -37
  144. data/test/apps/rails5/config/groonga.yml +1 -1
  145. data/test/apps/rails5/log/test.log +304 -0
  146. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/0s/0s0CsN3A9OzlsSdxdmQ8dowd6eB6pf89sskfcRwvj5U.cache +1 -0
  147. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/30/30KT5QAalVCZ4YvGLiiqiwP8Nqarv9udTdHtvrO1tyY.cache +1 -0
  148. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/3V/3VDW3Icf6dS8Wm81X2o6wpM2X_XBbxJ1GXVAmLMPkmQ.cache +1 -0
  149. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/4N/4NSeDEGAGtTIlzShWYtQoKzyH2QCRAO29qbgVDm9EHc.cache +0 -0
  150. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/7P/7PLLteF-xRpzxWZ5mfsgpvDtMftNnVQTuilTHNhuDNw.cache +1 -0
  151. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/8Z/8Zm1d9-lBPsGG_HUw8FP2OCCVucGDVhWAOGaopvOdss.cache +0 -0
  152. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/9i/9itFsz5eUi8gqKJUF2kc_ZCs0yTbyTRsy6vKnuT4abo.cache +1 -0
  153. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/9y/9yohFvm-NgNxUQFrNQBmjkAxlx8hn7PQL1ouGd4yuf0.cache +0 -0
  154. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/AD/ADg2PwebqPG6ZRaIo793X-ZEq_cUTncVCjXDyA2izhM.cache +0 -0
  155. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Bg/Bgg_bbbuLxSs2CjZirqEYC2JoUYuJfAoozk2TvlgNI8.cache +1 -0
  156. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Bx/BxzoG0KxeNLac4xTNeJv3qfeytbNBw58xj2zD-xdbrE.cache +0 -0
  157. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Ea/EaVyDKPRPVHf6wyOvkuC5lEVTUz2zUxP1e-OZPomAco.cache +1 -0
  158. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Gn/Gn4-OV-Ub-1WU1rfSESegkd5Mms4fD9YNzpLf0-_yIc.cache +1 -0
  159. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/HC/HCkUr7-RfXS_VnsyAI9lZXpDZQUtsb2Kzqw--oBwgDU.cache +1 -0
  160. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Hv/HvIE7Q-Grd2gs_C3I_njPrdpyA1ioXimnKlJ4o1F3kE.cache +1 -0
  161. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Jj/JjD2HFU-vCk0D_SH68tmIVObhruQFXaE9Kk0IERK3V4.cache +0 -0
  162. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Jv/JvtMzKIbNrhefiinEmmIElZwtpRqTONm4tpiKnqPTcs.cache +0 -0
  163. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Kj/KjRyQjQD7AxkE5EaRozI7wI97Iof2F3CwmUMPLpECNE.cache +0 -0
  164. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Lc/LcPT1gtyFWe7MSPy-gJCDXZAwWStOk9GxGM77JARVzc.cache +0 -0
  165. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Lh/LhyvxY5uggGRDtBr5Oh5yXF5Hqhw1P-jwI3t-WALBtA.cache +0 -0
  166. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/MO/MO4HmeMSIc2bqrVptzZUc-NLW1zuvOH8d3qWtEpD_yQ.cache +0 -0
  167. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Om/OmZUvZCK4Ba1-rUY9PMDdsUQeaK5uKRm4rHVxfET6uQ.cache +1 -0
  168. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/PG/PG8sM7Hi4hVGDvUPiuaRngLWMiZdxIgb0YXjj4iH-5A.cache +1 -0
  169. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Pv/Pvz39euzn5iyXOTnsoC4L2Uuym-HYB0wfHCS14blC1k.cache +0 -0
  170. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Q9/Q9duhZbKClj2yMCDfcfVardDtcN8L_O_0vWOSghO-Wc.cache +0 -0
  171. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/QT/QTy35aJ8utBQ7tWPGP-wkH1gQFDw9PfDR6IL-ioARdI.cache +1 -0
  172. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Rr/Rraj9_-3Y0hyX_ydNEYeZZjgRnpcTsaN2g8sBdAr0U4.cache +1 -0
  173. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/SN/SNLpl8dBME7slRhucvmV_kjMQImk-VGiILaga5lEcBM.cache +0 -0
  174. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/UA/UA-vI1pm6jjLk0HMTm32_Q8qSf6kl82Zqp4qHppaHTs.cache +0 -0
  175. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Un/UnQckkSJxEgp7_0qcxAV0fVb-a1mMjjYgRZnYSqJVL4.cache +0 -0
  176. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/VG/VGXrEvduCU_m46nDkclIvkz88q3U5XCR90Obpr4fAmI.cache +1 -0
  177. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Vq/VqGlg41jzPe2xOKQT51XO0neCFahsFpYti3npqW_h5k.cache +3 -0
  178. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/X-/X-qNf54ppJDRBAw7DAsCGjKRMxYoNSukheQbSa8bH3I.cache +1 -0
  179. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Xa/XarP8tNYI88ANDMIKJowbKzLrr5F-ySuKjVJxxYfFQY.cache +1 -0
  180. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Xx/XxNbAR75-XymAhH_LmVcuEz6fWG8y1c8mCBDuE_Lw1A.cache +0 -0
  181. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Y4/Y46f-2WDyv-1cajT0yd_TLvjuKSTna_LEIBFXu2HEH0.cache +0 -0
  182. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Ya/YayMISAqD-Y3vBFywwKrXbUovGf5o77HUF5s8mnQgO0.cache +0 -0
  183. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Yi/Yi0o2OVzxzXYcS4Ub-BSXroo-1Hz963XYivzOqycA2k.cache +1 -0
  184. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/a1/a1JkQNR-jIzpBc0YgSxNy1z6TmEk-18wELusp6uwMnY.cache +0 -0
  185. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/aM/aMGeDsD2r6O1qpZOxjRFsihutyeMTwq_QqjOursdoi8.cache +0 -0
  186. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/bL/bL5Zo79Q4uDkuHnSm2KXLE-T4Gq9pHXlqKUJ-JX7cmo.cache +0 -0
  187. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/cC/cCKlO1m4XweKwETyD8B1rt2TjgJ7113m1qZPPp_HxoM.cache +1 -0
  188. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/dE/dEXfv0V0k-NpSIhAUCYAWfi4BlVLZ4jH9E86cfulZWw.cache +1 -0
  189. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/ez/eznA6dAb37VMBY614_p4GZE5YDkrwo3vb_QErDJ_LRk.cache +0 -0
  190. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/f2/f2mtjZUY1ekuJsLvcJMC12c-4hV61BEh0XLA61fCswM.cache +1 -0
  191. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/f8/f84jEUeiI_nJG_gDCh_hn-7aTSp48c_2IhLt_9WMdFI.cache +2 -0
  192. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/gS/gSZA8EU-m-fEUCSprxEMM-Bhri0ZwAssFKIelou0AEo.cache +0 -0
  193. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/gT/gTan-pp1QHaUce9f0ZkC1enUYJDAlPfuija3jRTFC3o.cache +0 -0
  194. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/gm/gmeq3PfpFbfe2L0ijWzw1Dzny6T-kD3zREQjh6XGs-o.cache +0 -0
  195. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/i5/i5my_eWq7Zxc_Z_g1vQvOiA0IDmHuZFZBTWT3QCQfg8.cache +0 -0
  196. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/i8/i8vRVFNFxJovAswEUH2cn2cgoNCHw64tAX1qrCHZ10Y.cache +0 -0
  197. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/iY/iYOJpcZoyFigS_1MWM1kis69W76vWExf8Y0kyxjtOx8.cache +1 -0
  198. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/jH/jHgUm9vqtCJw2D5t6vif1pgjzQJvHJVfPRAx7OAv73A.cache +0 -0
  199. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/jc/jcmeyhSsE7F1ULqySegf56khUqvo4XkYET6Szgm3Bvk.cache +1 -0
  200. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/k3/k3hQdQKe9nbevuKy3ORynP3MJAGvGh4UjtUBjBZlreU.cache +1 -0
  201. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/kN/kN7p5Yd60hzqNW9AI3Cs01-31udA8OfmlMbCDCTALWs.cache +1 -0
  202. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/kz/kzw210ITXFWNFV8kw5e-_kRlpS48lGotSQWKPlUfMJ4.cache +0 -0
  203. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/lU/lUMILltXZTewdRkBDoaTN8YqP2HTEgG8pRHm-uwXGq8.cache +1 -0
  204. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/l_/l_QAY97rLv-9sDaYoANaYoZ4ArK85m2kR4mGtFGUDbk.cache +1 -0
  205. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +0 -0
  206. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/op/opvu3owuWCWLT2O2_NoG3_DQxo7jyuBfc1hgX6TxTIk.cache +1 -0
  207. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/qa/qaiQhgwOdNAN8CFIUKYPG2wuHgams4R7ps30keggv0k.cache +0 -0
  208. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/qv/qvz_zCaGhbxQok2cVfGrxJ2ZBHU7Z-tlQTyBlDONreM.cache +0 -0
  209. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/r6/r6fqdvX67B754iGVsiI7VU4QYonMVkvxOsMGEt01HOE.cache +1 -0
  210. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/rQ/rQuxS1p9usX_LSXmj2xZTRKTl7gbNHMIjItSLhBiYFo.cache +1 -0
  211. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/s0/s04L41mt9STCFF5OjeU0iwkQDaKri9_wk09iD_tu8fE.cache +0 -0
  212. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/tU/tUS580Jgk3Hpsg7T-1ZSyBoU0UlbXMyQFcXZpm_55-M.cache +1 -0
  213. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/ww/ww8c31pBJogAMzLW_GZoB1mbaqeYq2fxbqW562M8u8E.cache +1 -0
  214. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/x7/x7PYh8DJvPykcEqpVab2vcY9-GFz-3cqtoMlRAu94Uc.cache +0 -0
  215. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/xz/xz1wFbuw3Hm5tdgXrfvHPyJi5K-UxslzlGC8_-G68rc.cache +1 -0
  216. data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/zF/zFTGe9WA9MEh0BiglNQK18x4EAmZtMZ5blWdfcyb_CY.cache +3 -0
  217. data/test/unit/test_record.rb +41 -0
  218. metadata +399 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6824d1482f9c9b4b419159a32fe8b1d8039291ca
4
- data.tar.gz: d71d506459e9dc29b16475e1746e8d08a578f23f
3
+ metadata.gz: 280065806b16cf11124e4ce8a5d8550c6a427f4c
4
+ data.tar.gz: ea03fc0c321b8aea0df6951c94b15b5879852371
5
5
  SHA512:
6
- metadata.gz: 519907f3b5b2c4566ffb381400effbb8659fdd85b614a2683753ae7e6116cdd418627635e56ea9e5aa9d8e75c2c942cc819b336d156cdb1f400ea31f46810a53
7
- data.tar.gz: 787015c1026f79ad217dd2b977f1a04a5294f49ecebd3164e7cc23827b97b49b532f0251aa92e4da97860cef485c6a3ad3d03c5fd31937cf3d1f209b1b0db0c1
6
+ metadata.gz: fc49cbe218f850a775997ae6cd937799249720e9a70ed582d10009dffa8cac3a51695e69eb10a9958d8421faa4774eb989c3ecf19071613d3490745191dbe1a8
7
+ data.tar.gz: d8edfa839c110f51e7ec55978964e0de3bee6c79ffcbae99fbe5e4ed8a9facae653a895a7a1946f7103de7e66906953fbc3d2573a74c6875cdfb4e890a6a943f
data/doc/text/news.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # NEWS
2
2
 
3
+ ## 0.9.5 - 2016-12-27
4
+
5
+ ### Improvements
6
+
7
+ * Added the default presence validation for `_key`.
8
+
9
+ * Supported validation on save by default.
10
+
11
+ * Supported Rails 4.
12
+
13
+ * Supported sub record class under the record class instead of
14
+ top-level.
15
+
3
16
  ## 0.9.4 - 2016-12-21
4
17
 
5
18
  ### Improvements
@@ -20,6 +20,7 @@ require "groonga/client"
20
20
 
21
21
  require "groonga_client_model/version"
22
22
 
23
+ require "groonga_client_model/attribute_assignment"
23
24
  require "groonga_client_model/client"
24
25
  require "groonga_client_model/client_opener"
25
26
  require "groonga_client_model/error"
@@ -0,0 +1,34 @@
1
+ # Copyright (C) 2016 Kouhei Sutou <kou@clear-code.com>
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ module GroongaClientModel
18
+ module AttributeAssignment
19
+ if ActiveModel.const_defined?(:AttributeAssignment)
20
+ include ActiveModel::AttributeAssignment
21
+ else
22
+ def assign_attributes(attributes)
23
+ attributes.each do |name, value|
24
+ setter = "#{name}="
25
+ if respond_to?(setter)
26
+ public_send(setter, value)
27
+ else
28
+ raise NoMethodError, "unknown attribute: #{name}: #{self.class}"
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -16,7 +16,7 @@
16
16
 
17
17
  module GroongaClientModel
18
18
  class Client
19
- class_attribute :url
19
+ class_attribute :url, instance_accessor: false
20
20
 
21
21
  class << self
22
22
  def open(&block)
@@ -16,7 +16,7 @@
16
16
 
17
17
  module GroongaClientModel
18
18
  class Record
19
- include ActiveModel::AttributeAssignment
19
+ include AttributeAssignment
20
20
  include ActiveModel::AttributeMethods
21
21
  include ActiveModel::Callbacks
22
22
  include ActiveModel::Conversion
@@ -41,6 +41,10 @@ module GroongaClientModel
41
41
  schema.tables[table_name].columns
42
42
  end
43
43
 
44
+ def have_key?
45
+ columns.exist?("_key")
46
+ end
47
+
44
48
  def define_attributes
45
49
  return if defined?(@defined)
46
50
  @defined = true
@@ -118,6 +122,8 @@ module GroongaClientModel
118
122
 
119
123
  attr_reader :attributes
120
124
 
125
+ validates :_key, presence: true, if: ->(record) {record.class.have_key?}
126
+
121
127
  def initialize(attributes=nil)
122
128
  @attributes = {}
123
129
  self.class.define_attributes
@@ -132,13 +138,13 @@ module GroongaClientModel
132
138
  @destroyed = false
133
139
  end
134
140
 
135
- def save(validate: false)
141
+ def save(validate: true)
136
142
  run_callbacks(:save) do
137
143
  save_raw(validate: validate)
138
144
  end
139
145
  end
140
146
 
141
- def save!(validate: false)
147
+ def save!(validate: true)
142
148
  unless save(validate: validate)
143
149
  message = "Failed to save the record"
144
150
  raise RecordNotSaved.new(message, self)
@@ -195,12 +201,12 @@ module GroongaClientModel
195
201
  def save_raw(validate:)
196
202
  if validate
197
203
  if valid?
198
- upsert
204
+ upsert(validate: true)
199
205
  else
200
206
  false
201
207
  end
202
208
  else
203
- upsert
209
+ upsert(validate: false)
204
210
  end
205
211
  end
206
212
 
@@ -221,20 +227,21 @@ module GroongaClientModel
221
227
  freeze
222
228
  end
223
229
 
224
- def upsert
230
+ def upsert(validate:)
225
231
  if new_record?
226
232
  run_callbacks(:create) do
227
- upsert_raw
233
+ upsert_raw(validate: validate)
228
234
  end
229
235
  else
230
236
  run_callbacks(:update) do
231
- upsert_raw
237
+ upsert_raw(validate: validate)
232
238
  end
233
239
  end
234
240
  end
235
241
 
236
- def upsert_raw
237
- upsert_sub_records
242
+ def upsert_raw(validate:)
243
+ return false unless upsert_sub_records(validate: validate)
244
+
238
245
  Client.open do |client|
239
246
  table = self.class.schema.tables[self.class.table_name]
240
247
  load_value_generator = LoadValueGenerator.new(self)
@@ -273,20 +280,30 @@ module GroongaClientModel
273
280
  end
274
281
  end
275
282
 
276
- def upsert_sub_records
283
+ def upsert_sub_records(validate:)
277
284
  attributes.each do |name, value|
278
- upsert_sub_record(value)
285
+ return false unless upsert_sub_record(value, validate)
279
286
  end
287
+ true
280
288
  end
281
289
 
282
- def upsert_sub_record(sub_record)
290
+ def upsert_sub_record(sub_record, validate)
283
291
  case sub_record
284
292
  when Record
285
- sub_record.save if sub_record.changed?
293
+ if sub_record.changed?
294
+ sub_record.save(validate: validate)
295
+ else
296
+ true
297
+ end
286
298
  when Array
287
299
  sub_record.each do |sub_element|
288
- upsert_sub_record(sub_element)
300
+ unless upsert_sub_record(sub_element, validate)
301
+ return false
302
+ end
289
303
  end
304
+ true
305
+ else
306
+ true
290
307
  end
291
308
  end
292
309
 
@@ -298,7 +315,11 @@ module GroongaClientModel
298
315
 
299
316
  class_name = name.classify
300
317
  begin
301
- sub_record_class = class_name.constantize
318
+ if self.class.const_defined?(class_name)
319
+ sub_record_class = self.class.const_get(class_name)
320
+ else
321
+ sub_record_class = class_name.constantize
322
+ end
302
323
  rescue NameError
303
324
  return value
304
325
  end
@@ -15,5 +15,5 @@
15
15
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
  module GroongaClientModel
18
- VERSION = "0.9.4"
18
+ VERSION = "0.9.5"
19
19
  end
@@ -0,0 +1,55 @@
1
+ source 'https://rubygems.org'
2
+
3
+ git_source(:github) do |repo_name|
4
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5
+ "https://github.com/#{repo_name}.git"
6
+ end
7
+
8
+
9
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10
+ gem 'rails', '~> 5.0.1'
11
+ # Use Puma as the app server
12
+ gem 'puma', '~> 3.0'
13
+ # Use SCSS for stylesheets
14
+ gem 'sass-rails', '~> 5.0'
15
+ # Use Uglifier as compressor for JavaScript assets
16
+ gem 'uglifier', '>= 1.3.0'
17
+ # Use CoffeeScript for .coffee assets and views
18
+ gem 'coffee-rails', '~> 4.2'
19
+ # See https://github.com/rails/execjs#readme for more supported runtimes
20
+ # gem 'therubyracer', platforms: :ruby
21
+
22
+ # Use jquery as the JavaScript library
23
+ gem 'jquery-rails'
24
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
25
+ gem 'turbolinks', '~> 5'
26
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
27
+ gem 'jbuilder', '~> 2.5'
28
+ # Use Redis adapter to run Action Cable in production
29
+ # gem 'redis', '~> 3.0'
30
+ # Use ActiveModel has_secure_password
31
+ # gem 'bcrypt', '~> 3.1.7'
32
+
33
+ # Use Capistrano for deployment
34
+ # gem 'capistrano-rails', group: :development
35
+
36
+ group :development, :test do
37
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
38
+ gem 'byebug', platform: :mri
39
+ gem 'factory_girl_rails'
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', '>= 3.3.0'
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]
53
+
54
+ gem 'groonga-client-model', path: '../../../'
55
+ gem 'groonga-client', path: '../../../../groonga-client'
@@ -0,0 +1,206 @@
1
+ PATH
2
+ remote: ../../../../groonga-client
3
+ specs:
4
+ groonga-client (0.4.0)
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-model (0.9.5)
14
+ activemodel
15
+ groonga-client (>= 0.3.7)
16
+ groonga-command-parser
17
+
18
+ GEM
19
+ remote: https://rubygems.org/
20
+ specs:
21
+ actioncable (5.0.1)
22
+ actionpack (= 5.0.1)
23
+ nio4r (~> 1.2)
24
+ websocket-driver (~> 0.6.1)
25
+ actionmailer (5.0.1)
26
+ actionpack (= 5.0.1)
27
+ actionview (= 5.0.1)
28
+ activejob (= 5.0.1)
29
+ mail (~> 2.5, >= 2.5.4)
30
+ rails-dom-testing (~> 2.0)
31
+ actionpack (5.0.1)
32
+ actionview (= 5.0.1)
33
+ activesupport (= 5.0.1)
34
+ rack (~> 2.0)
35
+ rack-test (~> 0.6.3)
36
+ rails-dom-testing (~> 2.0)
37
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
38
+ actionview (5.0.1)
39
+ activesupport (= 5.0.1)
40
+ builder (~> 3.1)
41
+ erubis (~> 2.7.0)
42
+ rails-dom-testing (~> 2.0)
43
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
44
+ activejob (5.0.1)
45
+ activesupport (= 5.0.1)
46
+ globalid (>= 0.3.6)
47
+ activemodel (5.0.1)
48
+ activesupport (= 5.0.1)
49
+ activerecord (5.0.1)
50
+ activemodel (= 5.0.1)
51
+ activesupport (= 5.0.1)
52
+ arel (~> 7.0)
53
+ activesupport (5.0.1)
54
+ concurrent-ruby (~> 1.0, >= 1.0.2)
55
+ i18n (~> 0.7)
56
+ minitest (~> 5.1)
57
+ tzinfo (~> 1.1)
58
+ arel (7.1.4)
59
+ builder (3.2.2)
60
+ byebug (9.0.6)
61
+ coffee-rails (4.2.1)
62
+ coffee-script (>= 2.2.0)
63
+ railties (>= 4.0.0, < 5.2.x)
64
+ coffee-script (2.4.1)
65
+ coffee-script-source
66
+ execjs
67
+ coffee-script-source (1.12.2)
68
+ concurrent-ruby (1.0.4)
69
+ debug_inspector (0.0.2)
70
+ erubis (2.7.0)
71
+ execjs (2.7.0)
72
+ factory_girl (4.8.0)
73
+ activesupport (>= 3.0.0)
74
+ factory_girl_rails (4.8.0)
75
+ factory_girl (~> 4.8.0)
76
+ railties (>= 3.0.0)
77
+ ffi (1.9.14)
78
+ globalid (0.3.7)
79
+ activesupport (>= 4.1.0)
80
+ gqtp (1.0.6)
81
+ groonga-command (1.3.1)
82
+ json
83
+ groonga-command-parser (1.0.7)
84
+ groonga-command (>= 1.0.9)
85
+ json-stream
86
+ hashie (3.4.6)
87
+ i18n (0.7.0)
88
+ jbuilder (2.6.1)
89
+ activesupport (>= 3.0.0, < 5.1)
90
+ multi_json (~> 1.2)
91
+ jquery-rails (4.2.1)
92
+ rails-dom-testing (>= 1, < 3)
93
+ railties (>= 4.2.0)
94
+ thor (>= 0.14, < 2.0)
95
+ json (2.0.2)
96
+ json-stream (0.2.1)
97
+ listen (3.0.8)
98
+ rb-fsevent (~> 0.9, >= 0.9.4)
99
+ rb-inotify (~> 0.9, >= 0.9.7)
100
+ loofah (2.0.3)
101
+ nokogiri (>= 1.5.9)
102
+ mail (2.6.4)
103
+ mime-types (>= 1.16, < 4)
104
+ method_source (0.8.2)
105
+ mime-types (3.1)
106
+ mime-types-data (~> 3.2015)
107
+ mime-types-data (3.2016.0521)
108
+ mini_portile2 (2.1.0)
109
+ minitest (5.10.1)
110
+ multi_json (1.12.1)
111
+ nio4r (1.2.1)
112
+ nokogiri (1.6.8.1)
113
+ mini_portile2 (~> 2.1.0)
114
+ puma (3.6.2)
115
+ rack (2.0.1)
116
+ rack-test (0.6.3)
117
+ rack (>= 1.0)
118
+ rails (5.0.1)
119
+ actioncable (= 5.0.1)
120
+ actionmailer (= 5.0.1)
121
+ actionpack (= 5.0.1)
122
+ actionview (= 5.0.1)
123
+ activejob (= 5.0.1)
124
+ activemodel (= 5.0.1)
125
+ activerecord (= 5.0.1)
126
+ activesupport (= 5.0.1)
127
+ bundler (>= 1.3.0, < 2.0)
128
+ railties (= 5.0.1)
129
+ sprockets-rails (>= 2.0.0)
130
+ rails-dom-testing (2.0.1)
131
+ activesupport (>= 4.2.0, < 6.0)
132
+ nokogiri (~> 1.6.0)
133
+ rails-html-sanitizer (1.0.3)
134
+ loofah (~> 2.0)
135
+ railties (5.0.1)
136
+ actionpack (= 5.0.1)
137
+ activesupport (= 5.0.1)
138
+ method_source
139
+ rake (>= 0.8.7)
140
+ thor (>= 0.18.1, < 2.0)
141
+ rake (12.0.0)
142
+ rb-fsevent (0.9.8)
143
+ rb-inotify (0.9.7)
144
+ ffi (>= 0.5.0)
145
+ sass (3.4.23)
146
+ sass-rails (5.0.6)
147
+ railties (>= 4.0.0, < 6)
148
+ sass (~> 3.1)
149
+ sprockets (>= 2.8, < 4.0)
150
+ sprockets-rails (>= 2.0, < 4.0)
151
+ tilt (>= 1.1, < 3)
152
+ spring (2.0.0)
153
+ activesupport (>= 4.2)
154
+ spring-watcher-listen (2.0.1)
155
+ listen (>= 2.7, < 4.0)
156
+ spring (>= 1.2, < 3.0)
157
+ sprockets (3.7.1)
158
+ concurrent-ruby (~> 1.0)
159
+ rack (> 1, < 3)
160
+ sprockets-rails (3.2.0)
161
+ actionpack (>= 4.0)
162
+ activesupport (>= 4.0)
163
+ sprockets (>= 3.0.0)
164
+ thor (0.19.4)
165
+ thread_safe (0.3.5)
166
+ tilt (2.0.5)
167
+ turbolinks (5.0.1)
168
+ turbolinks-source (~> 5)
169
+ turbolinks-source (5.0.0)
170
+ tzinfo (1.2.2)
171
+ thread_safe (~> 0.1)
172
+ uglifier (3.0.4)
173
+ execjs (>= 0.3.0, < 3)
174
+ web-console (3.4.0)
175
+ actionview (>= 5.0)
176
+ activemodel (>= 5.0)
177
+ debug_inspector
178
+ railties (>= 5.0)
179
+ websocket-driver (0.6.4)
180
+ websocket-extensions (>= 0.1.0)
181
+ websocket-extensions (0.1.2)
182
+
183
+ PLATFORMS
184
+ ruby
185
+
186
+ DEPENDENCIES
187
+ byebug
188
+ coffee-rails (~> 4.2)
189
+ factory_girl_rails
190
+ groonga-client!
191
+ groonga-client-model!
192
+ jbuilder (~> 2.5)
193
+ jquery-rails
194
+ listen (~> 3.0.5)
195
+ puma (~> 3.0)
196
+ rails (~> 5.0.1)
197
+ sass-rails (~> 5.0)
198
+ spring
199
+ spring-watcher-listen (~> 2.0.0)
200
+ turbolinks (~> 5)
201
+ tzinfo-data
202
+ uglifier (>= 1.3.0)
203
+ web-console (>= 3.3.0)
204
+
205
+ BUNDLED WITH
206
+ 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,3 @@
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/
@@ -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