groonga-client-model 0.9.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/text/news.md +6 -0
- data/lib/groonga_client_model/railtie.rb +9 -2
- data/lib/groonga_client_model/version.rb +1 -1
- data/test/apps/rails4/Gemfile +15 -22
- data/test/apps/rails4/Gemfile.lock +77 -91
- data/test/apps/rails4/{README.md → README.rdoc} +5 -1
- data/test/apps/rails4/Rakefile +1 -1
- data/test/apps/rails4/app/assets/javascripts/application.js +1 -1
- data/test/apps/rails4/app/assets/stylesheets/application.css +3 -3
- data/test/apps/rails4/app/assets/stylesheets/scaffolds.scss +1 -17
- data/test/apps/rails4/app/controllers/application_controller.rb +2 -0
- data/test/apps/rails4/app/models/application_groonga_record.rb +2 -0
- data/test/apps/rails4/app/models/post.rb +1 -1
- data/test/apps/rails4/app/views/layouts/application.html.erb +9 -9
- data/test/apps/rails4/app/views/posts/_form.html.erb +6 -8
- data/test/apps/rails4/app/views/posts/edit.html.erb +1 -1
- data/test/apps/rails4/app/views/posts/index.html.erb +1 -1
- data/test/apps/rails4/app/views/posts/new.html.erb +1 -1
- data/test/apps/rails4/bin/rails +1 -1
- data/test/apps/rails4/bin/setup +12 -17
- data/test/apps/rails4/bin/spring +2 -1
- data/test/apps/rails4/config.ru +1 -2
- data/test/apps/rails4/config/application.rb +9 -2
- data/test/apps/rails4/config/boot.rb +1 -1
- data/test/apps/rails4/config/environment.rb +1 -1
- data/test/apps/rails4/config/environments/development.rb +11 -24
- data/test/apps/rails4/config/environments/production.rb +17 -24
- data/test/apps/rails4/config/environments/test.rb +6 -6
- data/test/apps/rails4/config/groonga.yml +18 -3
- data/test/apps/rails4/config/initializers/cookies_serializer.rb +0 -2
- data/test/apps/rails4/config/initializers/wrap_parameters.rb +1 -1
- data/test/apps/rails4/config/routes.rb +54 -1
- data/test/apps/rails4/config/secrets.yml +3 -3
- data/test/apps/rails4/db/seeds.rb +3 -3
- data/test/apps/rails4/log/test.log +363 -184
- data/test/apps/rails4/test/controllers/posts_controller_test.rb +12 -11
- data/test/apps/rails4/test/models/post_test.rb +16 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{mA/mAWsnX7Peh_B8DPSBTB4f9Yr4LFtZwOf5prl05GZY3g.cache → 1v/1vNbaFvqzPuMCPa9LBe2yL962Ncp7RbNREOlE_qe8Ss.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{0g/0gB1rYz79RuAa43DzVci1GUjc5so0F1dU_LyLSmm3oQ.cache → 2F/2FyDjMLF22tXYLEKS6UqrqiSZTKp2HowmRsOZfW2dQs.cache} +1 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/3Q/3QxCnPBwOHO-nainvNGREWb7QnMUKlPsx4AFZgNVVUI.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache → 5L/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{rF/rF2vahiCQKUhJ8McEG0p8B7csWsz-dL13EQ7r2APOxc.cache → 6q/6q02XRkUAs1p1AznDygMg5SQnzVPORnD3tttb6bN38Y.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/AP/APY89OAPJx9A3D3xcCoktvEvQUs7NcWChYXnjjjPzz0.cache +2 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/BX/BXotLtoyOM47AZWstuYImgPP3ZX_6ePkTaL-w2UbD6s.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/CP/CPpqyQND9PwMf8rWX137atdXUJllZf-MoJqsrRy8-_M.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/GB/GBwB7RWhc8G8ZTp1BmhlFA9KxTMHsC0ozT6BA4wY4E0.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{N1/N1cFx1cQirDbaPCgGKbLjIcxsOM8ODiP98PZWSHDzyE.cache → Im/ImPjo1rh_BjihbG9lqrj6vYU12ZpBF1ml-SYAoCeDfs.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Kj/Kj5SXlN75_IXQg3ClSWOr0un4meXeR4o2STN7wQlrNs.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{Bh/BhBHwSo9EwfIYTDkA21FIndZkPsZ28CYARi4iBDw608.cache → Kq/KqE4OB3K1Vvxhxu20J2vygXKabgv57Mk0fYncnRtMVM.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/L6/L6VeuDb0xHGN0ZkbW-7I8k4hl6jcoufH3IqJLGat0uw.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/MG/MGY7vCFpMwMfTZjnoHcjrEns4qINkUs6SDLo-7ZHDzY.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Md/MdQJlkbMaRGmGTWDp3vV1gnrGTBlA_WglIB5glz1bEE.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache → OI/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{tH/tHi6ifML6NOeHhumbOb5hc1QFREX-LhACtiUhS54YPQ.cache → Ot/Ot1Yjpr09IxOvvY7PgNcg-1nEEO0nhzwJmosWMeSWwc.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{kz/kzw210ITXFWNFV8kw5e-_kRlpS48lGotSQWKPlUfMJ4.cache → Pm/Pm3ENYpCrQMOJGd-d8lACN_nbGZWiivq_KyPLJoD9Xk.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{VQ/VQNk5aqOyF22mFE5NhdDjfBZeFpSfgaaZdyngvHYi48.cache → QG/QG2CRa1A_ehuXGL8JwqPi2U16gehGSaXO_IzkOjcZaU.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Rg/RgDBcEPslcvUrodRXUXEkV6mbPTHBBnNrD3IO7tzw78.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/UF/UF2HqGF3e151MaG10cb333axk4G1L4l2TfS91DkiX6I.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{XJ/XJRPx7aZ4ajZ72O37hx53ZFkfXSHpDDpCy78LI0leqM.cache → Uo/UoAGEMj7jzkXrlFKxviQpDP2tiO1dYTKiZGzA1EZyc4.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{Ru/Ru1MOhJ8ZzL7pBzPr_QeTTd0LnfWx4DcM0iVcL4cTzo.cache → W4/W4TqFfx9xs_9OpiAURaumjMu1Xoiw4wE0LcVK7hQS8A.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{eQ/eQxzX_D16-XyOt1WTkYEC0qDvRbjXcCgQgnd9pBrg7o.cache → X-/X-m9giJcrkJm0BkoCQEan-MDJ0UTN9QaLyfNo0LXm2s.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/YL/YLHQFFsVrl4ksR5ZNFU1vc0ytWPUeiahGhk4llYc4Zg.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/YY/YYjjrExY-FL2dQQkvcHOLwpb_KNTHlsTyyFUVMhLbUE.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Zs/Zs96XWLbB-Sp-R9P31ArcdU7j6VL_RBI-SwpwTE_TZA.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{bM/bMMUbhA2nFZ9dHAnzKZsPzKVcv-UlAWaVq92COmAHwI.cache → _e/_eNuPQDv_ZR4m8hgbRvDpxc2CL_5gpsPUczPBDERMbA.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{6r/6rrJLZY0-_gdJxgMUZBZIn-wf8bPVArYjXhIIrt_O5Y.cache → cM/cMcoi258fMhhWlagTzUINSg8srih6ebrpZ50tLfKUoc.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/dv/dvWPUKdon1kQ0NI3VfpPzMETH0CWImWXui_6n2SsoAE.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/eb/ebKQzT3ac6Hus7GSISyFj_1LkQW1W9-BlhewMEXtUg0.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/kS/kSkCWaAJCcTgZ_AhrRCjZhNtkE12cubiq70uNtditqk.cache +2 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{eA/eA_fQgrHsn-vD9XeNQyC8335oMP8k0cnmerzHzjEwLQ.cache → lL/lL_dWZRBcwCn63yXBT5UzQ-7tnVDndwPc7qVdFgl0tM.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/lz/lzP8RQ5zmNQAi9-dzplqCwDpDZ13rCc2ob9BrMG-FCk.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/nd/ndY4mwZ38em5ydI4kE4ZwSM5DZim7EHoyJlccsNffzU.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{JX/JXqwLmb9hlO9nmp2kJYEcKaKy9RMO-HxwnptsiVAADc.cache → oF/oF9RtQhbL4wfZGSLn-E5OVetjrvjXHH91DpRQE52ufA.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{0M/0M4bZ4tQh0MQYZMb72U5yr-ELStAsUSb8akkTME9TPM.cache → ok/okosRqsUehqnm3OWnShpWnh8oyDXxM73IeCQyLhjZBM.cache} +1 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{a5/a5Ai9QXaiRRSN7BXZZ3eZSL8mbwrdOKNM9Hco1Bp498.cache → r9/r9AgJGnY4OgxXHKYgc1j-0muJGgEkcWFIrHDk2ev4ps.cache} +1 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/{do/doMYM14rQvSD5lPwCGe0ULzbXBwyBM-f1jOE0MzmEs4.cache → vw/vw0y0WzpHCSScyQbk0p_zI3oc3XRp-WEcoO-RxTASls.cache} +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/wZ/wZ0ALwHNZctvL4oikOtK5ZgTaBqFADb6scXaXjRGnzg.cache +1 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/xY/xYS0jeJMWjdvv2rhUmK2NWvRYx51t9zJQC31JW7SuOE.cache +2 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/yt/ytNmOXX5w9z_7WDwpxuKls7UhKWzz8w1aYLF0WQ-NC4.cache +0 -0
- metadata +89 -139
- data/test/apps/rails4/app/assets/config/manifest.js +0 -3
- data/test/apps/rails4/app/assets/javascripts/cable.js +0 -13
- data/test/apps/rails4/app/channels/application_cable/channel.rb +0 -4
- data/test/apps/rails4/app/channels/application_cable/connection.rb +0 -4
- data/test/apps/rails4/app/jobs/application_job.rb +0 -2
- data/test/apps/rails4/app/mailers/application_mailer.rb +0 -4
- data/test/apps/rails4/app/views/layouts/mailer.html.erb +0 -13
- data/test/apps/rails4/app/views/layouts/mailer.text.erb +0 -1
- data/test/apps/rails4/bin/update +0 -29
- data/test/apps/rails4/config/cable.yml +0 -9
- data/test/apps/rails4/config/initializers/application_controller_renderer.rb +0 -6
- data/test/apps/rails4/config/initializers/new_framework_defaults.rb +0 -21
- data/test/apps/rails4/config/puma.rb +0 -47
- data/test/apps/rails4/config/spring.rb +0 -6
- data/test/apps/rails4/public/apple-touch-icon-precomposed.png +0 -0
- data/test/apps/rails4/public/apple-touch-icon.png +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/0I/0Ihy3SE8nTe---ZtfB9WjKd6UOgmtLFlyhbw1R2BDFs.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/17/17ACx-zXgzaAZBriGH5oeRJJ9hMIlwP9bWBPlEMoY-0.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/8i/8iQwPHnNGnDGUJBtgrVMB7FceEuaXnCBF1671S9jJgo.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/B6/B6nLb8yGukrJQUpa3aPtLwrmBPnh2_8ZFkSTc5T8c0k.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Bj/BjttQ669rtLFSU4Oq7YxTtumvpgsHKREjOND3HIVJx8.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Bx/BxzoG0KxeNLac4xTNeJv3qfeytbNBw58xj2zD-xdbrE.cache +0 -2
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/C3/C3hMQl1ywl9gQ3OFdiiVc8l1y2gP7GWN37t9DDEaoy4.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/FT/FTiuNlnEJN59jNEEgEfQazsLhj_YTdIQnCuFC2EM7qw.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/K9/K9G8c-hzp4a8xRtPMnSQf6bsziHMznJz-OvHDz7w3rE.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Kq/KqsxRPBMXWQubUa9Ab4tmgT4j4DM5-A89_rh15MNlmI.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Kz/KznX4kBl2yjCE-XZL5bNAJ0xXrLVL6nJEJWMYLY3X7I.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/QH/QHW6bVAXmJeybTQiApxxYej1wQkNigo-KRbnXDwd1Mk.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/R7/R7bSW7yrMkNVznGUpcDS6MXM3ZziGA7RrQGogNiuVTA.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/RH/RHIJ8umE9bWwt5xXi8SJ4RYpZqFvt88JBVNo4lTPg0U.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Rt/Rtg9DogJyyU6DIW9gV2GCVTWMF0GYLevAVNvv3bEDeI.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/S3/S3OZbpxIypECjqQj77Gb9Oc6A-q0U1fKpzMbPVMoubk.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Vw/Vwgy4zAZLGHF9RslYQ40wbF7NYW47NDE0wcA7T3HwxI.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/W9/W9OEjda3McVaqzRMNGzY4zMzGFKwy-JYer2dt7dxRjQ.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/Ya/YayMISAqD-Y3vBFywwKrXbUovGf5o77HUF5s8mnQgO0.cache +0 -2
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/cc/ccFbs28DWObwrW_wnGA4cU9RmsKrBzb5xDaMu1-5QOo.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/d8/d80_M7rvPV-A1sCjIEhieR5jS353S0hCykiWL6Qoy7Q.cache +0 -3
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/gl/glrAgaE6JUHFNGuQsy5qakLJ2Sjmq-O09QX7cJklxP4.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/jt/jtP0R1pGResPYdA6O4Ph5x0W0T1If9yb0sRFijAemLY.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/mX/mXbxFiGMdcA3j1srHRMPEBxhXw8udKgsNtXk6_Zl5ts.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/nf/nfIObnkUaxVC6zkWxRI2Mzau2JKMWf2ii3dr0Q0IvNk.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/u3/u3DEuOZf5FZ_vumprxhkeIsi2jzeDJRxtjYbqNJ13wQ.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/u_/u_yfB9bAyTK1suTw3FxVxx4Lv0U31dIL1G0uX9R9byU.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/vH/vHuuPjMkmfpQ2eqHofMJprX6McDX-BRf-OZLe-Zy0uM.cache +0 -0
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/wq/wqEwEzqpIhD5Ie3bMy9VSp3TZI4lqTUROqfAYdpO83g.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/x7/x7PYh8DJvPykcEqpVab2vcY9-GFz-3cqtoMlRAu94Uc.cache +0 -2
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/yZ/yZz4rIdiAxAUWJ7Io7t9ZdVN8fjEjgzn8MfNKrBdIR0.cache +0 -1
- data/test/apps/rails4/tmp/cache/assets/sprockets/v3.0/zQ/zQ9ej9LKS_XIns0yfDEKXZaCGO7n1sA2dRjIsPO9Krg.cache +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
class Post <
|
|
1
|
+
class Post < ApplicationGroongaRecord
|
|
2
2
|
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<head>
|
|
4
|
+
<title>Blog</title>
|
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
|
7
|
+
<%= csrf_meta_tags %>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
|
9
|
-
</head>
|
|
11
|
+
<%= yield %>
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
<%= yield %>
|
|
13
|
-
</body>
|
|
13
|
+
</body>
|
|
14
14
|
</html>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<%= form_for(post) do |f| %>
|
|
2
|
-
<% if post.errors.any? %>
|
|
1
|
+
<%= form_for(@post) do |f| %>
|
|
2
|
+
<% if @post.errors.any? %>
|
|
3
3
|
<div id="error_explanation">
|
|
4
|
-
<h2><%= pluralize(post.errors.count, "error") %> prohibited this post from being saved:</h2>
|
|
4
|
+
<h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2>
|
|
5
5
|
|
|
6
6
|
<ul>
|
|
7
|
-
<% post.errors.full_messages.each do |message| %>
|
|
7
|
+
<% @post.errors.full_messages.each do |message| %>
|
|
8
8
|
<li><%= message %></li>
|
|
9
9
|
<% end %>
|
|
10
10
|
</ul>
|
|
@@ -12,15 +12,13 @@
|
|
|
12
12
|
<% end %>
|
|
13
13
|
|
|
14
14
|
<div class="field">
|
|
15
|
-
<%= f.label :title
|
|
15
|
+
<%= f.label :title %><br>
|
|
16
16
|
<%= f.text_field :title %>
|
|
17
17
|
</div>
|
|
18
|
-
|
|
19
18
|
<div class="field">
|
|
20
|
-
<%= f.label :body
|
|
19
|
+
<%= f.label :body %><br>
|
|
21
20
|
<%= f.text_area :body %>
|
|
22
21
|
</div>
|
|
23
|
-
|
|
24
22
|
<div class="actions">
|
|
25
23
|
<%= f.submit %>
|
|
26
24
|
</div>
|
data/test/apps/rails4/bin/rails
CHANGED
|
@@ -4,6 +4,6 @@ begin
|
|
|
4
4
|
rescue LoadError => e
|
|
5
5
|
raise unless e.message.include?('spring')
|
|
6
6
|
end
|
|
7
|
-
APP_PATH = File.expand_path('
|
|
7
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
|
8
8
|
require_relative '../config/boot'
|
|
9
9
|
require 'rails/commands'
|
data/test/apps/rails4/bin/setup
CHANGED
|
@@ -1,34 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
require 'pathname'
|
|
3
|
-
require 'fileutils'
|
|
4
|
-
include FileUtils
|
|
5
3
|
|
|
6
4
|
# path to your application root.
|
|
7
|
-
APP_ROOT = Pathname.new File.expand_path('../../',
|
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
system(*args) || abort("\n== Command #{args} failed ==")
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
chdir APP_ROOT do
|
|
7
|
+
Dir.chdir APP_ROOT do
|
|
14
8
|
# This script is a starting point to setup your application.
|
|
15
|
-
# Add necessary setup steps to this file
|
|
9
|
+
# Add necessary setup steps to this file:
|
|
16
10
|
|
|
17
|
-
puts
|
|
18
|
-
system
|
|
19
|
-
system
|
|
11
|
+
puts "== Installing dependencies =="
|
|
12
|
+
system "gem install bundler --conservative"
|
|
13
|
+
system "bundle check || bundle install"
|
|
20
14
|
|
|
21
15
|
# puts "\n== Copying sample files =="
|
|
22
|
-
# unless File.exist?(
|
|
23
|
-
# cp
|
|
16
|
+
# unless File.exist?("config/database.yml")
|
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
|
24
18
|
# end
|
|
25
19
|
|
|
26
20
|
puts "\n== Preparing database =="
|
|
27
|
-
system
|
|
21
|
+
system "bin/rake db:setup"
|
|
28
22
|
|
|
29
23
|
puts "\n== Removing old logs and tempfiles =="
|
|
30
|
-
system
|
|
24
|
+
system "rm -f log/*"
|
|
25
|
+
system "rm -rf tmp/cache"
|
|
31
26
|
|
|
32
27
|
puts "\n== Restarting application server =="
|
|
33
|
-
system
|
|
28
|
+
system "touch tmp/restart.txt"
|
|
34
29
|
end
|
data/test/apps/rails4/bin/spring
CHANGED
|
@@ -8,7 +8,8 @@ unless defined?(Spring)
|
|
|
8
8
|
require 'bundler'
|
|
9
9
|
|
|
10
10
|
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
|
11
|
-
|
|
11
|
+
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
|
12
|
+
if spring
|
|
12
13
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
|
13
14
|
gem 'spring', spring.version
|
|
14
15
|
require 'spring/binstub'
|
data/test/apps/rails4/config.ru
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
|
2
2
|
|
|
3
3
|
require "rails"
|
|
4
4
|
# Pick the frameworks you want:
|
|
@@ -8,7 +8,6 @@ require "active_job/railtie"
|
|
|
8
8
|
require "action_controller/railtie"
|
|
9
9
|
require "action_mailer/railtie"
|
|
10
10
|
require "action_view/railtie"
|
|
11
|
-
require "action_cable/engine"
|
|
12
11
|
require "sprockets/railtie"
|
|
13
12
|
require "rails/test_unit/railtie"
|
|
14
13
|
|
|
@@ -21,5 +20,13 @@ module Blog
|
|
|
21
20
|
# Settings in config/environments/* take precedence over those specified here.
|
|
22
21
|
# Application configuration should go into files in config/initializers
|
|
23
22
|
# -- all .rb files in that directory are automatically loaded.
|
|
23
|
+
|
|
24
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
25
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
26
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
|
27
|
+
|
|
28
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
29
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
30
|
+
# config.i18n.default_locale = :de
|
|
24
31
|
end
|
|
25
32
|
end
|
|
@@ -9,28 +9,13 @@ Rails.application.configure do
|
|
|
9
9
|
# Do not eager load code on boot.
|
|
10
10
|
config.eager_load = false
|
|
11
11
|
|
|
12
|
-
# Show full error reports.
|
|
13
|
-
config.consider_all_requests_local
|
|
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
|
|
12
|
+
# Show full error reports and disable caching.
|
|
13
|
+
config.consider_all_requests_local = true
|
|
14
|
+
config.action_controller.perform_caching = false
|
|
28
15
|
|
|
29
16
|
# Don't care if the mailer can't send.
|
|
30
17
|
config.action_mailer.raise_delivery_errors = false
|
|
31
18
|
|
|
32
|
-
config.action_mailer.perform_caching = false
|
|
33
|
-
|
|
34
19
|
# Print deprecation notices to the Rails logger.
|
|
35
20
|
config.active_support.deprecation = :log
|
|
36
21
|
|
|
@@ -39,13 +24,15 @@ Rails.application.configure do
|
|
|
39
24
|
# number of complex assets.
|
|
40
25
|
config.assets.debug = true
|
|
41
26
|
|
|
42
|
-
#
|
|
43
|
-
|
|
27
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
|
28
|
+
# yet still be able to expire them through the digest params.
|
|
29
|
+
config.assets.digest = true
|
|
30
|
+
|
|
31
|
+
# Adds additional error checking when serving assets at runtime.
|
|
32
|
+
# Checks for improperly declared sprockets dependencies.
|
|
33
|
+
# Raises helpful error messages.
|
|
34
|
+
config.assets.raise_runtime_errors = true
|
|
44
35
|
|
|
45
36
|
# Raises error for missing translations
|
|
46
37
|
# 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
38
|
end
|
|
@@ -14,9 +14,15 @@ Rails.application.configure do
|
|
|
14
14
|
config.consider_all_requests_local = false
|
|
15
15
|
config.action_controller.perform_caching = true
|
|
16
16
|
|
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like
|
|
20
|
+
# NGINX, varnish or squid.
|
|
21
|
+
# config.action_dispatch.rack_cache = true
|
|
22
|
+
|
|
17
23
|
# Disable serving static files from the `/public` folder by default since
|
|
18
24
|
# Apache or NGINX already handles this.
|
|
19
|
-
config.
|
|
25
|
+
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
|
20
26
|
|
|
21
27
|
# Compress JavaScripts and CSS.
|
|
22
28
|
config.assets.js_compressor = :uglifier
|
|
@@ -25,20 +31,16 @@ Rails.application.configure do
|
|
|
25
31
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
|
26
32
|
config.assets.compile = false
|
|
27
33
|
|
|
28
|
-
#
|
|
34
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
|
35
|
+
# yet still be able to expire them through the digest params.
|
|
36
|
+
config.assets.digest = true
|
|
29
37
|
|
|
30
|
-
#
|
|
31
|
-
# config.action_controller.asset_host = 'http://assets.example.com'
|
|
38
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
|
32
39
|
|
|
33
40
|
# Specifies the header that your server uses for sending files.
|
|
34
41
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
|
35
42
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
|
36
43
|
|
|
37
|
-
# Mount Action Cable outside main process or domain
|
|
38
|
-
# config.action_cable.mount_path = nil
|
|
39
|
-
# config.action_cable.url = 'wss://example.com/cable'
|
|
40
|
-
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
|
41
|
-
|
|
42
44
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
|
43
45
|
# config.force_ssl = true
|
|
44
46
|
|
|
@@ -47,15 +49,16 @@ Rails.application.configure do
|
|
|
47
49
|
config.log_level = :debug
|
|
48
50
|
|
|
49
51
|
# Prepend all log lines with the following tags.
|
|
50
|
-
config.log_tags = [ :
|
|
52
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
|
53
|
+
|
|
54
|
+
# Use a different logger for distributed setups.
|
|
55
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
|
51
56
|
|
|
52
57
|
# Use a different cache store in production.
|
|
53
58
|
# config.cache_store = :mem_cache_store
|
|
54
59
|
|
|
55
|
-
#
|
|
56
|
-
# config.
|
|
57
|
-
# config.active_job.queue_name_prefix = "blog_#{Rails.env}"
|
|
58
|
-
config.action_mailer.perform_caching = false
|
|
60
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
|
61
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
|
59
62
|
|
|
60
63
|
# Ignore bad email addresses and do not raise email delivery errors.
|
|
61
64
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
|
@@ -70,14 +73,4 @@ Rails.application.configure do
|
|
|
70
73
|
|
|
71
74
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
|
72
75
|
config.log_formatter = ::Logger::Formatter.new
|
|
73
|
-
|
|
74
|
-
# Use a different logger for distributed setups.
|
|
75
|
-
# require 'syslog/logger'
|
|
76
|
-
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
|
77
|
-
|
|
78
|
-
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
|
79
|
-
logger = ActiveSupport::Logger.new(STDOUT)
|
|
80
|
-
logger.formatter = config.log_formatter
|
|
81
|
-
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
|
82
|
-
end
|
|
83
76
|
end
|
|
@@ -12,11 +12,9 @@ Rails.application.configure do
|
|
|
12
12
|
# preloads Rails for running tests, you may have to set it to true.
|
|
13
13
|
config.eager_load = false
|
|
14
14
|
|
|
15
|
-
# Configure
|
|
16
|
-
config.
|
|
17
|
-
config.
|
|
18
|
-
'Cache-Control' => 'public, max-age=3600'
|
|
19
|
-
}
|
|
15
|
+
# Configure static file server for tests with Cache-Control for performance.
|
|
16
|
+
config.serve_static_files = true
|
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
|
20
18
|
|
|
21
19
|
# Show full error reports and disable caching.
|
|
22
20
|
config.consider_all_requests_local = true
|
|
@@ -27,13 +25,15 @@ Rails.application.configure do
|
|
|
27
25
|
|
|
28
26
|
# Disable request forgery protection in test environment.
|
|
29
27
|
config.action_controller.allow_forgery_protection = false
|
|
30
|
-
config.action_mailer.perform_caching = false
|
|
31
28
|
|
|
32
29
|
# Tell Action Mailer not to deliver emails to the real world.
|
|
33
30
|
# The :test delivery method accumulates sent emails in the
|
|
34
31
|
# ActionMailer::Base.deliveries array.
|
|
35
32
|
config.action_mailer.delivery_method = :test
|
|
36
33
|
|
|
34
|
+
# Randomize the order test cases are executed.
|
|
35
|
+
config.active_support.test_order = :random
|
|
36
|
+
|
|
37
37
|
# Print deprecation notices to the stderr.
|
|
38
38
|
config.active_support.deprecation = :stderr
|
|
39
39
|
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
+
default: &default
|
|
2
|
+
url: http://127.0.0.1:10041/
|
|
3
|
+
# url: https://127.0.0.1:10041/
|
|
4
|
+
# protocol: http
|
|
5
|
+
# host: 127.0.0.1
|
|
6
|
+
# port: 10041
|
|
7
|
+
# user: alice
|
|
8
|
+
# password: secret
|
|
9
|
+
read_timeout: -1
|
|
10
|
+
# read_timeout: 3
|
|
11
|
+
backend: synchronous
|
|
12
|
+
|
|
1
13
|
development:
|
|
2
|
-
|
|
14
|
+
<<: *default
|
|
3
15
|
|
|
4
16
|
test:
|
|
5
|
-
|
|
17
|
+
<<: *default
|
|
18
|
+
url: http://127.0.0.1:20041/
|
|
6
19
|
|
|
7
20
|
production:
|
|
8
|
-
|
|
21
|
+
<<: *default
|
|
22
|
+
# url: http://production.example.com:10041/
|
|
23
|
+
read_timeout: 10
|
|
@@ -1,4 +1,57 @@
|
|
|
1
1
|
Rails.application.routes.draw do
|
|
2
2
|
resources :posts
|
|
3
|
-
#
|
|
3
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
|
4
|
+
# See how all your routes lay out with "rake routes".
|
|
5
|
+
|
|
6
|
+
# You can have the root of your site routed with "root"
|
|
7
|
+
# root 'welcome#index'
|
|
8
|
+
|
|
9
|
+
# Example of regular route:
|
|
10
|
+
# get 'products/:id' => 'catalog#view'
|
|
11
|
+
|
|
12
|
+
# Example of named route that can be invoked with purchase_url(id: product.id)
|
|
13
|
+
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
|
14
|
+
|
|
15
|
+
# Example resource route (maps HTTP verbs to controller actions automatically):
|
|
16
|
+
# resources :products
|
|
17
|
+
|
|
18
|
+
# Example resource route with options:
|
|
19
|
+
# resources :products do
|
|
20
|
+
# member do
|
|
21
|
+
# get 'short'
|
|
22
|
+
# post 'toggle'
|
|
23
|
+
# end
|
|
24
|
+
#
|
|
25
|
+
# collection do
|
|
26
|
+
# get 'sold'
|
|
27
|
+
# end
|
|
28
|
+
# end
|
|
29
|
+
|
|
30
|
+
# Example resource route with sub-resources:
|
|
31
|
+
# resources :products do
|
|
32
|
+
# resources :comments, :sales
|
|
33
|
+
# resource :seller
|
|
34
|
+
# end
|
|
35
|
+
|
|
36
|
+
# Example resource route with more complex sub-resources:
|
|
37
|
+
# resources :products do
|
|
38
|
+
# resources :comments
|
|
39
|
+
# resources :sales do
|
|
40
|
+
# get 'recent', on: :collection
|
|
41
|
+
# end
|
|
42
|
+
# end
|
|
43
|
+
|
|
44
|
+
# Example resource route with concerns:
|
|
45
|
+
# concern :toggleable do
|
|
46
|
+
# post 'toggle'
|
|
47
|
+
# end
|
|
48
|
+
# resources :posts, concerns: :toggleable
|
|
49
|
+
# resources :photos, concerns: :toggleable
|
|
50
|
+
|
|
51
|
+
# Example resource route within a namespace:
|
|
52
|
+
# namespace :admin do
|
|
53
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
|
54
|
+
# # (app/controllers/admin/products_controller.rb)
|
|
55
|
+
# resources :products
|
|
56
|
+
# end
|
|
4
57
|
end
|