glebtv_resque_web 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +86 -0
  3. data/Rakefile +34 -0
  4. data/app/assets/images/resque_web/idle.png +0 -0
  5. data/app/assets/images/resque_web/lifebuoy.png +0 -0
  6. data/app/assets/images/resque_web/poll.png +0 -0
  7. data/app/assets/images/resque_web/rails.png +0 -0
  8. data/app/assets/images/resque_web/working.png +0 -0
  9. data/app/assets/javascripts/resque_web/application.js.coffee +5 -0
  10. data/app/assets/javascripts/resque_web/bootstrap.js.coffee +4 -0
  11. data/app/assets/javascripts/resque_web/failure.js.coffee +7 -0
  12. data/app/assets/javascripts/resque_web/jquery.relative-date.js +47 -0
  13. data/app/assets/javascripts/resque_web/polling.js.coffee +25 -0
  14. data/app/assets/javascripts/resque_web/relative_date.js.coffee +27 -0
  15. data/app/assets/stylesheets/resque_web/application.css.sass +295 -0
  16. data/app/controllers/resque_web/application_controller.rb +25 -0
  17. data/app/controllers/resque_web/failures_controller.rb +62 -0
  18. data/app/controllers/resque_web/overview_controller.rb +7 -0
  19. data/app/controllers/resque_web/queues_controller.rb +17 -0
  20. data/app/controllers/resque_web/stats_controller.rb +36 -0
  21. data/app/controllers/resque_web/workers_controller.rb +23 -0
  22. data/app/controllers/resque_web/working_controller.rb +8 -0
  23. data/app/helpers/resque_web/application_helper.rb +69 -0
  24. data/app/helpers/resque_web/failures_helper.rb +58 -0
  25. data/app/helpers/resque_web/overview_helper.rb +6 -0
  26. data/app/helpers/resque_web/queues_helper.rb +72 -0
  27. data/app/helpers/resque_web/stats_helper.rb +54 -0
  28. data/app/helpers/resque_web/workers_helper.rb +16 -0
  29. data/app/helpers/resque_web/working_helper.rb +23 -0
  30. data/app/views/layouts/resque_web/application.html.erb +61 -0
  31. data/app/views/resque_web/failures/_failed_job.html.erb +53 -0
  32. data/app/views/resque_web/failures/_overview.html.erb +24 -0
  33. data/app/views/resque_web/failures/index.html.erb +32 -0
  34. data/app/views/resque_web/failures/show.html.erb +20 -0
  35. data/app/views/resque_web/overview/show.html.erb +4 -0
  36. data/app/views/resque_web/queues/_queues.html.erb +4 -0
  37. data/app/views/resque_web/queues/_queues_advanced.html.erb +14 -0
  38. data/app/views/resque_web/queues/_queues_basic.html.erb +17 -0
  39. data/app/views/resque_web/queues/index.html.erb +1 -0
  40. data/app/views/resque_web/queues/show.html.erb +26 -0
  41. data/app/views/resque_web/stats/key.html.erb +26 -0
  42. data/app/views/resque_web/stats/keys.html.erb +17 -0
  43. data/app/views/resque_web/stats/redis.html.erb +14 -0
  44. data/app/views/resque_web/stats/resque.html.erb +14 -0
  45. data/app/views/resque_web/workers/index.html.erb +19 -0
  46. data/app/views/resque_web/workers/show.html.erb +38 -0
  47. data/app/views/resque_web/working/_working.html.erb +34 -0
  48. data/app/views/resque_web/working/index.html.erb +1 -0
  49. data/config/initializers/resque_config.rb +2 -0
  50. data/config/routes.rb +30 -0
  51. data/lib/glebtv_resque_web.rb +1 -0
  52. data/lib/resque_web.rb +4 -0
  53. data/lib/resque_web/engine.rb +14 -0
  54. data/lib/resque_web/version.rb +3 -0
  55. data/test/dummy/Rakefile +6 -0
  56. data/test/dummy/app/assets/javascripts/application.js +13 -0
  57. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  58. data/test/dummy/app/controllers/application_controller.rb +5 -0
  59. data/test/dummy/app/helpers/application_helper.rb +2 -0
  60. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  61. data/test/dummy/bin/bundle +3 -0
  62. data/test/dummy/bin/rails +4 -0
  63. data/test/dummy/bin/rake +4 -0
  64. data/test/dummy/config.ru +4 -0
  65. data/test/dummy/config/application.rb +23 -0
  66. data/test/dummy/config/boot.rb +5 -0
  67. data/test/dummy/config/database.yml +25 -0
  68. data/test/dummy/config/environment.rb +5 -0
  69. data/test/dummy/config/environments/development.rb +29 -0
  70. data/test/dummy/config/environments/production.rb +80 -0
  71. data/test/dummy/config/environments/test.rb +36 -0
  72. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  73. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  74. data/test/dummy/config/initializers/inflections.rb +16 -0
  75. data/test/dummy/config/initializers/mime_types.rb +5 -0
  76. data/test/dummy/config/initializers/secret_token.rb +12 -0
  77. data/test/dummy/config/initializers/session_store.rb +3 -0
  78. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  79. data/test/dummy/config/locales/en.yml +23 -0
  80. data/test/dummy/config/routes.rb +4 -0
  81. data/test/dummy/db/schema.rb +16 -0
  82. data/test/dummy/db/test.sqlite3 +0 -0
  83. data/test/dummy/log/test.log +245 -0
  84. data/test/dummy/public/404.html +58 -0
  85. data/test/dummy/public/422.html +58 -0
  86. data/test/dummy/public/500.html +57 -0
  87. data/test/dummy/public/favicon.ico +0 -0
  88. data/test/dummy/tmp/cache/assets/test/sass/1c3d1782d5ea7ec4718f046129b78335787e52e3/application.css.sassc +0 -0
  89. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_alerts.scssc +0 -0
  90. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_background-variant.scssc +0 -0
  91. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_border-radius.scssc +0 -0
  92. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_buttons.scssc +0 -0
  93. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_center-block.scssc +0 -0
  94. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_clearfix.scssc +0 -0
  95. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_forms.scssc +0 -0
  96. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_gradients.scssc +0 -0
  97. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_grid-framework.scssc +0 -0
  98. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_grid.scssc +0 -0
  99. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_hide-text.scssc +0 -0
  100. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_image.scssc +0 -0
  101. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_labels.scssc +0 -0
  102. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_list-group.scssc +0 -0
  103. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_nav-divider.scssc +0 -0
  104. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_nav-vertical-align.scssc +0 -0
  105. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_opacity.scssc +0 -0
  106. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_pagination.scssc +0 -0
  107. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_panels.scssc +0 -0
  108. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_progress-bar.scssc +0 -0
  109. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_reset-filter.scssc +0 -0
  110. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_resize.scssc +0 -0
  111. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_responsive-visibility.scssc +0 -0
  112. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_size.scssc +0 -0
  113. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_tab-focus.scssc +0 -0
  114. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_table-row.scssc +0 -0
  115. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_text-emphasis.scssc +0 -0
  116. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_text-overflow.scssc +0 -0
  117. data/test/dummy/tmp/cache/assets/test/sass/719fb20fcdd80713bd691a1fae3d9070788f958b/_vendor-prefixes.scssc +0 -0
  118. data/test/dummy/tmp/cache/assets/test/sass/af089672d04f0b3afeaa93052f8c07a56fbd55ab/bootstrap.scssc +0 -0
  119. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_alerts.scssc +0 -0
  120. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_badges.scssc +0 -0
  121. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_breadcrumbs.scssc +0 -0
  122. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_button-groups.scssc +0 -0
  123. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_buttons.scssc +0 -0
  124. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_carousel.scssc +0 -0
  125. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_close.scssc +0 -0
  126. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_code.scssc +0 -0
  127. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_component-animations.scssc +0 -0
  128. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_dropdowns.scssc +0 -0
  129. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_forms.scssc +0 -0
  130. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_glyphicons.scssc +0 -0
  131. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_grid.scssc +0 -0
  132. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_input-groups.scssc +0 -0
  133. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_jumbotron.scssc +0 -0
  134. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_labels.scssc +0 -0
  135. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_list-group.scssc +0 -0
  136. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_media.scssc +0 -0
  137. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_mixins.scssc +0 -0
  138. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_modals.scssc +0 -0
  139. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_navbar.scssc +0 -0
  140. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_navs.scssc +0 -0
  141. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_normalize.scssc +0 -0
  142. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_pager.scssc +0 -0
  143. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_pagination.scssc +0 -0
  144. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_panels.scssc +0 -0
  145. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_popovers.scssc +0 -0
  146. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_print.scssc +0 -0
  147. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_progress-bars.scssc +0 -0
  148. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_responsive-embed.scssc +0 -0
  149. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_responsive-utilities.scssc +0 -0
  150. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_scaffolding.scssc +0 -0
  151. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_tables.scssc +0 -0
  152. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_thumbnails.scssc +0 -0
  153. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_tooltip.scssc +0 -0
  154. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_type.scssc +0 -0
  155. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_utilities.scssc +0 -0
  156. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_variables.scssc +0 -0
  157. data/test/dummy/tmp/cache/assets/test/sass/e6b360f4f53509f1e8a04655064e5b719dab3efc/_wells.scssc +0 -0
  158. data/test/dummy/tmp/cache/assets/test/sprockets/02c7149c1aa78e6e082cbc0ccb5ee9dd +0 -0
  159. data/test/dummy/tmp/cache/assets/test/sprockets/02daf75ab49a90959f8d3d163311a00e +0 -0
  160. data/test/dummy/tmp/cache/assets/test/sprockets/0561a2e8047fe27a8d521323edb845dc +0 -0
  161. data/test/dummy/tmp/cache/assets/test/sprockets/087620d65a271a7181344eb1b8978d3c +0 -0
  162. data/test/dummy/tmp/cache/assets/test/sprockets/0db5fb89308695eed036b738bc93e19a +0 -0
  163. data/test/dummy/tmp/cache/assets/test/sprockets/104a95949d3156cc12b916aa0607cc75 +0 -0
  164. data/test/dummy/tmp/cache/assets/test/sprockets/14f243fc9fcb34c241df487ea6ab99ab +0 -0
  165. data/test/dummy/tmp/cache/assets/test/sprockets/17fa5aa6612aa4fe44683b7cafbe078b +0 -0
  166. data/test/dummy/tmp/cache/assets/test/sprockets/1eb9efacbac56c54bfa165812f118cc3 +0 -0
  167. data/test/dummy/tmp/cache/assets/test/sprockets/20a205c27abbaf78b656f0bf1ea01a8e +0 -0
  168. data/test/dummy/tmp/cache/assets/test/sprockets/2d7574b61e548cb102932d491d2743e4 +0 -0
  169. data/test/dummy/tmp/cache/assets/test/sprockets/2fa35185a52ceadffd1a3766c6ddd5c5 +0 -0
  170. data/test/dummy/tmp/cache/assets/test/sprockets/343a12dec8f9ec25d542067abc3d35b3 +0 -0
  171. data/test/dummy/tmp/cache/assets/test/sprockets/38738a938242d2a3f5c1299cf57d7b92 +0 -0
  172. data/test/dummy/tmp/cache/assets/test/sprockets/3b4b938f03afe82ff81823070ab044ad +0 -0
  173. data/test/dummy/tmp/cache/assets/test/sprockets/3c9889bcf7fe6bd02024ab551ddc87f6 +0 -0
  174. data/test/dummy/tmp/cache/assets/test/sprockets/43b88e2723c8aa7e5e70e99feaa347c8 +0 -0
  175. data/test/dummy/tmp/cache/assets/test/sprockets/47492fbb87947f0e4d957cc295601139 +0 -0
  176. data/test/dummy/tmp/cache/assets/test/sprockets/49cf0b72e8e470003f33fa4c8bc5ecc8 +0 -0
  177. data/test/dummy/tmp/cache/assets/test/sprockets/4a464afd4a7583522d4763ec594ad4d2 +0 -0
  178. data/test/dummy/tmp/cache/assets/test/sprockets/4bd6ef3d542d68bfdc48246f56e3020f +0 -0
  179. data/test/dummy/tmp/cache/assets/test/sprockets/4eadcf3adbb94ba681eb50092402165a +0 -0
  180. data/test/dummy/tmp/cache/assets/test/sprockets/500146df59cdb4316e1cd496875e4343 +0 -0
  181. data/test/dummy/tmp/cache/assets/test/sprockets/5343295a1dd6edec79ff4ae90f3ecc20 +0 -0
  182. data/test/dummy/tmp/cache/assets/test/sprockets/64f68600beb8f43aaa49c9f0e44c6099 +0 -0
  183. data/test/dummy/tmp/cache/assets/test/sprockets/68e590106305cf1541914384e78230f7 +0 -0
  184. data/test/dummy/tmp/cache/assets/test/sprockets/6bd9a6c446a7cb11e50be64ff6cdf04b +0 -0
  185. data/test/dummy/tmp/cache/assets/test/sprockets/7a504a545eb04583e57d45cb37be359b +0 -0
  186. data/test/dummy/tmp/cache/assets/test/sprockets/816e3c72320de620979a99c3dbd0352a +0 -0
  187. data/test/dummy/tmp/cache/assets/test/sprockets/84613da79edc156ffbff6498d5bc839c +0 -0
  188. data/test/dummy/tmp/cache/assets/test/sprockets/914f63025297f192518257011605ed7d +0 -0
  189. data/test/dummy/tmp/cache/assets/test/sprockets/9431f1df5a81ab3d3dd3c5f86ca84792 +0 -0
  190. data/test/dummy/tmp/cache/assets/test/sprockets/975cb43a2fe657c539be5279b638f463 +0 -0
  191. data/test/dummy/tmp/cache/assets/test/sprockets/98f5ecff49dd3b8bdf864dbbd8887b2e +0 -0
  192. data/test/dummy/tmp/cache/assets/test/sprockets/a068400ed7dd96dfb9308adfdbda4162 +0 -0
  193. data/test/dummy/tmp/cache/assets/test/sprockets/a57214ec4023700e5943496a11b77a51 +0 -0
  194. data/test/dummy/tmp/cache/assets/test/sprockets/a6da3196fa362723b918c9700b06dfac +0 -0
  195. data/test/dummy/tmp/cache/assets/test/sprockets/a9ac591909218f8023a60d45e71f21e7 +0 -0
  196. data/test/dummy/tmp/cache/assets/test/sprockets/b42ac5b2817defededd88f6b3c240df4 +0 -0
  197. data/test/dummy/tmp/cache/assets/test/sprockets/b4b9e3a3613c562906f0ae12a063d0f8 +0 -0
  198. data/test/dummy/tmp/cache/assets/test/sprockets/c3a529af84d6dfe3a8ec6817f2046992 +0 -0
  199. data/test/dummy/tmp/cache/assets/test/sprockets/c6acfab4bfb3f5df44356581bea39442 +0 -0
  200. data/test/dummy/tmp/cache/assets/test/sprockets/c77c7bd5d50b1ab3ff8982815b893bee +0 -0
  201. data/test/dummy/tmp/cache/assets/test/sprockets/cdb02720e0cc3913f1cf6497853295df +0 -0
  202. data/test/dummy/tmp/cache/assets/test/sprockets/cebe2f6b899c1166ddeb4b6bedbad3bc +0 -0
  203. data/test/dummy/tmp/cache/assets/test/sprockets/d3a30b8c1485a6fb57a4e00606a8d1aa +0 -0
  204. data/test/dummy/tmp/cache/assets/test/sprockets/d56e991ed1a726978b3f97f4a778b29c +0 -0
  205. data/test/dummy/tmp/cache/assets/test/sprockets/d810a287578979610d092f9fc92df13b +0 -0
  206. data/test/dummy/tmp/cache/assets/test/sprockets/dffaa558c8da451a27274ebfcae73c87 +0 -0
  207. data/test/dummy/tmp/cache/assets/test/sprockets/e05d140a5178acfb508f9bba385ee659 +0 -0
  208. data/test/dummy/tmp/cache/assets/test/sprockets/e517c9f82391d1487f7e76579b464310 +0 -0
  209. data/test/dummy/tmp/cache/assets/test/sprockets/e6e0e540dd8742671c830f889a426c70 +0 -0
  210. data/test/dummy/tmp/cache/assets/test/sprockets/ed2846198ecc949f9e48f51b237273cf +0 -0
  211. data/test/dummy/tmp/cache/assets/test/sprockets/f07f89a2afa836b87b14b702a51a4b8c +0 -0
  212. data/test/dummy/tmp/cache/assets/test/sprockets/f3456b04e8eb9d8bcc52b009a15ffab3 +0 -0
  213. data/test/dummy/tmp/cache/assets/test/sprockets/f9d5fec8f0e08cfe45d1bb60a01d2571 +0 -0
  214. data/test/dummy/tmp/cache/assets/test/sprockets/fd2dd286e4ace9ebaf4751cc0ccdb688 +0 -0
  215. data/test/dummy/tmp/cache/assets/test/sprockets/fe6b36fba0a966661760d186cc5d4b4e +0 -0
  216. data/test/functional/failures_controller_test.rb +76 -0
  217. data/test/functional/overview_controller_test.rb +37 -0
  218. data/test/functional/queues_controller_test.rb +44 -0
  219. data/test/functional/stats_controller_test.rb +77 -0
  220. data/test/functional/workers_controller_test.rb +26 -0
  221. data/test/functional/working_controller_test.rb +19 -0
  222. data/test/integration/plugin_integration_test.rb +72 -0
  223. data/test/support/controller_test_helpers.rb +22 -0
  224. data/test/test_helper.rb +22 -0
  225. data/test/unit/helpers/failures_helper_test.rb +15 -0
  226. data/test/unit/helpers/jobs_helper_test.rb +4 -0
  227. data/test/unit/helpers/overview_helper_test.rb +4 -0
  228. data/test/unit/helpers/queues_helper_test.rb +4 -0
  229. data/test/unit/helpers/retry_controller_helper_test.rb +4 -0
  230. data/test/unit/helpers/stats_helper_test.rb +4 -0
  231. data/test/unit/helpers/workers_helper_test.rb +4 -0
  232. data/test/unit/helpers/working_helper_test.rb +4 -0
  233. metadata +523 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 99ca3ab15393efd7ec25c2ae8e0c9621924de083
4
+ data.tar.gz: dbf882ecaddea1630f43914064058bdaa560d0b3
5
+ SHA512:
6
+ metadata.gz: f22fb9e0545d6eef688fd42eb1630a5b3e979ca5429f6ac221c65706085b6406c8dfb6c5595d14fb6e113c5646b7363aafd971c4ba747de7d00a8f5eb3d97aad
7
+ data.tar.gz: c94c4a8b50d0a74818d3c9007dae588d3d90436e00b4380e358cdd342b9e9883a0c11dcd168a5974b7309ecad0d76c90df0ee26d9edf902da8084f88926bffc4
@@ -0,0 +1,86 @@
1
+ resque_web
2
+ ==========
3
+ [![Gem Version](http://img.shields.io/gem/v/glebtv_resque_web.svg)](https://rubygems.org/gems/glevtv_resque_web)
4
+ [![Build Status](https://img.shields.io/travis/glebtv/resque_web/master.svg)](https://travis-ci.org/glebtv/glebtv-resque-web)
5
+
6
+ A Rails-based frontend to the [Resque](https://github.com/resque/resque) job
7
+ queue system. This provides a similar interface to the existing Sinatra
8
+ application that comes bundled with Resque, but deploys like a Rails application
9
+ and leverages Rails conventions for factoring things like controllers, helpers,
10
+ and views.
11
+
12
+ # NOTICE
13
+ Note this is NOT the old sinatra interface that comes with Resque 1-x. This is
14
+ a new project based on rails. If you have any issues with old web server,
15
+ please file an issue on the [resque](https://github.com/resque/resque) project.
16
+ Note that the sinatra web interface will be gone in Resque 2.0 and this is
17
+ meant to be the replacement.
18
+
19
+ More documentation coming soon!
20
+
21
+ ## Starting
22
+ Resque web is built as a rails engine.
23
+
24
+ Add it to your gemfile.
25
+
26
+ ```Ruby
27
+ gem 'glebtv_resque_web'
28
+ ```
29
+
30
+ Mount it in your config/routes.rb.
31
+
32
+ ```Ruby
33
+ require "resque_web"
34
+
35
+ MyApp::Application.routes.draw do
36
+ mount ResqueWeb::Engine => "/resque_web"
37
+ end
38
+ ```
39
+
40
+ If you need a non-default resque server, use this environment variable.
41
+
42
+ ```
43
+ RAILS_RESQUE_REDIS=123.x.0.456:6712
44
+ ```
45
+ ## Security
46
+
47
+ You almost certainly want to limit access when using resque-web in production. Using [routes constraints](http://guides.rubyonrails.org/routing.html#request-based-constraints) is one way to achieve this:
48
+
49
+ ```ruby
50
+ # config/routes.rb
51
+
52
+ resque_web_constraint = lambda { |request| request.remote_ip == '127.0.0.1' }
53
+ constraints resque_web_constraint do
54
+ mount ResqueWeb::Engine => "/resque_web"
55
+ end
56
+
57
+ ```
58
+
59
+ Another example of a route constraint using the current user when using Devise or another warden based authentication system:
60
+
61
+ ```ruby
62
+ # config/routes.rb
63
+ resque_web_constraint = lambda do |request|
64
+ current_user = request.env['warden'].user
65
+ current_user.present? && current_user.respond_to?(:is_admin?) && current_user.is_admin?
66
+ end
67
+
68
+ constraints resque_web_constraint do
69
+ mount ResqueWeb::Engine => "/resque_web"
70
+ end
71
+
72
+ ```
73
+
74
+ ### HTTP Basic Authentication
75
+
76
+ HTTP Basic Authentication is supported out of the box. Simply set the environment variables `RESQUE_WEB_HTTP_BASIC_AUTH_USER` and `RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD` to turn it on. If you're using Resque with Heroku run `heroku config:set RESQUE_WEB_HTTP_BASIC_AUTH_USER=user RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD=secret` to get ResqueWeb secured.
77
+
78
+ ## Plugins
79
+
80
+ In the past with the sinatra app it was fairly simple to just monkey-patch the
81
+ server to add more functionality/tabs. With this rails version you have to write
82
+ an engine under a specific namespace. Read more in PLUGINS.md.
83
+
84
+ ## Screenshot
85
+
86
+ ![Screenshot](http://i.imgur.com/LkNgl.png)
@@ -0,0 +1,34 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'ResqueWeb'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+
22
+ Bundler::GemHelper.install_tasks
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'lib'
28
+ t.libs << 'test'
29
+ t.pattern = 'test/**/*_test.rb'
30
+ t.verbose = false
31
+ end
32
+
33
+
34
+ task :default => :test
@@ -0,0 +1,5 @@
1
+ #= require jquery
2
+ #= require jquery_ujs
3
+ #= require bootstrap
4
+ #= require_tree .
5
+
@@ -0,0 +1,4 @@
1
+ jQuery ->
2
+ $("a[rel=popover]").popover()
3
+ $(".tooltip").tooltip()
4
+ $("a[rel=tooltip]").tooltip()
@@ -0,0 +1,7 @@
1
+ jQuery ->
2
+ $(".backtrace").click (e) ->
3
+ e.preventDefault()
4
+ $(this).next().toggle()
5
+
6
+ $("ul.failed li").hover ->
7
+ $(this).toggleClass "hover"
@@ -0,0 +1,47 @@
1
+ /**
2
+ * jQ plugin adapted from 37s' relative date tool
3
+ * Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time
4
+ * @see http://37signals.com/svn/posts/1557-javascript-makes-relative-times-compatible-with-caching
5
+ */
6
+ (function($, window, undefined){
7
+
8
+ $.fn.relativeDate = function(opts){
9
+ var defaults = {
10
+ dateGetter: function(el){
11
+ return $(el).text();
12
+ }
13
+ },
14
+ options = $.extend({}, defaults, opts),
15
+ time_ago_in_words_with_parsing = function(from) {
16
+ var date = new Date;
17
+ date.setTime(Date.parse(from));
18
+ return time_ago_in_words(date);
19
+ },
20
+ time_ago_in_words = function(from) {
21
+ return distance_of_time_in_words(new Date, from);
22
+ },
23
+ distance_of_time_in_words = function(to, from) {
24
+ var distance_in_seconds = ((to - from) / 1000);
25
+ var distance_in_minutes = Math.floor(distance_in_seconds / 60);
26
+
27
+ if (distance_in_minutes == 0) { return 'less than a minute ago'; }
28
+ if (distance_in_minutes == 1) { return 'a minute ago'; }
29
+ if (distance_in_minutes < 45) { return distance_in_minutes + ' minutes ago'; }
30
+ if (distance_in_minutes < 90) { return 'about 1 hour ago'; }
31
+ if (distance_in_minutes < 1440) { return 'about ' + Math.round(distance_in_minutes / 60) + ' hours ago'; }
32
+ if (distance_in_minutes < 2880) { return '1 day ago'; }
33
+ if (distance_in_minutes < 43200) { return Math.floor(distance_in_minutes / 1440) + ' days ago'; }
34
+ if (distance_in_minutes < 86400) { return 'about 1 month ago'; }
35
+ if (distance_in_minutes < 525960) { return Math.floor(distance_in_minutes / 43200) + ' months ago'; }
36
+ if (distance_in_minutes < 1051199) { return 'about 1 year ago'; }
37
+
38
+ return 'over ' + Math.floor(distance_in_minutes / 525960) + ' years ago';
39
+ }
40
+
41
+ return $(this).each(function(){
42
+ date_str = options.dateGetter(this);
43
+ $(this).html(time_ago_in_words_with_parsing(date_str));
44
+ });
45
+ };
46
+
47
+ })(jQuery, window);
@@ -0,0 +1,25 @@
1
+ jQuery ->
2
+ poll_interval = 2
3
+
4
+ poll_start = (el) ->
5
+ href = el.attr("href")
6
+ el.parent().text "Starting..."
7
+ $("#main").addClass "polling"
8
+ setInterval (->
9
+ $.ajax
10
+ dataType: "text"
11
+ type: "get"
12
+ url: href
13
+ success: (data) ->
14
+ $("#main").html data
15
+ $("#main .time").relativeDate()
16
+ ), poll_interval * 1000
17
+ location.hash = "#poll"
18
+
19
+ # auto start if hash is poll
20
+ poll_start $("a[rel=poll]") if location.hash == "#poll"
21
+
22
+ # start when click on link
23
+ $("a[rel=poll]").click (e) ->
24
+ e.preventDefault()
25
+ poll_start $(this)
@@ -0,0 +1,27 @@
1
+ jQuery ->
2
+ relatizer = ->
3
+ dt = $(this).text()
4
+ $(this).relativeDate()
5
+ relatized = $(this).text()
6
+ if $(this).parents("a").size() > 0 || $(this).is("a")
7
+ $(this).relativeDate()
8
+ $(this).attr("title", dt) unless $(this).attr("title")
9
+ else
10
+ $(this).html """
11
+ <a href='#'' class='toggle_format' title='#{dt}'>
12
+ <span class='date_time'>#{dt}</span>
13
+ <span class='relatized_time'>#{relatized}</span>
14
+ </a>
15
+ """
16
+
17
+ format_toggler = (e) ->
18
+ e.preventDefault()
19
+ $(".time a.toggle_format span").toggle()
20
+ $(this).attr "title", $("span:hidden", this).text()
21
+
22
+ # changed html when doom is ready
23
+ $(".time").each relatizer
24
+ $(".time a.toggle_format .date_time").hide()
25
+
26
+ # add event on click in relative time to show date_time
27
+ $(".time").on "click", "a.toggle_format", format_toggler
@@ -0,0 +1,295 @@
1
+ @import "bootstrap"
2
+
3
+ html
4
+ background: #efefef
5
+
6
+ body
7
+ padding-top: 40px
8
+
9
+ .navbar
10
+ border-bottom: 5px solid #ce1212
11
+ min-height: 45px
12
+ .brand
13
+ color: white
14
+
15
+ .navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner
16
+ border-width: 0
17
+
18
+ .navbar-inverse .nav > .active
19
+ background: #fa2424
20
+ /* Old browsers
21
+ background: -moz-linear-gradient(top, #fa2424 0%, #ce1212 100%)
22
+ /* FF3.6+
23
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fa2424), color-stop(100%, #ce1212))
24
+ /* Chrome,Safari4+
25
+ background: -webkit-linear-gradient(top, #fa2424 0%, #ce1212 100%)
26
+ /* Chrome10+,Safari5.1+
27
+ background: -o-linear-gradient(top, #fa2424 0%, #ce1212 100%)
28
+ /* Opera 11.10+
29
+ background: -ms-linear-gradient(top, #fa2424 0%, #ce1212 100%)
30
+ /* IE10+
31
+ background: linear-gradient(to bottom, #fa2424 0%, #ce1212 100%)
32
+ /* W3C
33
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fa2424', endColorstr='#ce1212',GradientType=0 )
34
+ /* IE6-8
35
+
36
+ .navbar-toggle
37
+ margin-top: 3px
38
+ margin-bottom: 3px
39
+
40
+ .navbar-nav > li > a
41
+ padding-top: 11px
42
+ padding-bottom: 11px
43
+
44
+ .navbar .nav > .active > a
45
+ background: none
46
+ &:hover, &:focus
47
+ background: none
48
+
49
+ .navbar-brand
50
+ padding: 11px 15px
51
+ height: 40px
52
+
53
+ .container h1
54
+ color: #ce1212
55
+ font-size: 24px
56
+
57
+ .label-info[href], .badge-info[href]
58
+ background-color: #3A87AD
59
+
60
+ .logo
61
+ float: left
62
+ margin: 2px 5px
63
+ width: 36px
64
+ height: 36px
65
+
66
+ /* The remaining CSS rules come from the legacy Resque application
67
+
68
+ .subnav
69
+ padding: 8px 10px 7px 10px
70
+ background: #ce1212
71
+ font-size: 90%
72
+ li
73
+ display: inline
74
+ line-height: 16px
75
+ a
76
+ color: #fff
77
+ text-decoration: none
78
+ margin: 3px
79
+ display: inline-block
80
+ background: #dd5b5b
81
+ padding: 5px
82
+ -webkit-border-radius: 3px
83
+ -moz-border-radius: 3px
84
+ &.current a
85
+ background: #fff
86
+ font-weight: bold
87
+ color: #ce1212
88
+ a:active
89
+ background: #b00909
90
+
91
+ .container
92
+ span.hl
93
+ background: #efefef
94
+ padding: 2px
95
+ h2
96
+ margin: 10px 0
97
+ font-size: 130%
98
+ table tr
99
+ th
100
+ background: #efefef
101
+ color: #888
102
+ font-size: 15px
103
+ font-weight: bold
104
+ min-width: 16px
105
+ td.no-data
106
+ text-align: center
107
+ padding: 40px 0
108
+ color: #999
109
+ font-style: italic
110
+ font-size: 130%
111
+ p
112
+ margin: 5px 0
113
+ &.intro
114
+ margin-bottom: 15px
115
+ font-size: 85%
116
+ color: #999
117
+ margin-top: 0
118
+ line-height: 1.3
119
+ h1.wi
120
+ margin-bottom: 5px
121
+ p.sub
122
+ font-size: 95%
123
+ color: #999
124
+ table
125
+ &.queues
126
+ width: 40%
127
+ td.queue
128
+ font-weight: bold
129
+ width: 50%
130
+ tr.failure td
131
+ background: #ffecec
132
+ color: #d37474
133
+ a
134
+ color: #d37474
135
+ td.failure .badge a
136
+ color: white
137
+ tr.first_failure td
138
+ border-top: 2px solid #d37474
139
+ &.jobs td
140
+ &.class
141
+ font-family: Monaco, "Courier New", monospace
142
+ font-size: 90%
143
+ width: 50%
144
+ &.args
145
+ width: 50%
146
+ &.workers td
147
+ &.icon
148
+ width: 1%
149
+ background: #efefef
150
+ text-align: center
151
+ img
152
+ height: 16px
153
+ width: 16px
154
+ &.where
155
+ width: 25%
156
+ &.queues
157
+ width: 35%
158
+ &.queue
159
+ width: 10%
160
+ &.process
161
+ width: 35%
162
+ span.waiting
163
+ color: #999
164
+ font-size: 90%
165
+ small
166
+ font-size: 80%
167
+ margin-left: 5px
168
+ code
169
+ font-family: Monaco, "Courier New", monospace
170
+ font-size: 90%
171
+ small a
172
+ color: #999
173
+ &.polling table.workers tr.working td
174
+ background: #f4ffe4
175
+ color: #7ac312
176
+ &.where a
177
+ color: #7ac312
178
+ &.process code
179
+ font-weight: bold
180
+ table.stats th
181
+ font-size: 100%
182
+ width: 40%
183
+ color: #000
184
+ hr
185
+ border: 0
186
+ border-top: 5px solid #efefef
187
+ margin: 15px 0
188
+
189
+ #footer
190
+ padding: 10px 5%
191
+ background: #efefef
192
+ color: #999
193
+ font-size: 85%
194
+ line-height: 1.5
195
+ border-top: 5px solid #ccc
196
+ padding-top: 10px
197
+ p a
198
+ color: #999
199
+
200
+ .container
201
+ p.poll
202
+ background: url(image-url("resque_web/poll.png")) no-repeat 0 2px
203
+ padding: 3px 0
204
+ padding-left: 23px
205
+ float: right
206
+ font-size: 85%
207
+ ul.failed
208
+ margin-top: 20px
209
+ li
210
+ background: #efefef
211
+ /* Old browsers
212
+ background: -moz-linear-gradient(top, #efefef 0%, white 100%)
213
+ /* FF3.6+
214
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #efefef), color-stop(100%, white))
215
+ /* Chrome,Safari4+
216
+ background: -webkit-linear-gradient(top, #efefef 0%, white 100%)
217
+ /* Chrome10+,Safari5.1+
218
+ background: -o-linear-gradient(top, #efefef 0%, white 100%)
219
+ /* Opera 11.10+
220
+ background: -ms-linear-gradient(top, #efefef 0%, white 100%)
221
+ /* IE10+
222
+ background: linear-gradient(to bottom, #efefef 0%, white 100%)
223
+ /* W3C
224
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#efefef', endColorstr='#fff',GradientType=0 )
225
+ /* IE6-8
226
+ margin-top: 10px
227
+ padding: 10px
228
+ overflow: hidden
229
+ border: 1px solid #ccc
230
+ -webkit-border-radius: 5px
231
+ -moz-border-radius: 5px
232
+ border-radius: 5px
233
+ dl
234
+ dt
235
+ font-size: 80%
236
+ color: #999
237
+ width: 60px
238
+ float: left
239
+ padding-top: 1px
240
+ text-align: right
241
+ dd
242
+ margin-bottom: 10px
243
+ margin-left: 70px
244
+ .retried
245
+ float: right
246
+ text-align: right
247
+ .remove
248
+ display: none
249
+ margin-top: 8px
250
+ &.hover dl dd .retried .remove
251
+ display: block
252
+ dl dd .controls
253
+ display: none
254
+ float: right
255
+ &.hover dl dd .controls
256
+ display: block
257
+ dl dd
258
+ code, pre
259
+ font-family: Monaco, "Courier New", monospace
260
+ font-size: 90%
261
+ white-space: pre-wrap
262
+ &.error
263
+ a
264
+ font-family: Monaco, "Courier New", monospace
265
+ font-size: 90%
266
+ pre
267
+ margin-top: 3px
268
+ line-height: 1.3
269
+ p.pagination
270
+ background: #efefef
271
+ padding: 10px
272
+ overflow: hidden
273
+ a
274
+ &.less
275
+ float: left
276
+ &.more
277
+ float: right
278
+ form
279
+ float: right
280
+ margin-top: -10px
281
+ margin-left: 10px
282
+ .time a.toggle_format
283
+ text-decoration: none
284
+
285
+ #failed
286
+ tr.total td
287
+ background-color: #FFECEC
288
+ color: #D37474
289
+ font-size: 15px
290
+ font-weight: bold
291
+ .center
292
+ text-align: center
293
+ .failed_class
294
+ padding-left: 20px
295
+ font-size: 12px