active_batch 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/javascripts/active_batch/application.js +13 -0
  6. data/app/assets/javascripts/active_batch/batches.js +2 -0
  7. data/app/assets/javascripts/active_batch/jobs.js +2 -0
  8. data/app/assets/stylesheets/active_batch/application.css +15 -0
  9. data/app/assets/stylesheets/active_batch/batches.css +4 -0
  10. data/app/assets/stylesheets/active_batch/jobs.css +4 -0
  11. data/app/assets/stylesheets/scaffold.css +56 -0
  12. data/app/controllers/active_batch/application_controller.rb +4 -0
  13. data/app/controllers/active_batch/batches_controller.rb +49 -0
  14. data/app/controllers/active_batch/work_units_controller.rb +29 -0
  15. data/app/helpers/active_batch/application_helper.rb +4 -0
  16. data/app/helpers/active_batch/batches_helper.rb +4 -0
  17. data/app/helpers/active_batch/jobs_helper.rb +4 -0
  18. data/app/jobs/active_batch/batch_scheduler_job.rb +16 -0
  19. data/app/jobs/active_batch/batch_status_check_job.rb +17 -0
  20. data/app/models/active_batch/batch.rb +28 -0
  21. data/app/models/active_batch/work_unit.rb +17 -0
  22. data/app/views/active_batch/batches/_form.html.erb +21 -0
  23. data/app/views/active_batch/batches/index.html.erb +30 -0
  24. data/app/views/active_batch/batches/new.html.erb +5 -0
  25. data/app/views/active_batch/batches/show.html.erb +31 -0
  26. data/app/views/active_batch/work_units/index.html.erb +26 -0
  27. data/app/views/active_batch/work_units/show.html.erb +18 -0
  28. data/config/routes.rb +8 -0
  29. data/db/migrate/20150319101734_create_active_batch_tables.rb +21 -0
  30. data/lib/active_batch.rb +8 -0
  31. data/lib/active_batch/batched_job.rb +36 -0
  32. data/lib/active_batch/engine.rb +5 -0
  33. data/lib/active_batch/transactional_batched_job.rb +15 -0
  34. data/lib/active_batch/version.rb +3 -0
  35. data/lib/tasks/active_batch_tasks.rake +4 -0
  36. data/test/active_batch_test.rb +7 -0
  37. data/test/controllers/active_batch/batches_controller_test.rb +45 -0
  38. data/test/controllers/active_batch/work_units_controller_test.rb +32 -0
  39. data/test/dummy/README.rdoc +28 -0
  40. data/test/dummy/Rakefile +6 -0
  41. data/test/dummy/app/assets/javascripts/application.js +13 -0
  42. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  43. data/test/dummy/app/controllers/application_controller.rb +5 -0
  44. data/test/dummy/app/helpers/application_helper.rb +2 -0
  45. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  46. data/test/dummy/bin/bundle +3 -0
  47. data/test/dummy/bin/rails +4 -0
  48. data/test/dummy/bin/rake +4 -0
  49. data/test/dummy/bin/setup +29 -0
  50. data/test/dummy/config.ru +4 -0
  51. data/test/dummy/config/application.rb +26 -0
  52. data/test/dummy/config/boot.rb +5 -0
  53. data/test/dummy/config/database.yml +25 -0
  54. data/test/dummy/config/environment.rb +5 -0
  55. data/test/dummy/config/environments/development.rb +41 -0
  56. data/test/dummy/config/environments/production.rb +79 -0
  57. data/test/dummy/config/environments/test.rb +42 -0
  58. data/test/dummy/config/initializers/assets.rb +11 -0
  59. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  60. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  61. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  62. data/test/dummy/config/initializers/inflections.rb +16 -0
  63. data/test/dummy/config/initializers/mime_types.rb +4 -0
  64. data/test/dummy/config/initializers/session_store.rb +3 -0
  65. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  66. data/test/dummy/config/locales/en.yml +23 -0
  67. data/test/dummy/config/routes.rb +4 -0
  68. data/test/dummy/config/secrets.yml +22 -0
  69. data/test/dummy/db/schema.rb +34 -0
  70. data/test/dummy/db/test.sqlite3 +0 -0
  71. data/test/dummy/log/test.log +10238 -0
  72. data/test/dummy/public/404.html +67 -0
  73. data/test/dummy/public/422.html +67 -0
  74. data/test/dummy/public/500.html +66 -0
  75. data/test/dummy/public/favicon.ico +0 -0
  76. data/test/dummy/tmp/cache/assets/test/sprockets/7e439048c89c95bfde77609c4b119aef +0 -0
  77. data/test/dummy/tmp/cache/assets/test/sprockets/91621687e7dac71b8a566c4dbcecde96 +0 -0
  78. data/test/dummy/tmp/cache/assets/test/sprockets/9d1c7539b482b1c2ffa085bd26729895 +0 -0
  79. data/test/dummy/tmp/cache/assets/test/sprockets/b706477a353ac2248f013097788efb85 +0 -0
  80. data/test/dummy/tmp/cache/assets/test/sprockets/c23568af9c4b124555ced351478e21cd +0 -0
  81. data/test/dummy/tmp/cache/assets/test/sprockets/ca1c23ae80a4f7e2f04c1e9aa40d2d42 +0 -0
  82. data/test/dummy/tmp/cache/assets/test/sprockets/d8510a98424b7a23248a15c9151f0daf +0 -0
  83. data/test/dummy/tmp/cache/assets/test/sprockets/e00f432644dd66e5bd6ae31eafdd9511 +0 -0
  84. data/test/dummy/tmp/cache/assets/test/sprockets/ec9d2f32f08b260672f48c6e00ac3c8b +0 -0
  85. data/test/dummy/tmp/cache/assets/test/sprockets/ed1bbbbceac3d159210843f2da897105 +0 -0
  86. data/test/dummy/tmp/cache/assets/test/sprockets/f603fd5b82c54beb733ddc055fd6daf1 +0 -0
  87. data/test/dummy/tmp/cache/assets/test/sprockets/f762c0c4cbb8ace1fa3d7f760c74f6c8 +0 -0
  88. data/test/dummy/tmp/cache/assets/test/sprockets/f7afdd8c341387bba687dddcc3ee6d50 +0 -0
  89. data/test/dummy/tmp/cache/assets/test/sprockets/f9920f7a4f1a87f298d2df81feb570e5 +0 -0
  90. data/test/fixtures/active_batch/batches.yml +5 -0
  91. data/test/fixtures/active_batch/work_units.yml +5 -0
  92. data/test/integration/navigation_test.rb +10 -0
  93. data/test/jobs/active_batch/batch_scheduler_job_test.rb +41 -0
  94. data/test/jobs/active_batch/batch_status_check_job_test.rb +51 -0
  95. data/test/jobs/batch_job.rb +21 -0
  96. data/test/jobs/rescue_job.rb +9 -0
  97. data/test/lib/active_batch/batched_job_test.rb +21 -0
  98. data/test/models/active_batch/batch_test.rb +9 -0
  99. data/test/models/active_batch/work_unit_test.rb +19 -0
  100. data/test/test_helper.rb +21 -0
  101. metadata +236 -0
@@ -0,0 +1,21 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
5
+ ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
6
+ ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
7
+ require "rails/test_help"
8
+ require "jobs/batch_job"
9
+ require "jobs/rescue_job"
10
+
11
+ # Filter out Minitest backtrace while allowing backtrace from other libraries
12
+ # to be shown.
13
+ Minitest.backtrace_filter = Minitest::BacktraceFilter.new
14
+
15
+ # Load support files
16
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
17
+
18
+ # Load fixtures from the engine
19
+ if ActiveSupport::TestCase.respond_to?(:fixture_path=)
20
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
21
+ end
metadata ADDED
@@ -0,0 +1,236 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: active_batch
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - adrien
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 4.2.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 4.2.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: sqlite3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Allows handling batch of ActiveJobs
42
+ email:
43
+ - adrien.montfort@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - MIT-LICENSE
49
+ - README.rdoc
50
+ - Rakefile
51
+ - app/assets/javascripts/active_batch/application.js
52
+ - app/assets/javascripts/active_batch/batches.js
53
+ - app/assets/javascripts/active_batch/jobs.js
54
+ - app/assets/stylesheets/active_batch/application.css
55
+ - app/assets/stylesheets/active_batch/batches.css
56
+ - app/assets/stylesheets/active_batch/jobs.css
57
+ - app/assets/stylesheets/scaffold.css
58
+ - app/controllers/active_batch/application_controller.rb
59
+ - app/controllers/active_batch/batches_controller.rb
60
+ - app/controllers/active_batch/work_units_controller.rb
61
+ - app/helpers/active_batch/application_helper.rb
62
+ - app/helpers/active_batch/batches_helper.rb
63
+ - app/helpers/active_batch/jobs_helper.rb
64
+ - app/jobs/active_batch/batch_scheduler_job.rb
65
+ - app/jobs/active_batch/batch_status_check_job.rb
66
+ - app/models/active_batch/batch.rb
67
+ - app/models/active_batch/work_unit.rb
68
+ - app/views/active_batch/batches/_form.html.erb
69
+ - app/views/active_batch/batches/index.html.erb
70
+ - app/views/active_batch/batches/new.html.erb
71
+ - app/views/active_batch/batches/show.html.erb
72
+ - app/views/active_batch/work_units/index.html.erb
73
+ - app/views/active_batch/work_units/show.html.erb
74
+ - config/routes.rb
75
+ - db/migrate/20150319101734_create_active_batch_tables.rb
76
+ - lib/active_batch.rb
77
+ - lib/active_batch/batched_job.rb
78
+ - lib/active_batch/engine.rb
79
+ - lib/active_batch/transactional_batched_job.rb
80
+ - lib/active_batch/version.rb
81
+ - lib/tasks/active_batch_tasks.rake
82
+ - test/active_batch_test.rb
83
+ - test/controllers/active_batch/batches_controller_test.rb
84
+ - test/controllers/active_batch/work_units_controller_test.rb
85
+ - test/dummy/README.rdoc
86
+ - test/dummy/Rakefile
87
+ - test/dummy/app/assets/javascripts/application.js
88
+ - test/dummy/app/assets/stylesheets/application.css
89
+ - test/dummy/app/controllers/application_controller.rb
90
+ - test/dummy/app/helpers/application_helper.rb
91
+ - test/dummy/app/views/layouts/application.html.erb
92
+ - test/dummy/bin/bundle
93
+ - test/dummy/bin/rails
94
+ - test/dummy/bin/rake
95
+ - test/dummy/bin/setup
96
+ - test/dummy/config.ru
97
+ - test/dummy/config/application.rb
98
+ - test/dummy/config/boot.rb
99
+ - test/dummy/config/database.yml
100
+ - test/dummy/config/environment.rb
101
+ - test/dummy/config/environments/development.rb
102
+ - test/dummy/config/environments/production.rb
103
+ - test/dummy/config/environments/test.rb
104
+ - test/dummy/config/initializers/assets.rb
105
+ - test/dummy/config/initializers/backtrace_silencers.rb
106
+ - test/dummy/config/initializers/cookies_serializer.rb
107
+ - test/dummy/config/initializers/filter_parameter_logging.rb
108
+ - test/dummy/config/initializers/inflections.rb
109
+ - test/dummy/config/initializers/mime_types.rb
110
+ - test/dummy/config/initializers/session_store.rb
111
+ - test/dummy/config/initializers/wrap_parameters.rb
112
+ - test/dummy/config/locales/en.yml
113
+ - test/dummy/config/routes.rb
114
+ - test/dummy/config/secrets.yml
115
+ - test/dummy/db/schema.rb
116
+ - test/dummy/db/test.sqlite3
117
+ - test/dummy/log/test.log
118
+ - test/dummy/public/404.html
119
+ - test/dummy/public/422.html
120
+ - test/dummy/public/500.html
121
+ - test/dummy/public/favicon.ico
122
+ - test/dummy/tmp/cache/assets/test/sprockets/7e439048c89c95bfde77609c4b119aef
123
+ - test/dummy/tmp/cache/assets/test/sprockets/91621687e7dac71b8a566c4dbcecde96
124
+ - test/dummy/tmp/cache/assets/test/sprockets/9d1c7539b482b1c2ffa085bd26729895
125
+ - test/dummy/tmp/cache/assets/test/sprockets/b706477a353ac2248f013097788efb85
126
+ - test/dummy/tmp/cache/assets/test/sprockets/c23568af9c4b124555ced351478e21cd
127
+ - test/dummy/tmp/cache/assets/test/sprockets/ca1c23ae80a4f7e2f04c1e9aa40d2d42
128
+ - test/dummy/tmp/cache/assets/test/sprockets/d8510a98424b7a23248a15c9151f0daf
129
+ - test/dummy/tmp/cache/assets/test/sprockets/e00f432644dd66e5bd6ae31eafdd9511
130
+ - test/dummy/tmp/cache/assets/test/sprockets/ec9d2f32f08b260672f48c6e00ac3c8b
131
+ - test/dummy/tmp/cache/assets/test/sprockets/ed1bbbbceac3d159210843f2da897105
132
+ - test/dummy/tmp/cache/assets/test/sprockets/f603fd5b82c54beb733ddc055fd6daf1
133
+ - test/dummy/tmp/cache/assets/test/sprockets/f762c0c4cbb8ace1fa3d7f760c74f6c8
134
+ - test/dummy/tmp/cache/assets/test/sprockets/f7afdd8c341387bba687dddcc3ee6d50
135
+ - test/dummy/tmp/cache/assets/test/sprockets/f9920f7a4f1a87f298d2df81feb570e5
136
+ - test/fixtures/active_batch/batches.yml
137
+ - test/fixtures/active_batch/work_units.yml
138
+ - test/integration/navigation_test.rb
139
+ - test/jobs/active_batch/batch_scheduler_job_test.rb
140
+ - test/jobs/active_batch/batch_status_check_job_test.rb
141
+ - test/jobs/batch_job.rb
142
+ - test/jobs/rescue_job.rb
143
+ - test/lib/active_batch/batched_job_test.rb
144
+ - test/models/active_batch/batch_test.rb
145
+ - test/models/active_batch/work_unit_test.rb
146
+ - test/test_helper.rb
147
+ homepage: https://github.com/idolweb/active_batch
148
+ licenses:
149
+ - MIT
150
+ metadata: {}
151
+ post_install_message:
152
+ rdoc_options: []
153
+ require_paths:
154
+ - lib
155
+ required_ruby_version: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ required_rubygems_version: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ requirements: []
166
+ rubyforge_project:
167
+ rubygems_version: 2.4.5
168
+ signing_key:
169
+ specification_version: 4
170
+ summary: Batch of ActiveJobs
171
+ test_files:
172
+ - test/active_batch_test.rb
173
+ - test/controllers/active_batch/batches_controller_test.rb
174
+ - test/controllers/active_batch/work_units_controller_test.rb
175
+ - test/dummy/app/assets/javascripts/application.js
176
+ - test/dummy/app/assets/stylesheets/application.css
177
+ - test/dummy/app/controllers/application_controller.rb
178
+ - test/dummy/app/helpers/application_helper.rb
179
+ - test/dummy/app/views/layouts/application.html.erb
180
+ - test/dummy/bin/bundle
181
+ - test/dummy/bin/rails
182
+ - test/dummy/bin/rake
183
+ - test/dummy/bin/setup
184
+ - test/dummy/config/application.rb
185
+ - test/dummy/config/boot.rb
186
+ - test/dummy/config/database.yml
187
+ - test/dummy/config/environment.rb
188
+ - test/dummy/config/environments/development.rb
189
+ - test/dummy/config/environments/production.rb
190
+ - test/dummy/config/environments/test.rb
191
+ - test/dummy/config/initializers/assets.rb
192
+ - test/dummy/config/initializers/backtrace_silencers.rb
193
+ - test/dummy/config/initializers/cookies_serializer.rb
194
+ - test/dummy/config/initializers/filter_parameter_logging.rb
195
+ - test/dummy/config/initializers/inflections.rb
196
+ - test/dummy/config/initializers/mime_types.rb
197
+ - test/dummy/config/initializers/session_store.rb
198
+ - test/dummy/config/initializers/wrap_parameters.rb
199
+ - test/dummy/config/locales/en.yml
200
+ - test/dummy/config/routes.rb
201
+ - test/dummy/config/secrets.yml
202
+ - test/dummy/config.ru
203
+ - test/dummy/db/schema.rb
204
+ - test/dummy/db/test.sqlite3
205
+ - test/dummy/log/test.log
206
+ - test/dummy/public/404.html
207
+ - test/dummy/public/422.html
208
+ - test/dummy/public/500.html
209
+ - test/dummy/public/favicon.ico
210
+ - test/dummy/Rakefile
211
+ - test/dummy/README.rdoc
212
+ - test/dummy/tmp/cache/assets/test/sprockets/7e439048c89c95bfde77609c4b119aef
213
+ - test/dummy/tmp/cache/assets/test/sprockets/91621687e7dac71b8a566c4dbcecde96
214
+ - test/dummy/tmp/cache/assets/test/sprockets/9d1c7539b482b1c2ffa085bd26729895
215
+ - test/dummy/tmp/cache/assets/test/sprockets/b706477a353ac2248f013097788efb85
216
+ - test/dummy/tmp/cache/assets/test/sprockets/c23568af9c4b124555ced351478e21cd
217
+ - test/dummy/tmp/cache/assets/test/sprockets/ca1c23ae80a4f7e2f04c1e9aa40d2d42
218
+ - test/dummy/tmp/cache/assets/test/sprockets/d8510a98424b7a23248a15c9151f0daf
219
+ - test/dummy/tmp/cache/assets/test/sprockets/e00f432644dd66e5bd6ae31eafdd9511
220
+ - test/dummy/tmp/cache/assets/test/sprockets/ec9d2f32f08b260672f48c6e00ac3c8b
221
+ - test/dummy/tmp/cache/assets/test/sprockets/ed1bbbbceac3d159210843f2da897105
222
+ - test/dummy/tmp/cache/assets/test/sprockets/f603fd5b82c54beb733ddc055fd6daf1
223
+ - test/dummy/tmp/cache/assets/test/sprockets/f762c0c4cbb8ace1fa3d7f760c74f6c8
224
+ - test/dummy/tmp/cache/assets/test/sprockets/f7afdd8c341387bba687dddcc3ee6d50
225
+ - test/dummy/tmp/cache/assets/test/sprockets/f9920f7a4f1a87f298d2df81feb570e5
226
+ - test/fixtures/active_batch/batches.yml
227
+ - test/fixtures/active_batch/work_units.yml
228
+ - test/integration/navigation_test.rb
229
+ - test/jobs/active_batch/batch_scheduler_job_test.rb
230
+ - test/jobs/active_batch/batch_status_check_job_test.rb
231
+ - test/jobs/batch_job.rb
232
+ - test/jobs/rescue_job.rb
233
+ - test/lib/active_batch/batched_job_test.rb
234
+ - test/models/active_batch/batch_test.rb
235
+ - test/models/active_batch/work_unit_test.rb
236
+ - test/test_helper.rb