groonga-client-model 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 +5 -0
- data/Gemfile +23 -0
- data/README.md +38 -0
- data/Rakefile +46 -0
- data/doc/text/lgpl-2.1.txt +502 -0
- data/doc/text/news.md +5 -0
- data/groonga-client-model.gemspec +55 -0
- data/lib/groonga-client-model.rb +40 -0
- data/lib/groonga_client_model/client.rb +37 -0
- data/lib/groonga_client_model/client_opener.rb +24 -0
- data/lib/groonga_client_model/error.rb +46 -0
- data/lib/groonga_client_model/load_value_generator.rb +54 -0
- data/lib/groonga_client_model/modelizable.rb +26 -0
- data/lib/groonga_client_model/modelize.rb +83 -0
- data/lib/groonga_client_model/railtie.rb +62 -0
- data/lib/groonga_client_model/record.rb +324 -0
- data/lib/groonga_client_model/schema.rb +109 -0
- data/lib/groonga_client_model/spec_helper.rb +27 -0
- data/lib/groonga_client_model/test_helper.rb +27 -0
- data/lib/groonga_client_model/version.rb +19 -0
- data/test/apps/rails5/Gemfile +50 -0
- data/test/apps/rails5/Gemfile.lock +208 -0
- data/test/apps/rails5/README.md +24 -0
- data/test/apps/rails5/Rakefile +6 -0
- data/test/apps/rails5/app/assets/config/manifest.js +3 -0
- data/test/apps/rails5/app/assets/javascripts/application.js +16 -0
- data/test/apps/rails5/app/assets/javascripts/cable.js +13 -0
- data/test/apps/rails5/app/assets/javascripts/posts.coffee +3 -0
- data/test/apps/rails5/app/assets/stylesheets/application.css +15 -0
- data/test/apps/rails5/app/assets/stylesheets/posts.scss +3 -0
- data/test/apps/rails5/app/assets/stylesheets/scaffolds.scss +89 -0
- data/test/apps/rails5/app/channels/application_cable/channel.rb +4 -0
- data/test/apps/rails5/app/channels/application_cable/connection.rb +4 -0
- data/test/apps/rails5/app/controllers/application_controller.rb +3 -0
- data/test/apps/rails5/app/controllers/posts_controller.rb +74 -0
- data/test/apps/rails5/app/helpers/application_helper.rb +2 -0
- data/test/apps/rails5/app/helpers/posts_helper.rb +2 -0
- data/test/apps/rails5/app/jobs/application_job.rb +2 -0
- data/test/apps/rails5/app/mailers/application_mailer.rb +4 -0
- data/test/apps/rails5/app/models/post.rb +2 -0
- data/test/apps/rails5/app/views/layouts/application.html.erb +14 -0
- data/test/apps/rails5/app/views/layouts/mailer.html.erb +13 -0
- data/test/apps/rails5/app/views/layouts/mailer.text.erb +1 -0
- data/test/apps/rails5/app/views/posts/_form.html.erb +27 -0
- data/test/apps/rails5/app/views/posts/_post.json.jbuilder +2 -0
- data/test/apps/rails5/app/views/posts/edit.html.erb +6 -0
- data/test/apps/rails5/app/views/posts/index.html.erb +29 -0
- data/test/apps/rails5/app/views/posts/index.json.jbuilder +1 -0
- data/test/apps/rails5/app/views/posts/new.html.erb +5 -0
- data/test/apps/rails5/app/views/posts/show.html.erb +14 -0
- data/test/apps/rails5/app/views/posts/show.json.jbuilder +1 -0
- data/test/apps/rails5/bin/bundle +3 -0
- data/test/apps/rails5/bin/rails +9 -0
- data/test/apps/rails5/bin/rake +9 -0
- data/test/apps/rails5/bin/setup +34 -0
- data/test/apps/rails5/bin/spring +16 -0
- data/test/apps/rails5/bin/update +29 -0
- data/test/apps/rails5/config.ru +5 -0
- data/test/apps/rails5/config/application.rb +25 -0
- data/test/apps/rails5/config/boot.rb +3 -0
- data/test/apps/rails5/config/cable.yml +9 -0
- data/test/apps/rails5/config/environment.rb +5 -0
- data/test/apps/rails5/config/environments/development.rb +51 -0
- data/test/apps/rails5/config/environments/production.rb +83 -0
- data/test/apps/rails5/config/environments/test.rb +42 -0
- data/test/apps/rails5/config/groonga.yml +8 -0
- data/test/apps/rails5/config/initializers/application_controller_renderer.rb +6 -0
- data/test/apps/rails5/config/initializers/assets.rb +11 -0
- data/test/apps/rails5/config/initializers/backtrace_silencers.rb +7 -0
- data/test/apps/rails5/config/initializers/cookies_serializer.rb +5 -0
- data/test/apps/rails5/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/apps/rails5/config/initializers/inflections.rb +16 -0
- data/test/apps/rails5/config/initializers/mime_types.rb +4 -0
- data/test/apps/rails5/config/initializers/new_framework_defaults.rb +21 -0
- data/test/apps/rails5/config/initializers/session_store.rb +3 -0
- data/test/apps/rails5/config/initializers/wrap_parameters.rb +9 -0
- data/test/apps/rails5/config/locales/en.yml +23 -0
- data/test/apps/rails5/config/puma.rb +47 -0
- data/test/apps/rails5/config/routes.rb +4 -0
- data/test/apps/rails5/config/secrets.yml +22 -0
- data/test/apps/rails5/config/spring.rb +6 -0
- data/test/apps/rails5/db/schema.grn +9 -0
- data/test/apps/rails5/db/seeds.rb +7 -0
- data/test/apps/rails5/log/development.log +348 -0
- data/test/apps/rails5/log/test.log +1824 -0
- data/test/apps/rails5/public/404.html +67 -0
- data/test/apps/rails5/public/422.html +67 -0
- data/test/apps/rails5/public/500.html +66 -0
- data/test/apps/rails5/public/apple-touch-icon-precomposed.png +0 -0
- data/test/apps/rails5/public/apple-touch-icon.png +0 -0
- data/test/apps/rails5/public/favicon.ico +0 -0
- data/test/apps/rails5/public/robots.txt +5 -0
- data/test/apps/rails5/test/controllers/posts_controller_test.rb +50 -0
- data/test/apps/rails5/test/factories/posts.rb +6 -0
- data/test/apps/rails5/test/test_helper.rb +9 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/-8/-8MPXp-nRdAuudlPZG0-fjIhSfT9c-mruIMNR_HnpTE.cache +2 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/04/04zh1ytKDagWzWcqUyadXtzzohCn9iVvSVG4KrjpfPU.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/0M/0M4bZ4tQh0MQYZMb72U5yr-ELStAsUSb8akkTME9TPM.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/0g/0gB1rYz79RuAa43DzVci1GUjc5so0F1dU_LyLSmm3oQ.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/1w/1w3lEnPL9oZPD-uk9Y9HOAO5TBywbDUumPsLKAD1trs.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/2g/2gve43APDqh4mVsNSvvDZWU7XBUFJ22DjchDFC7BLHE.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/3F/3Fsw9a9YyB3-WaDSpA1HTGJrWn_7xMLLpUYcNv4f4zs.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/3P/3Px3lDIUtsiFfGy4nQGown3yldwKCp1MNuWbSDX1pvg.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/46/46uDYcwHwTAfdjT4Cxqs7pC3FEBf4GNj8S36-TDtT18.cache +2 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/5g/5gcXfyU_2YGZzzLIX2HgVkpwSaUUyIH9beyVvR4-RyM.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/6a/6ae9A4LxsOF8WxXqTRrY_OfmiKLzuX-k8CdxcYhyH2w.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/6g/6gfb-nNauXmim2itNUscPWKLGmjzBgnE4ee76bNftS4.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/71/71Km0xL27urBNH3LVGVQ7MXXtuIePWU9VsJ4VjSeMac.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/8Z/8Zm1d9-lBPsGG_HUw8FP2OCCVucGDVhWAOGaopvOdss.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/8w/8wTyiibSVQ_CunXEyCjFUbzdSEAuSbH0z5XuCUXG0EA.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/9p/9pkKAqd_Ia0HpbbUCZtpJ8WiDzr5stcFJsnqsOsJwCc.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/B9/B9QeeLv4GR9sOdrwyvxa8jIr4MkxjYh4Ow6MOZ8slX8.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/BK/BKtHbqHUW-BUh6yXbZoSBLGYZdH4xpyEVJZ85mre3dI.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Bx/BxzoG0KxeNLac4xTNeJv3qfeytbNBw58xj2zD-xdbrE.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/DG/DGB9_ZZc6xf8xDs1C8MTwsnZGITqTg5w6Fi8loIoAz0.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/DI/DIQbAB3xoMpwIuVisoyQuLOOLReZGqTzMsMSqPTvNlU.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Dc/Dcujr9N54L76juPEo4EOYs8buHy8vO2fp-AjoG42-uQ.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Dw/DwMpASR_zMhZCB0WD5ibeEaOAEhod-gPDA-cl83A0NQ.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/F2/F2G2wQz7oPKX0Y4KCAUyw79ULHKyiweLkqbo4uclz2M.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/F4/F4Vm2jVryhME1Ux-h1fCIbynttYJmSOV0lzVQihiIas.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/G0/G0kukI-r0q0Vbrg6e_jnYJoYcOX8K__h-mwKbCf4twE.cache +2 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/H4/H4qMae4wP-2E0IT3OzIKJm7TAmkfgTg5GG-mDvrpRr8.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/HJ/HJmxnxAVu4ESMb2RUFATQhzd8xP7qwk0i7Or2WU6tHY.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Ih/IhFDQr9KaIbw7KJmoi9sRJ2CWZtxt72J0Eu2HDAQYJA.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/J-/J-hbdFdKmhYgVvczTzQyQ6ToGIL2Ucw2qCT6Y1oOPhg.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/KZ/KZDZMIUD9LD98z__9bjCHLnzjcGoKSnlxuHH1cEiw6M.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/LD/LDzW9KshYb0NgRzu1HyrKQlc3satBlIIOEHET_I4TjA.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Mw/MwUXpv2ArJcHhHfRN-i_SHhOyrhE2ED5DP6j2_tHtDM.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/N6/N6_UDcd-9vm063oO9Kj2UKERXHyG53mpljIHhMP_sX0.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Ot/OttEu6oltiTErpVGZQJA3vWOb24u3_w28yMEG-Gs0tA.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/P1/P1Ojlz0OChhbxGf83KhMWxJFzKZ3unhLwJ1UoH5U7ss.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Pz/PzsjxNnBT0RlIX-T49i6Iyrc_XG8IaJ-F55_x52md8M.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Q0/Q0AeQIZuDbFTvWKLlSaL-R4XKHuiymwgVvQUqxxVq_k.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Qr/Qrr38H1OZvkfozoMfcDEQ-arpbO7PFQ47i70UTEeWnk.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Qw/QwtseSptjk29vLQAs9XVSY_9GY6mR4wLQ6e3xJZzwuo.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Rf/RfAETGxupO0E6Sf50S9Rs_7H_8IFQkZ0V_Ot0qRcMaM.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/S1/S1RgRu3SVlB0u9krRyLUpNzVgKMN9Pk_KMWLehP2SUc.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/SN/SNLpl8dBME7slRhucvmV_kjMQImk-VGiILaga5lEcBM.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/SO/SOU1TEHFYRVejiA6nBNRm3Bwq_YtPlxSXK0VM3y3vto.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Sd/Sda0ZUElAQoD0SXBgNqF99THI2KdVA4YOcdhAyZxPsY.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Sh/ShN-ZUpoxLJLJiMV5gFDP00vcSMHw87YzFBlXH4adPA.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Si/Sin6bEoASrNa45108CpfgF2jcifz-KpbsvvZJtqVZ68.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/TI/TIt8bfq26rstydJvFM28p05FfB6s8Qjr6EoF6EtQUEc.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Uk/UkodNPk80caeUqn1HNQXMB1qV-c-4l-vBFHb7fd5ZGw.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Uw/Uws4qYyGLobvE_JD4L6dQNcIOOhv4LEZ3D0mK86tZOA.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Wm/WmtvDDxglSnhmavMeA7WNn7waN3QbagRHeoZHvZJN84.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/X6/X6u2Cul1j8SpBq0WC1S8WhzGiT6f-6L_djUngh_gQfw.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Xe/XeuTfsFtikyfcpzyNjJW7GvVARtV7EFUF8V9lJuS9zs.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Ya/YayMISAqD-Y3vBFywwKrXbUovGf5o77HUF5s8mnQgO0.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Z2/Z2fYOjvDRsoVXYUWY_QLV3gqU-HobuEZ7vKRjuJO-80.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/Zj/ZjPZKMxS8BzA1QxHFURXSpprFItP8iIYNCg6yfbO69Y.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/a7/a7_aLHXKzPVK1lGdqvWuCl5hXxwSIGH4kcxuF7jMzgE.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/c9/c9YydpmE9rI8VeQ4sVqd5JrA1VSEFGGzpuMBUSrAGac.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/cB/cBjyp28toLdtY2EFK9cqrbDnrwBSFI7T_vLNoGz-u_U.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/cT/cT8i2C4yg0R2UYvutxD-4kbdJF09toG1OUgtd6NAf2M.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/cU/cUegCc5wz5f7rfqzD7wrbN633pZRWeewi9j1lJ895Y0.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/dA/dAab_MVPXubReIXiKSsP0TGA9dXca0KkwVLz7xNJNmA.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/eY/eYUlaSCg8w9Jp-IVGbffopOhH4C94vGA0w6SaC88FM8.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/eo/eoSb6VtmOhc2zv4rO1yMBf6hjUj7zHVkSMiNZ7Y576w.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/gm/gmeq3PfpFbfe2L0ijWzw1Dzny6T-kD3zREQjh6XGs-o.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/he/heptoj4xFW23bqbGAnQ2g6MsS3OKgswQZOu4EFQA9CE.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/kN/kNQUVmgZpBoZh9oC57J3qRmnvFOb8zfDeJWar6cPJFM.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/km/km1UJe7Uvz3cE03ctzec3Mpcow_vgKO36rq50_Szy3o.cache +5 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/kv/kvOgs1tp83VikXcBjupUg71ybkDcx1pBzH2Dw6mVa7A.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/kz/kzw210ITXFWNFV8kw5e-_kRlpS48lGotSQWKPlUfMJ4.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/m-/m-gDByrlve8T_OZCCZCaGVlLUnbGWk0qkv7naFMcLDg.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/m8/m8XSfEV5J53MzAtMK6udqOZh9S_uC-tELG327hLnWT4.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/na/naKBB6bJXEjSAfrBfAiXlIzJDRGTsRrbQlI5FezRxnM.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/oU/oUgVYeNUmvSbf5MWq5a-nknLIlepM8oMGSWyD1J5bzg.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/pN/pNBMBzHv-_a5u4lbxQmRsv_hzWZOk93wX3hlG4y4X5E.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/pb/pb0V-IHbOTzmTuDDHO7dn8kl3G4RWqXYY1-Gtuklh-M.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/pq/pqi4pYpSRroaGdwCXuATmVeb1U-mvzUU8zeWu6o5ooo.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/q9/q9zC8RrLhOO1dVXJ3fZqc9dSbshhjSpsDQxh5MpbnDA.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/qP/qPmv5snMrDw830S6hSICDcnIy7kVEWoFKXhGKT38lG4.cache +2 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/rn/rnjUJtM3qyEybb7S3NaVbV36OvY6ulGzqxgvp6vtkW0.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/rv/rvA5ImExxmMtvHSKmwVMXxnVzM4istECfBR-LxbUf8I.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/sS/sSg6UsW5PPi591GTK35btFew1r3_HpbNHoyZv3vZ_HY.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/t3/t39F_1zIFMdWiKVUNJyhWOOnP8Lgr6AD5R1HWdVYwbU.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/tV/tVL6qud2OxyiMT_-izeWpZa4KnypOUhK0XjwBIPVgi0.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/uo/uo2nRPLQSA3FmFVLvE-9uXW64Xx-Gp799qSF3vui1WE.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/x7/x7PYh8DJvPykcEqpVab2vcY9-GFz-3cqtoMlRAu94Uc.cache +0 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/xU/xUR-yFcc0UZR2BLp-jBU9bjPiIYophx6ep5yBEeQCM8.cache +1 -0
- data/test/apps/rails5/tmp/cache/assets/sprockets/v3.0/zh/zhmfmdnnow0QqwfT_7IXfN-FAU8qAMm03N7XQjFct6E.cache +1 -0
- data/test/apps/rails5/tmp/restart.txt +0 -0
- data/test/run-test.rb +49 -0
- data/test/unit/run-test.rb +35 -0
- data/test/unit/test_load_value_generator.rb +79 -0
- data/test/unit/test_record.rb +52 -0
- metadata +516 -0
@@ -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
|
@@ -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 @@
|
|
1
|
+
<%= yield %>
|
@@ -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,29 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<h1>Posts</h1>
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<th>Title</th>
|
9
|
+
<th>Body</th>
|
10
|
+
<th colspan="3"></th>
|
11
|
+
</tr>
|
12
|
+
</thead>
|
13
|
+
|
14
|
+
<tbody>
|
15
|
+
<% @posts.each do |post| %>
|
16
|
+
<tr>
|
17
|
+
<td><%= post.title %></td>
|
18
|
+
<td><%= post.body %></td>
|
19
|
+
<td><%= link_to 'Show', post %></td>
|
20
|
+
<td><%= link_to 'Edit', edit_post_path(post) %></td>
|
21
|
+
<td><%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
22
|
+
</tr>
|
23
|
+
<% end %>
|
24
|
+
</tbody>
|
25
|
+
</table>
|
26
|
+
|
27
|
+
<br>
|
28
|
+
|
29
|
+
<%= link_to 'New Post', new_post_path %>
|
@@ -0,0 +1 @@
|
|
1
|
+
json.array! @posts, partial: 'posts/post', as: :post
|
@@ -0,0 +1 @@
|
|
1
|
+
json.partial! "posts/post", post: @post
|
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
begin
|
3
|
+
load File.expand_path('../spring', __FILE__)
|
4
|
+
rescue LoadError => e
|
5
|
+
raise unless e.message.include?('spring')
|
6
|
+
end
|
7
|
+
APP_PATH = File.expand_path('../config/application', __dir__)
|
8
|
+
require_relative '../config/boot'
|
9
|
+
require 'rails/commands'
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
# path to your application root.
|
7
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
8
|
+
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
11
|
+
end
|
12
|
+
|
13
|
+
chdir APP_ROOT do
|
14
|
+
# This script is a starting point to setup your application.
|
15
|
+
# Add necessary setup steps to this file.
|
16
|
+
|
17
|
+
puts '== Installing dependencies =='
|
18
|
+
system! 'gem install bundler --conservative'
|
19
|
+
system('bundle check') || system!('bundle install')
|
20
|
+
|
21
|
+
# puts "\n== Copying sample files =="
|
22
|
+
# unless File.exist?('config/database.yml')
|
23
|
+
# cp 'config/database.yml.sample', 'config/database.yml'
|
24
|
+
# end
|
25
|
+
|
26
|
+
puts "\n== Preparing database =="
|
27
|
+
system! 'bin/rails db:setup'
|
28
|
+
|
29
|
+
puts "\n== Removing old logs and tempfiles =="
|
30
|
+
system! 'bin/rails log:clear tmp:clear'
|
31
|
+
|
32
|
+
puts "\n== Restarting application server =="
|
33
|
+
system! 'bin/rails restart'
|
34
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# This file loads spring without using Bundler, in order to be fast.
|
4
|
+
# It gets overwritten when you run the `spring binstub` command.
|
5
|
+
|
6
|
+
unless defined?(Spring)
|
7
|
+
require 'rubygems'
|
8
|
+
require 'bundler'
|
9
|
+
|
10
|
+
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
11
|
+
if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
12
|
+
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
13
|
+
gem 'spring', spring.version
|
14
|
+
require 'spring/binstub'
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
# path to your application root.
|
7
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
8
|
+
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
11
|
+
end
|
12
|
+
|
13
|
+
chdir APP_ROOT do
|
14
|
+
# This script is a way to update your development environment automatically.
|
15
|
+
# Add necessary update steps to this file.
|
16
|
+
|
17
|
+
puts '== Installing dependencies =='
|
18
|
+
system! 'gem install bundler --conservative'
|
19
|
+
system('bundle check') || system!('bundle install')
|
20
|
+
|
21
|
+
puts "\n== Updating database =="
|
22
|
+
system! 'bin/rails db:migrate'
|
23
|
+
|
24
|
+
puts "\n== Removing old logs and tempfiles =="
|
25
|
+
system! 'bin/rails log:clear tmp:clear'
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system! 'bin/rails restart'
|
29
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative 'boot'
|
2
|
+
|
3
|
+
require "rails"
|
4
|
+
# Pick the frameworks you want:
|
5
|
+
require "active_model/railtie"
|
6
|
+
require "active_job/railtie"
|
7
|
+
# require "active_record/railtie"
|
8
|
+
require "action_controller/railtie"
|
9
|
+
require "action_mailer/railtie"
|
10
|
+
require "action_view/railtie"
|
11
|
+
require "action_cable/engine"
|
12
|
+
require "sprockets/railtie"
|
13
|
+
require "rails/test_unit/railtie"
|
14
|
+
|
15
|
+
# Require the gems listed in Gemfile, including any gems
|
16
|
+
# you've limited to :test, :development, or :production.
|
17
|
+
Bundler.require(*Rails.groups)
|
18
|
+
|
19
|
+
module Blog
|
20
|
+
class Application < Rails::Application
|
21
|
+
# Settings in config/environments/* take precedence over those specified here.
|
22
|
+
# Application configuration should go into files in config/initializers
|
23
|
+
# -- all .rb files in that directory are automatically loaded.
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
|
+
|
12
|
+
# Show full error reports.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
|
15
|
+
# Enable/disable caching. By default caching is disabled.
|
16
|
+
if Rails.root.join('tmp/caching-dev.txt').exist?
|
17
|
+
config.action_controller.perform_caching = true
|
18
|
+
|
19
|
+
config.cache_store = :memory_store
|
20
|
+
config.public_file_server.headers = {
|
21
|
+
'Cache-Control' => 'public, max-age=172800'
|
22
|
+
}
|
23
|
+
else
|
24
|
+
config.action_controller.perform_caching = false
|
25
|
+
|
26
|
+
config.cache_store = :null_store
|
27
|
+
end
|
28
|
+
|
29
|
+
# Don't care if the mailer can't send.
|
30
|
+
config.action_mailer.raise_delivery_errors = false
|
31
|
+
|
32
|
+
config.action_mailer.perform_caching = false
|
33
|
+
|
34
|
+
# Print deprecation notices to the Rails logger.
|
35
|
+
config.active_support.deprecation = :log
|
36
|
+
|
37
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
38
|
+
# This option may cause significant delays in view rendering with a large
|
39
|
+
# number of complex assets.
|
40
|
+
config.assets.debug = true
|
41
|
+
|
42
|
+
# Suppress logger output for asset requests.
|
43
|
+
config.assets.quiet = true
|
44
|
+
|
45
|
+
# Raises error for missing translations
|
46
|
+
# config.action_view.raise_on_missing_translations = true
|
47
|
+
|
48
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
49
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
50
|
+
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
51
|
+
end
|