delayed-web 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/delayed/web/application.css +8 -0
  3. data/app/controllers/delayed/web/jobs_controller.rb +5 -3
  4. data/app/views/delayed/web/jobs/index.html.erb +21 -15
  5. data/app/views/delayed/web/jobs/show.html.erb +16 -7
  6. data/app/views/layouts/delayed/web/application.html.erb +2 -2
  7. data/config/locales/en.yml +28 -0
  8. data/config/locales/fr.yml +38 -0
  9. data/lib/delayed/web/version.rb +1 -1
  10. data/spec/decorators/status_decorator_spec.rb +6 -6
  11. data/spec/dummy/{README.rdoc → README.md} +1 -5
  12. data/spec/dummy/Rakefile +2 -2
  13. data/spec/dummy/app/assets/config/manifest.js +3 -0
  14. data/spec/dummy/app/assets/javascripts/application.js +4 -4
  15. data/spec/dummy/app/assets/javascripts/cable.js +13 -0
  16. data/spec/dummy/app/assets/stylesheets/application.css +6 -4
  17. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  18. data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
  19. data/spec/dummy/app/controllers/application_controller.rb +0 -2
  20. data/spec/dummy/app/jobs/application_job.rb +2 -0
  21. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  22. data/spec/dummy/app/models/application_record.rb +3 -0
  23. data/spec/dummy/app/views/layouts/application.html.erb +9 -9
  24. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  25. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  26. data/spec/dummy/bin/rails +6 -1
  27. data/spec/dummy/bin/rake +5 -0
  28. data/spec/dummy/bin/setup +34 -0
  29. data/spec/dummy/bin/spring +16 -0
  30. data/spec/dummy/bin/update +29 -0
  31. data/spec/dummy/config/application.rb +3 -10
  32. data/spec/dummy/config/boot.rb +2 -4
  33. data/spec/dummy/config/cable.yml +9 -0
  34. data/spec/dummy/config/database.yml +8 -8
  35. data/spec/dummy/config/environment.rb +4 -4
  36. data/spec/dummy/config/environments/development.rb +30 -5
  37. data/spec/dummy/config/environments/production.rb +37 -31
  38. data/spec/dummy/config/environments/test.rb +10 -4
  39. data/spec/dummy/config/initializers/application_controller_renderer.rb +6 -0
  40. data/spec/dummy/config/initializers/assets.rb +11 -0
  41. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  42. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  43. data/spec/dummy/config/initializers/new_framework_defaults.rb +24 -0
  44. data/spec/dummy/config/initializers/session_store.rb +1 -1
  45. data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
  46. data/spec/dummy/config/puma.rb +47 -0
  47. data/spec/dummy/config/routes.rb +1 -1
  48. data/spec/dummy/config/secrets.yml +22 -0
  49. data/spec/dummy/config/spring.rb +6 -0
  50. data/spec/dummy/config.ru +2 -1
  51. data/spec/dummy/db/seeds.rb +7 -0
  52. data/spec/dummy/db/test.sqlite3 +0 -0
  53. data/spec/dummy/log/test.log +204 -822
  54. data/spec/dummy/public/404.html +20 -11
  55. data/spec/dummy/public/422.html +20 -11
  56. data/spec/dummy/public/500.html +19 -10
  57. data/spec/dummy/{db/development.sqlite3 → public/apple-touch-icon-precomposed.png} +0 -0
  58. data/spec/dummy/public/apple-touch-icon.png +0 -0
  59. data/spec/dummy/public/robots.txt +5 -0
  60. data/spec/dummy/test/test_helper.rb +10 -0
  61. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3C/3Cv7jqr37B61r7fqwxWvd--aHzAB16IMAayHCdzN1_g.cache +1 -0
  62. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3P/3PKL-ltD66Q5Y9oZm0JIpPFHZf75lkBmlVbk9n7WR6I.cache +1 -0
  63. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4m/4mhHV_JRYhfjwQYZFG20cAO2Yv8z7cdZoRUlJ6owO1c.cache +0 -0
  64. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5K/5KFS8PXte6qspqZGq4Ik9agJScJc_Ys1g-ixefnltcI.cache +0 -0
  65. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6P/6PAdvLeS3DeB7LpcsFOb87bJzAYrddbvfuIAEqHxRr4.cache +0 -0
  66. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8a/8a72QeNpJHbPUCGphl4N1wW0kFxMWXllo-u2nvciz74.cache +1 -0
  67. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8j/8jv9XEWjObSlnBUb83DYk5lPSXy9JzGTdFjKmd_pOnw.cache +1 -0
  68. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/91/91TzEwUN0SsFLD2vmfQyv29OYasnYot7CrpPBeEOX44.cache +1 -0
  69. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/94/949JQGJfq12pGFPu4fF-q9Te6Wk7V2j7ksBgcFuUR8I.cache +1 -0
  70. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AU/AUA3gS85bXpXsnslrgEO60kZzw3QKiEvPj34pmZZG6E.cache +1 -0
  71. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ad/AdJT67m6XBdSd7gC1pokRugFBHboZeqqq3OYQ5dYWT0.cache +1 -0
  72. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/DX/DXG2b6gB-WaBv4wQGJdCQE__iNE63UVYxyNtcrAjCcU.cache +1 -0
  73. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EW/EWoZeSbkURZ54Y5Szrj-sukzpD0HjCfzr0yrIeRePvo.cache +1 -0
  74. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/G5/G5-q7OsLYbfvD0s5M7s-KRg1SJnT2UzSkK2FNC9Q5VU.cache +1 -0
  75. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gf/Gf0OYI2tDZrbozlwEYLC-iCsHnDbisQ0Y1xEY_wLHQg.cache +0 -0
  76. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gn/Gn35l7xQ2vua3ieNdDqribJzx-BEva4QVF98P0ob8ZA.cache +2 -0
  77. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/K1/K1EkTPTNoxu6eLQ9AN3rQGQAbFnopRlTn0J5o445eRA.cache +1 -0
  78. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KV/KVFOaVBVhJVQbMX6IXvE_1j6DLu6yKCfbB4FxcjP6R8.cache +0 -0
  79. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/P8/P8th7LiaH7S2vrLaIeLVGNk_T8iXKzaccxkFW3CQAGc.cache +1 -0
  80. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QK/QK67I6WH5soH3-BepjA7XSImEsgSqMD4zXIgLLE2JMg.cache +1 -0
  81. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QU/QUUCKuphTk6YAxxBa8_Kz0dYMxZU6P4dVIOBBaO4NMk.cache +1 -0
  82. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QU/qUbGTe7jKhaorvxbqTXqKH45QNuaVWB1vZbQEwsOiR4.cache +0 -0
  83. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Rt/Rtpca6uY4Rs6zFrYCDsauwhzEs_P4gIvxIv2UMNrRxY.cache +1 -0
  84. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Z-/Z-TJQeNfTEJ8EDXao6Nxlz48PZmi_xoRWfhfnGQ0NYU.cache +1 -0
  85. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ZB/ZBE8xH4uyHFRIJCj8LdXoNrTIjtnztMPZ7rcdqezogQ.cache +1 -0
  86. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_a/_akHKvx-uMH9FmNErU3Vi5XcLCo7CJfh5rjcQNydnS8.cache +0 -0
  87. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aA/aAFx5TVwQU6iAk-JG8h_O5ngRr68qAsIwubnXKaIJGc.cache +0 -0
  88. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aN/aNkMF8-xMh15Ab2-7tWDMjNhj6r6XEZmP5Jdhc8eAfw.cache +0 -0
  89. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ac/acIRZ_z48FdcAOlRAylyzdhcgpuOJGM9wchBfM56JUA.cache +1 -0
  90. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/az/azfjRgUybqVDwF2ot0VTGjDu55lsxZ1KypkR4OAaBZ0.cache +1 -0
  91. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/b_/b_Itlk9QZZd7Rvf8kcA4yLP1R5Acu7jB-m1xQiSU0qE.cache +2 -0
  92. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cC/cCsxPpl4UrSeT4eOvOCA1uc6Hv8O32h1FEbOT_Xyhic.cache +1 -0
  93. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eD/eD607zCIXcfyfzbBeuX-wWEWCsXHjGZlwSLjAfIZLN0.cache +1 -0
  94. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ej/ejS4QGmrI1_b-NTpODzgZDNC1VeMqcWVUFwMmkYUJUM.cache +1 -0
  95. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fN/fN3kKJby4MjN6bpexF6d-ldfTY7mcNfMdGZcLPHQTQ0.cache +3 -0
  96. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fQ/fQeT1Xd0PzU7h5vFqcc2dgxx0-zzNtUOQ0vxvO6p-Tw.cache +0 -0
  97. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/h1/h1GU-0qeLya2pEHQgSzKD2IdYVhQLKu6VUJtByhHrZs.cache +0 -0
  98. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iY/iYCcSDP0P68F8YrSBfhw2CtXelF6ro1TBe8K38pJQmg.cache +1 -0
  99. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iq/iqzznIUPx7d7xkHjvH-OeZYqYPkQejSVuSY2OS0nt7I.cache +1 -0
  100. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ko/koHIVW7nx6NcIhPHn4z4VvmxCeqTZ3jsK0IdQJ1kcQM.cache +3 -0
  101. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lu/lu0ZeR4Y_5i0x6PunBsAggQQ0aRHCEP5JHAYfsi-QhY.cache +1 -0
  102. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lw/lwVgPtoEth0lVl-y7I4DEbAWHOneHZIoWd-b6F-4uNI.cache +2 -0
  103. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mO/mOObwfzdWhe0bB5sTXGPgimY8gUaCeZ3156FVFXhEPU.cache +1 -0
  104. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mX/mX1nlsL_SWOB4y22W5FheRX0YEONKyOY7xUeIvRiHco.cache +2 -0
  105. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +2 -0
  106. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +2 -0
  107. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oL/oLLF47_uZUr5PdnW7vWe5QNl6znWtaOcEWcLoaG3HLs.cache +1 -0
  108. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/od/odsKjb-ExbptlIaMkig5R2IwpYE0Xi29khsuiUpaAXs.cache +2 -0
  109. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qs/qsTlkHl28VeA8BaZfNY_vDzzVNoADIYzzcnIHUMqElQ.cache +1 -0
  110. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tF/tF9Dus_YFZMQCCuTOy40qRSzaxECyYo5TJjliTX_jCg.cache +1 -0
  111. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ta/taYjIR014qAQkTP5H0sSSDX974Xnd2isdO_7-6RnCwA.cache +1 -0
  112. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uc/uc7KL4vaO-70xczRU2iUQlCjFly9Ke-JBSGN1Cki1B4.cache +1 -0
  113. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/x7/x7PYh8DJvPykcEqpVab2vcY9-GFz-3cqtoMlRAu94Uc.cache +2 -0
  114. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xk/xkcbBc6Oe3RRvbySLku4lbT0q5k4EubOm2sJgtty-m4.cache +1 -0
  115. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yS/ySAKuC_inmnTJ4KWuPxtM0se8oxcbNlkMkLonCLCZyQ.cache +1 -0
  116. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yt/ytXZWiu2SP7inmw-oivEai4Ge9MrBLWwOk-zNBXPW7s.cache +1 -0
  117. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zC/zCpLCebmg1K8c35pbk4t5MWrNjY5Uqjzl-KD6XnfjR8.cache +2 -0
  118. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zz/zzIb-k4QN9TihbTa7_ky3UStcVAeCVv4xcQuObZaZlY.cache +1 -0
  119. data/spec/helpers/jobs_helper_spec.rb +1 -1
  120. data/spec/spec_helper.rb +0 -1
  121. metadata +175 -98
  122. data/spec/dummy/config/initializers/secret_token.rb +0 -12
  123. data/spec/dummy/log/development.log +0 -32486
  124. data/spec/dummy/tmp/cache/assets/development/sprockets/0332f562ff3e30cda56eb6010d3d4952 +0 -0
  125. data/spec/dummy/tmp/cache/assets/development/sprockets/075cd664f24b531d19fa91317ef97eec +0 -0
  126. data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  127. data/spec/dummy/tmp/cache/assets/development/sprockets/14530c1c82b7977b9d8c442d5954a6b1 +0 -0
  128. data/spec/dummy/tmp/cache/assets/development/sprockets/209d539bd215846261a8891dd525ec4a +0 -0
  129. data/spec/dummy/tmp/cache/assets/development/sprockets/2b6d7fa94bd05e45215f128721db34e3 +0 -0
  130. data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  131. data/spec/dummy/tmp/cache/assets/development/sprockets/342153d354456f6627073c2b6271db5a +0 -0
  132. data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  133. data/spec/dummy/tmp/cache/assets/development/sprockets/3c9123c2b52806585f33904c0f3111b0 +0 -0
  134. data/spec/dummy/tmp/cache/assets/development/sprockets/4db6b13287795e859f19978360c1fd0e +0 -0
  135. data/spec/dummy/tmp/cache/assets/development/sprockets/5469cff1c301f3271083dfef71ab1794 +0 -0
  136. data/spec/dummy/tmp/cache/assets/development/sprockets/7437b83a2bf92170949593c06096d785 +0 -0
  137. data/spec/dummy/tmp/cache/assets/development/sprockets/8fa08b833277f69ba9c690fccd8f5702 +0 -0
  138. data/spec/dummy/tmp/cache/assets/development/sprockets/a44209b0d8d5c66ceeef04dacbc7cf1b +0 -0
  139. data/spec/dummy/tmp/cache/assets/development/sprockets/a5108c801777656bd9063abb9849ad55 +0 -0
  140. data/spec/dummy/tmp/cache/assets/development/sprockets/ad4f58431d190a3f58b681aa163b5979 +0 -0
  141. data/spec/dummy/tmp/cache/assets/development/sprockets/ae02292af637b0ca9807b59076a87282 +0 -0
  142. data/spec/dummy/tmp/cache/assets/development/sprockets/b6232d3fa8288b4d714ae250bf4e7acc +0 -0
  143. data/spec/dummy/tmp/cache/assets/development/sprockets/ba98100d11384e930583f1385f48a94b +0 -0
  144. data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  145. data/spec/dummy/tmp/cache/assets/development/sprockets/d6e1313228ec89666a543b748171f6b6 +0 -0
  146. data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  147. data/spec/dummy/tmp/cache/assets/development/sprockets/d8f3c4e12078655828fafa63ef446a2e +0 -0
  148. data/spec/dummy/tmp/cache/assets/development/sprockets/e7905ee7f75f526588d5bed6996c2cde +0 -0
  149. data/spec/dummy/tmp/cache/assets/development/sprockets/ea9a9e3e949584a04377ce58b2fd61b6 +0 -0
  150. data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  151. data/spec/dummy/tmp/cache/assets/test/sprockets/14530c1c82b7977b9d8c442d5954a6b1 +0 -0
  152. data/spec/dummy/tmp/cache/assets/test/sprockets/209d539bd215846261a8891dd525ec4a +0 -0
  153. data/spec/dummy/tmp/cache/assets/test/sprockets/2b6d7fa94bd05e45215f128721db34e3 +0 -0
  154. data/spec/dummy/tmp/cache/assets/test/sprockets/3c9123c2b52806585f33904c0f3111b0 +0 -0
  155. data/spec/dummy/tmp/cache/assets/test/sprockets/4db6b13287795e859f19978360c1fd0e +0 -0
  156. data/spec/dummy/tmp/cache/assets/test/sprockets/7437b83a2bf92170949593c06096d785 +0 -0
  157. data/spec/dummy/tmp/cache/assets/test/sprockets/8fa08b833277f69ba9c690fccd8f5702 +0 -0
  158. data/spec/dummy/tmp/cache/assets/test/sprockets/a44209b0d8d5c66ceeef04dacbc7cf1b +0 -0
  159. data/spec/dummy/tmp/cache/assets/test/sprockets/ad4f58431d190a3f58b681aa163b5979 +0 -0
  160. data/spec/dummy/tmp/cache/assets/test/sprockets/ae02292af637b0ca9807b59076a87282 +0 -0
  161. data/spec/dummy/tmp/cache/assets/test/sprockets/b6232d3fa8288b4d714ae250bf4e7acc +0 -0
  162. data/spec/dummy/tmp/cache/assets/test/sprockets/d6e1313228ec89666a543b748171f6b6 +0 -0
  163. data/spec/dummy/tmp/cache/assets/test/sprockets/d8f3c4e12078655828fafa63ef446a2e +0 -0
  164. data/spec/dummy/tmp/cache/assets/test/sprockets/e7905ee7f75f526588d5bed6996c2cde +0 -0
  165. data/spec/dummy/tmp/cache/assets/test/sprockets/ea9a9e3e949584a04377ce58b2fd61b6 +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25fdde762215849db97a0b7c9c9659b745e3730d
4
- data.tar.gz: 3d9990884c2f2744642df00bb5feb8d0c8e14f98
3
+ metadata.gz: fa85d14efbf1c6206da15004e441fee6861f9ab5
4
+ data.tar.gz: c40e89fbc4985325ef4a1461b02e9b7c5efaa9c7
5
5
  SHA512:
6
- metadata.gz: 82fb6099411dbef3f5558132e5eec9f9dae1665abe248020c7b8d19b4f2b4eca79e27cf8a680b118647be92208384a538a84574262d63a8a9d02ad82d5778cd6
7
- data.tar.gz: 39c33b77dec932a4d189fad3ecf0b44784ff70a8bf3523630a7bbba3d77ed0b55b77a45fc0ea659eba7cc0413488c05e110dc4949fa03467fcedf2f19d1aa9ca
6
+ metadata.gz: 8a7b8e47ac5f8036391e38ebbe3c3fcfc636916d799fab0f359e115de36a8538db6956cbddd4738a9477ae0b20d80c8c9479c201e879f9e12b1a72808cb0354a
7
+ data.tar.gz: cf7c5e28b9bb91619355ff410f843dfc8018aa0aca697fdf79df90780dc71009f4f2816461877eadd20142d41d2f359a4b1aa39f7cddcd0586049c43be7856fd
@@ -33,3 +33,11 @@
33
33
  margin-top: 20px;
34
34
  margin-bottom: 20px;
35
35
  }
36
+
37
+ /* Base style to use text-overflow */
38
+ .btn-action {
39
+ overflow: hidden;
40
+ white-space: nowrap;
41
+ text-overflow: ellipsis;
42
+ width: 65px !important;
43
+ }
@@ -6,7 +6,8 @@ module Delayed
6
6
  job.queue!
7
7
  flash[:notice] = t(:notice, scope: 'delayed/web.flashes.jobs.queued')
8
8
  else
9
- flash[:alert] = t(:alert, scope: 'delayed/web.flashes.jobs.queued', status: job.status)
9
+ status = t(job.status, scope: 'delayed/web.views.statuses')
10
+ flash[:alert] = t(:alert, scope: 'delayed/web.flashes.jobs.queued', status: status)
10
11
  end
11
12
  redirect_to jobs_path
12
13
  end
@@ -16,12 +17,13 @@ module Delayed
16
17
  job.destroy
17
18
  flash[:notice] = t(:notice, scope: 'delayed/web.flashes.jobs.destroyed')
18
19
  else
19
- flash[:alert] = t(:alert, scope: 'delayed/web.flashes.jobs.destroyed', status: job.status)
20
+ status = t(job.status, scope: 'delayed/web.views.statuses')
21
+ flash[:alert] = t(:alert, scope: 'delayed/web.flashes.jobs.destroyed', status: status)
20
22
  end
21
23
  redirect_to jobs_path
22
24
  end
23
25
 
24
- private
26
+ private
25
27
 
26
28
  def job
27
29
  @job ||= Delayed::Web::Job.find params[:id]
@@ -1,4 +1,4 @@
1
- <% title 'Jobs' %>
1
+ <% title t('delayed/web.views.jobs') %>
2
2
 
3
3
  <div class="page-header">
4
4
  <h1><%= title %></h1>
@@ -7,13 +7,13 @@
7
7
  <table class="table table-bordered">
8
8
  <thead>
9
9
  <tr>
10
- <th>ID</th>
11
- <th>Status</th>
12
- <th>Created At</th>
13
- <th>Run At</th>
14
- <th>Attempts</th>
15
- <th style="width: 190px;">Last Error</th>
16
- <th style="width: 115px;">Actions</th>
10
+ <th><%= t('delayed/web.views.id') %></th>
11
+ <th><%= t('delayed/web.views.status') %></th>
12
+ <th><%= t('delayed/web.views.created_at') %></th>
13
+ <th><%= t('delayed/web.views.run_at') %></th>
14
+ <th><%= t('delayed/web.views.attempts') %></th>
15
+ <th style="width: 190px;"><%= t('delayed/web.views.last_error') %></th>
16
+ <th style="width: 140px"><%= t('delayed/web.views.actions') %></th>
17
17
  </tr>
18
18
  </thead>
19
19
  <tbody>
@@ -23,19 +23,25 @@
23
23
  <td><%= link_to "##{job.id}", job_path(job) %></td>
24
24
  <td>
25
25
  <span class="<%= status_dom_class(job.status) %>">
26
- <%= job.status.capitalize %>
26
+ <%= t(job.status, scope: 'delayed/web.views.statuses').capitalize %>
27
27
  </span>
28
28
  </td>
29
- <td><%= job.created_at %></td>
30
- <td><%= job.run_at %></td>
29
+ <td><%= l(job.created_at, format: :short) %></td>
30
+ <td><%= l(job.run_at, format: :short) %></td>
31
31
  <td><%= job.attempts %></td>
32
- <td><%= link_to_if job.last_error.present?, truncate(job.last_error), job_path(job) %></td>
32
+ <td>
33
+ <% if job.last_error.present? %>
34
+ <%= link_to truncate(job.last_error), job_path(job) %>
35
+ <% else %>
36
+ <span class="label label-success"><%= t('delayed/web.views.errors.empty') %></span>
37
+ <% end %>
38
+ </td>
33
39
  <td>
34
40
  <% if job.can_queue? %>
35
- <%= button_to 'Run Next', queue_job_path(job), method: :put, class: 'btn btn-mini', form_class: 'btn-rails pull-left' %>
41
+ <%= button_to t('delayed/web.views.buttons.run_next'), queue_job_path(job), method: :put, class: 'btn btn-mini btn-action', form_class: 'btn-rails pull-left', title: t('delayed/web.views.buttons.run_next') %>
36
42
  <% end %>
37
43
  <% if job.can_destroy? %>
38
- <%= button_to 'Delete', job_path(job), method: :delete, class: 'btn btn-danger btn-mini', form_class: 'btn-rails pull-right' %>
44
+ <%= button_to t('delayed/web.views.buttons.delete'), job_path(job), method: :delete, class: 'btn btn-danger btn-mini btn-action', form_class: 'btn-rails pull-right', title: t('delayed/web.views.buttons.delete'), onclick: "return confirm('#{t('delayed/web.views.confirm.delete')}')" %>
39
45
  <% end %>
40
46
  </td>
41
47
  </tr>
@@ -43,7 +49,7 @@
43
49
  <% else %>
44
50
  <tr>
45
51
  <td colspan="7">
46
- An empty queue is a good queue.
52
+ <%= t('delayed/web.views.queue.empty') %>
47
53
  </td>
48
54
  </tr>
49
55
  <% end %>
@@ -1,21 +1,30 @@
1
- <% title "Job ##{job.id}" %>
1
+ <% title "#{t('delayed/web.views.job')} ##{job.id}" %>
2
2
 
3
3
  <div class="page-header">
4
4
  <h1>
5
- <%= link_to 'Jobs', jobs_path %> / <%= title %>
5
+ <%= link_to t('delayed/web.views.jobs'), jobs_path %> / <%= title %>
6
6
  </h1>
7
7
  <div class="btn-group">
8
8
  <% if job.can_queue? %>
9
- <%= button_to 'Run Next', queue_job_path(job), method: :put, class: 'btn', form_class: 'btn-rails pull-left' %>
9
+ <%= button_to t('delayed/web.views.buttons.run_next'), queue_job_path(job), method: :put, class: 'btn', form_class: 'btn-rails pull-left' %>
10
10
  <% end %>
11
11
  <% if job.can_destroy? %>
12
- <%= button_to 'Delete', job_path(job), method: :delete, class: 'btn btn-danger', form_class: 'btn-rails pull-right' %>
12
+ <%= button_to t('delayed/web.views.buttons.delete'), job_path(job), method: :delete, class: 'btn btn-danger', form_class: 'btn-rails pull-right', onclick: "return confirm('#{t('delayed/web.views.confirm.delete')}')" %>
13
13
  <% end %>
14
14
  </div>
15
15
  </div>
16
16
 
17
- <h2>Last Error</h2>
18
- <pre><%= job.last_error %></pre>
17
+ <h2><%= t('delayed/web.views.status') %></h2>
18
+ <p class="<%= status_dom_class(job.status) %>">
19
+ <%= t(job.status, scope: 'delayed/web.views.statuses').capitalize %>
20
+ </p>
19
21
 
20
- <h2>Handler</h2>
22
+ <h2><%= t('delayed/web.views.last_error') %></h2>
23
+ <% if job.last_error.present? %>
24
+ <pre><%= job.last_error %></pre>
25
+ <% else %>
26
+ <p class="label label-success"><%= t('delayed/web.views.errors.empty') %></p>
27
+ <% end %>
28
+
29
+ <h2><%= t('delayed/web.views.handler') %></h2>
21
30
  <pre><%= job.handler %></pre>
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <html lang="<%= I18n.locale %>">
3
3
  <head>
4
- <title><%= title %></title>
4
+ <title><%= title %> | Delayed Job</title>
5
5
  <%= stylesheet_link_tag 'delayed/web/application' %>
6
6
  </head>
7
7
  <body>
@@ -1,5 +1,29 @@
1
1
  en:
2
2
  delayed/web:
3
+ views:
4
+ id: ID
5
+ job: Job
6
+ jobs: Jobs
7
+ status: Status
8
+ created_at: Created At
9
+ run_at: Run At
10
+ attempts: Attempts
11
+ last_error: Last Error
12
+ handler: Handler
13
+ actions: Actions
14
+ buttons:
15
+ run_next: Run Next
16
+ delete: Delete
17
+ queue:
18
+ empty: An empty queue is a good queue.
19
+ errors:
20
+ empty: There is no error
21
+ statuses:
22
+ executing: Executing
23
+ failed: Failed
24
+ queued: Queued
25
+ confirm:
26
+ delete: Are you sure you want to delete this job ?
3
27
  flashes:
4
28
  jobs:
5
29
  queued:
@@ -8,3 +32,7 @@ en:
8
32
  destroyed:
9
33
  alert: 'Job cannot be deleted because it is already %{status}'
10
34
  notice: 'Job destroyed'
35
+
36
+ time:
37
+ formats:
38
+ short: '%d/%m/%Y at %I.%m %p'
@@ -0,0 +1,38 @@
1
+ fr:
2
+ delayed/web:
3
+ views:
4
+ id: ID
5
+ job: Tâche
6
+ jobs: Tâches
7
+ status: Statut
8
+ created_at: Ajouté le
9
+ run_at: Démarré le
10
+ attempts: Essais
11
+ last_error: Dernière Erreur
12
+ handler: Gestionnaire
13
+ actions: Actions
14
+ queue:
15
+ empty: Une file d'attente vide est une bonne file d'attente.
16
+ errors:
17
+ empty: Il n'y aucune erreur
18
+ buttons:
19
+ run_next: Suivant
20
+ delete: Supprimer
21
+ statuses:
22
+ executing: En cours
23
+ failed: Echec
24
+ queued: En Attente
25
+ confirm:
26
+ delete: Êtes-vous sûr de vouloir supprimer cette tâche ?
27
+ flashes:
28
+ jobs:
29
+ queued:
30
+ alert: Cette tâche ne peut pas être mise en file d'attente car elle est déjà %{status}
31
+ notice: Tâche placée en file d'attente
32
+ destroyed:
33
+ alert: Cette tâche ne peut pas être supprimée car elle est déjà %{status}
34
+ notice: Tâche supprimée
35
+
36
+ time:
37
+ formats:
38
+ short: '%d/%m/%Y à %H:%M'
@@ -1,5 +1,5 @@
1
1
  module Delayed
2
2
  module Web
3
- VERSION = '0.4.1'
3
+ VERSION = '0.4.2'
4
4
  end
5
5
  end
@@ -21,29 +21,29 @@ describe Delayed::Web::StatusDecorator do
21
21
 
22
22
  describe '#can_destroy?' do
23
23
  it 'is true when failed' do
24
- expect(failed_job.can_destroy?).to be_true
24
+ expect(failed_job.can_destroy?).to be_truthy
25
25
  end
26
26
 
27
27
  it 'is true when queued' do
28
- expect(queued_job.can_destroy?).to be_true
28
+ expect(queued_job.can_destroy?).to be_truthy
29
29
  end
30
30
 
31
31
  it 'is false when executing' do
32
- expect(executing_job.can_destroy?).to be_false
32
+ expect(executing_job.can_destroy?).to be_falsy
33
33
  end
34
34
  end
35
35
 
36
36
  describe '#can_queue?' do
37
37
  it 'is true when failed' do
38
- expect(failed_job.can_queue?).to be_true
38
+ expect(failed_job.can_queue?).to be_truthy
39
39
  end
40
40
 
41
41
  it 'is true when queued' do
42
- expect(queued_job.can_queue?).to be_true
42
+ expect(queued_job.can_queue?).to be_truthy
43
43
  end
44
44
 
45
45
  it 'is false when executing' do
46
- expect(executing_job.can_queue?).to be_false
46
+ expect(executing_job.can_queue?).to be_falsy
47
47
  end
48
48
  end
49
49
  end
@@ -1,4 +1,4 @@
1
- == README
1
+ # README
2
2
 
3
3
  This README would normally document whatever steps are necessary to get the
4
4
  application up and running.
@@ -22,7 +22,3 @@ Things you may want to cover:
22
22
  * Deployment instructions
23
23
 
24
24
  * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
data/spec/dummy/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
- require File.expand_path('../config/application', __FILE__)
4
+ require_relative 'config/application'
5
5
 
6
- Dummy::Application.load_tasks
6
+ Rails.application.load_tasks
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -2,12 +2,12 @@
2
2
  // listed below.
3
3
  //
4
4
  // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
6
  //
7
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.
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
9
  //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
12
  //
13
13
  //= 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);
@@ -3,11 +3,13 @@
3
3
  * listed below.
4
4
  *
5
5
  * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
7
  *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
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.
10
12
  *
11
- *= require_self
12
13
  *= require_tree .
14
+ *= require_self
13
15
  */
@@ -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
@@ -1,5 +1,3 @@
1
1
  class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
2
  protect_from_forgery with: :exception
5
3
  end
@@ -0,0 +1,2 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -1,14 +1,14 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <title>Dummy</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>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= csrf_meta_tags %>
10
6
 
11
- <%= yield %>
7
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
8
+ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9
+ </head>
12
10
 
13
- </body>
11
+ <body>
12
+ <%= yield %>
13
+ </body>
14
14
  </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
data/spec/dummy/bin/rails CHANGED
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
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__)
3
8
  require_relative '../config/boot'
4
9
  require 'rails/commands'
data/spec/dummy/bin/rake CHANGED
@@ -1,4 +1,9 @@
1
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
2
7
  require_relative '../config/boot'
3
8
  require 'rake'
4
9
  Rake.application.run
@@ -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
@@ -1,7 +1,9 @@
1
- require File.expand_path('../boot', __FILE__)
1
+ require_relative 'boot'
2
2
 
3
3
  require 'rails/all'
4
4
 
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
5
7
  Bundler.require(*Rails.groups)
6
8
  require 'delayed-web'
7
9
 
@@ -10,14 +12,5 @@ module Dummy
10
12
  # Settings in config/environments/* take precedence over those specified here.
11
13
  # Application configuration should go into files in config/initializers
12
14
  # -- all .rb files in that directory are automatically loaded.
13
-
14
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
- # config.time_zone = 'Central Time (US & Canada)'
17
-
18
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
- # config.i18n.default_locale = :de
21
15
  end
22
16
  end
23
-
@@ -1,5 +1,3 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3
2
 
4
- require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -0,0 +1,9 @@
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: async
6
+
7
+ production:
8
+ adapter: redis
9
+ url: redis://localhost:6379/1
@@ -3,23 +3,23 @@
3
3
  #
4
4
  # Ensure the SQLite 3 gem is defined in your Gemfile
5
5
  # gem 'sqlite3'
6
- development:
6
+ #
7
+ default: &default
7
8
  adapter: sqlite3
8
- database: db/development.sqlite3
9
9
  pool: 5
10
10
  timeout: 5000
11
11
 
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
12
16
  # Warning: The database defined as "test" will be erased and
13
17
  # re-generated from your development database when you run "rake".
14
18
  # Do not set this db to the same as development or production.
15
19
  test:
16
- adapter: sqlite3
20
+ <<: *default
17
21
  database: db/test.sqlite3
18
- pool: 5
19
- timeout: 5000
20
22
 
21
23
  production:
22
- adapter: sqlite3
24
+ <<: *default
23
25
  database: db/production.sqlite3
24
- pool: 5
25
- timeout: 5000
@@ -1,5 +1,5 @@
1
- # Load the rails application.
2
- require File.expand_path('../application', __FILE__)
1
+ # Load the Rails application.
2
+ require_relative 'application'
3
3
 
4
- # Initialize the rails application.
5
- Dummy::Application.initialize!
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!