delayed_job_progress 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.travis.yml +3 -1
- data/README.md +28 -8
- data/Rakefile +1 -1
- data/delayed_job_progress.gemspec +1 -1
- data/lib/delayed_job_progress/version.rb +1 -1
- data/progress.gif +0 -0
- data/test/Gemfile.rails-5.0 +5 -0
- data/test/dummy/Rakefile +1 -1
- data/test/dummy/app/assets/config/manifest.js +5 -0
- data/test/dummy/app/assets/javascripts/application.js +1 -1
- data/test/dummy/app/assets/javascripts/cable.js +13 -0
- data/test/dummy/app/{mailers → assets/javascripts/channels}/.keep +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +3 -3
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -2
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/application_record.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +9 -9
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/rails +1 -1
- data/test/dummy/bin/setup +21 -12
- data/test/dummy/bin/update +29 -0
- data/test/dummy/bin/yarn +11 -0
- data/test/dummy/config.ru +2 -1
- data/test/dummy/config/application.rb +4 -12
- data/test/dummy/config/boot.rb +2 -2
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/database.yml +1 -1
- data/test/dummy/config/environment.rb +1 -1
- data/test/dummy/config/environments/development.rb +24 -11
- data/test/dummy/config/environments/production.rb +28 -16
- data/test/dummy/config/environments/test.rb +6 -6
- data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/test/dummy/config/initializers/assets.rb +6 -3
- data/test/dummy/config/initializers/cookies_serializer.rb +2 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +2 -2
- data/test/dummy/config/locales/en.yml +10 -0
- data/test/dummy/config/puma.rb +56 -0
- data/test/dummy/config/routes.rb +0 -1
- data/test/dummy/config/secrets.yml +15 -5
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/package.json +5 -0
- data/test/dummy/public/404.html +6 -6
- data/test/dummy/public/422.html +6 -6
- data/test/dummy/public/500.html +6 -6
- data/test/dummy/{app/models/.keep → public/apple-touch-icon-precomposed.png} +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/extensions/job_test.rb +3 -3
- data/test/extensions/worker_test.rb +2 -2
- data/test/jobs_controller_test.rb +7 -7
- metadata +68 -44
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/config/initializers/session_store.rb +0 -3
@@ -22,8 +22,8 @@ class WorkerTest < ActiveSupport::TestCase
|
|
22
22
|
assert job.completed_at.present?
|
23
23
|
assert_equal 1000, job.progress_current
|
24
24
|
assert_equal 'complete', job.message
|
25
|
-
|
26
|
-
|
25
|
+
assert_nil job.locked_by
|
26
|
+
assert_nil job.locked_at
|
27
27
|
end
|
28
28
|
|
29
29
|
def test_run_job_and_destroy
|
@@ -20,23 +20,23 @@ module DelayedJobProgress
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def test_index_record_filtering
|
23
|
-
get :index, record_type: @thing.class, record_id: @thing.id
|
23
|
+
get :index, params: { record_type: @thing.class, record_id: @thing.id }
|
24
24
|
assert_response :success
|
25
25
|
data = JSON.parse(response.body)
|
26
26
|
assert data.is_a?(Array)
|
27
27
|
assert_equal 1, data.count
|
28
28
|
|
29
|
-
get :index, record_type: 'invalid', record_id: @thing.id
|
29
|
+
get :index, params: { record_type: 'invalid', record_id: @thing.id }
|
30
30
|
assert_response :success
|
31
31
|
assert_equal [], JSON.parse(response.body)
|
32
32
|
|
33
|
-
get :index, record_type: @thing.class, record_id: 'invalid'
|
33
|
+
get :index, params: { record_type: @thing.class, record_id: 'invalid' }
|
34
34
|
assert_response :success
|
35
35
|
assert_equal [], JSON.parse(response.body)
|
36
36
|
end
|
37
37
|
|
38
38
|
def test_show
|
39
|
-
get :show, id: @job.id
|
39
|
+
get :show, params: { id: @job.id }
|
40
40
|
assert_response :success
|
41
41
|
data = JSON.parse(response.body)
|
42
42
|
assert_equal 'unique_identifier', data['identifier']
|
@@ -49,14 +49,14 @@ module DelayedJobProgress
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def test_show_failure
|
52
|
-
get :show, id: 'invalid'
|
52
|
+
get :show, params: { id: 'invalid' }
|
53
53
|
assert_response :not_found
|
54
54
|
assert_equal ({'error' => 'Job not found'}), JSON.parse(response.body)
|
55
55
|
end
|
56
56
|
|
57
57
|
def test_destroy
|
58
58
|
assert_difference 'Delayed::Job.count', -1 do
|
59
|
-
delete :destroy, id: @job.id
|
59
|
+
delete :destroy, params: { id: @job.id }
|
60
60
|
assert_response :no_content
|
61
61
|
end
|
62
62
|
end
|
@@ -64,7 +64,7 @@ module DelayedJobProgress
|
|
64
64
|
def test_reset
|
65
65
|
@job.update_column(:failed_at, Time.now)
|
66
66
|
|
67
|
-
post :reload, id: @job
|
67
|
+
post :reload, params: { id: @job }
|
68
68
|
assert_response :success
|
69
69
|
|
70
70
|
@job.reload
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed_job_progress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleg Khabarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 4.0.0
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '5'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +24,6 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 4.0.0
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '5'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: delayed_job
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,51 +90,66 @@ files:
|
|
96
90
|
- lib/delayed_job_progress/version.rb
|
97
91
|
- lib/generators/delayed_job/progress_generator.rb
|
98
92
|
- lib/generators/delayed_job/templates/progress_migration.rb
|
93
|
+
- progress.gif
|
94
|
+
- test/Gemfile.rails-5.0
|
99
95
|
- test/delayed_job_progress_test.rb
|
100
|
-
- test/dummy/README.rdoc
|
101
96
|
- test/dummy/Rakefile
|
97
|
+
- test/dummy/app/assets/config/manifest.js
|
102
98
|
- test/dummy/app/assets/images/.keep
|
103
99
|
- test/dummy/app/assets/javascripts/application.js
|
100
|
+
- test/dummy/app/assets/javascripts/cable.js
|
101
|
+
- test/dummy/app/assets/javascripts/channels/.keep
|
104
102
|
- test/dummy/app/assets/stylesheets/application.css
|
103
|
+
- test/dummy/app/channels/application_cable/channel.rb
|
104
|
+
- test/dummy/app/channels/application_cable/connection.rb
|
105
105
|
- test/dummy/app/controllers/application_controller.rb
|
106
106
|
- test/dummy/app/controllers/concerns/.keep
|
107
107
|
- test/dummy/app/helpers/application_helper.rb
|
108
|
-
- test/dummy/app/
|
109
|
-
- test/dummy/app/
|
108
|
+
- test/dummy/app/jobs/application_job.rb
|
109
|
+
- test/dummy/app/mailers/application_mailer.rb
|
110
|
+
- test/dummy/app/models/application_record.rb
|
110
111
|
- test/dummy/app/models/concerns/.keep
|
111
112
|
- test/dummy/app/views/layouts/application.html.erb
|
113
|
+
- test/dummy/app/views/layouts/mailer.html.erb
|
114
|
+
- test/dummy/app/views/layouts/mailer.text.erb
|
112
115
|
- test/dummy/bin/bundle
|
113
116
|
- test/dummy/bin/rails
|
114
117
|
- test/dummy/bin/rake
|
115
118
|
- test/dummy/bin/setup
|
119
|
+
- test/dummy/bin/update
|
120
|
+
- test/dummy/bin/yarn
|
116
121
|
- test/dummy/config.ru
|
117
122
|
- test/dummy/config/application.rb
|
118
123
|
- test/dummy/config/boot.rb
|
124
|
+
- test/dummy/config/cable.yml
|
119
125
|
- test/dummy/config/database.yml
|
120
126
|
- test/dummy/config/environment.rb
|
121
127
|
- test/dummy/config/environments/development.rb
|
122
128
|
- test/dummy/config/environments/production.rb
|
123
129
|
- test/dummy/config/environments/test.rb
|
130
|
+
- test/dummy/config/initializers/application_controller_renderer.rb
|
124
131
|
- test/dummy/config/initializers/assets.rb
|
125
132
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
126
133
|
- test/dummy/config/initializers/cookies_serializer.rb
|
127
134
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
128
135
|
- test/dummy/config/initializers/inflections.rb
|
129
136
|
- test/dummy/config/initializers/mime_types.rb
|
130
|
-
- test/dummy/config/initializers/session_store.rb
|
131
137
|
- test/dummy/config/initializers/wrap_parameters.rb
|
132
138
|
- test/dummy/config/locales/en.yml
|
139
|
+
- test/dummy/config/puma.rb
|
133
140
|
- test/dummy/config/routes.rb
|
134
141
|
- test/dummy/config/secrets.yml
|
135
|
-
- test/dummy/
|
142
|
+
- test/dummy/config/spring.rb
|
136
143
|
- test/dummy/db/test.sqlite3
|
137
144
|
- test/dummy/lib/assets/.keep
|
138
145
|
- test/dummy/log/.keep
|
139
|
-
- test/dummy/log/development.log
|
140
146
|
- test/dummy/log/test.log
|
147
|
+
- test/dummy/package.json
|
141
148
|
- test/dummy/public/404.html
|
142
149
|
- test/dummy/public/422.html
|
143
150
|
- test/dummy/public/500.html
|
151
|
+
- test/dummy/public/apple-touch-icon-precomposed.png
|
152
|
+
- test/dummy/public/apple-touch-icon.png
|
144
153
|
- test/dummy/public/favicon.ico
|
145
154
|
- test/extensions/job_test.rb
|
146
155
|
- test/extensions/worker_test.rb
|
@@ -167,52 +176,67 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
176
|
version: '0'
|
168
177
|
requirements: []
|
169
178
|
rubyforge_project:
|
170
|
-
rubygems_version: 2.
|
179
|
+
rubygems_version: 2.6.11
|
171
180
|
signing_key:
|
172
181
|
specification_version: 4
|
173
182
|
summary: DelayedJob Progress extension
|
174
183
|
test_files:
|
175
184
|
- test/delayed_job_progress_test.rb
|
176
|
-
- test/
|
177
|
-
- test/
|
178
|
-
- test/
|
179
|
-
- test/dummy/app/helpers/application_helper.rb
|
180
|
-
- test/dummy/app/views/layouts/application.html.erb
|
181
|
-
- test/dummy/bin/bundle
|
182
|
-
- test/dummy/bin/rails
|
183
|
-
- test/dummy/bin/rake
|
184
|
-
- test/dummy/bin/setup
|
185
|
+
- test/generator_test.rb
|
186
|
+
- test/test_helper.rb
|
187
|
+
- test/jobs_controller_test.rb
|
185
188
|
- test/dummy/config/application.rb
|
186
|
-
- test/dummy/config/
|
189
|
+
- test/dummy/config/spring.rb
|
190
|
+
- test/dummy/config/puma.rb
|
187
191
|
- test/dummy/config/database.yml
|
188
192
|
- test/dummy/config/environment.rb
|
189
|
-
- test/dummy/config/environments/development.rb
|
190
|
-
- test/dummy/config/environments/production.rb
|
191
|
-
- test/dummy/config/environments/test.rb
|
192
|
-
- test/dummy/config/initializers/assets.rb
|
193
193
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
194
194
|
- test/dummy/config/initializers/cookies_serializer.rb
|
195
|
-
- test/dummy/config/initializers/
|
195
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
196
196
|
- test/dummy/config/initializers/inflections.rb
|
197
|
+
- test/dummy/config/initializers/assets.rb
|
198
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
199
|
+
- test/dummy/config/initializers/application_controller_renderer.rb
|
197
200
|
- test/dummy/config/initializers/mime_types.rb
|
198
|
-
- test/dummy/config/initializers/session_store.rb
|
199
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
200
|
-
- test/dummy/config/locales/en.yml
|
201
|
-
- test/dummy/config/routes.rb
|
202
201
|
- test/dummy/config/secrets.yml
|
203
|
-
- test/dummy/config.
|
204
|
-
- test/dummy/
|
202
|
+
- test/dummy/config/environments/development.rb
|
203
|
+
- test/dummy/config/environments/production.rb
|
204
|
+
- test/dummy/config/environments/test.rb
|
205
|
+
- test/dummy/config/routes.rb
|
206
|
+
- test/dummy/config/cable.yml
|
207
|
+
- test/dummy/config/locales/en.yml
|
208
|
+
- test/dummy/config/boot.rb
|
209
|
+
- test/dummy/Rakefile
|
205
210
|
- test/dummy/db/test.sqlite3
|
206
|
-
- test/dummy/log/development.log
|
207
211
|
- test/dummy/log/test.log
|
208
|
-
- test/dummy/public/
|
209
|
-
- test/dummy/public/422.html
|
212
|
+
- test/dummy/public/apple-touch-icon-precomposed.png
|
210
213
|
- test/dummy/public/500.html
|
211
214
|
- test/dummy/public/favicon.ico
|
212
|
-
- test/dummy/
|
213
|
-
- test/dummy/
|
215
|
+
- test/dummy/public/404.html
|
216
|
+
- test/dummy/public/422.html
|
217
|
+
- test/dummy/public/apple-touch-icon.png
|
218
|
+
- test/dummy/bin/setup
|
219
|
+
- test/dummy/bin/rake
|
220
|
+
- test/dummy/bin/rails
|
221
|
+
- test/dummy/bin/update
|
222
|
+
- test/dummy/bin/yarn
|
223
|
+
- test/dummy/bin/bundle
|
224
|
+
- test/dummy/config.ru
|
225
|
+
- test/dummy/app/helpers/application_helper.rb
|
226
|
+
- test/dummy/app/views/layouts/mailer.html.erb
|
227
|
+
- test/dummy/app/views/layouts/application.html.erb
|
228
|
+
- test/dummy/app/views/layouts/mailer.text.erb
|
229
|
+
- test/dummy/app/models/application_record.rb
|
230
|
+
- test/dummy/app/channels/application_cable/channel.rb
|
231
|
+
- test/dummy/app/channels/application_cable/connection.rb
|
232
|
+
- test/dummy/app/controllers/application_controller.rb
|
233
|
+
- test/dummy/app/jobs/application_job.rb
|
234
|
+
- test/dummy/app/assets/config/manifest.js
|
235
|
+
- test/dummy/app/assets/javascripts/application.js
|
236
|
+
- test/dummy/app/assets/javascripts/cable.js
|
237
|
+
- test/dummy/app/assets/stylesheets/application.css
|
238
|
+
- test/dummy/app/mailers/application_mailer.rb
|
239
|
+
- test/dummy/package.json
|
240
|
+
- test/Gemfile.rails-5.0
|
214
241
|
- test/extensions/job_test.rb
|
215
242
|
- test/extensions/worker_test.rb
|
216
|
-
- test/generator_test.rb
|
217
|
-
- test/jobs_controller_test.rb
|
218
|
-
- test/test_helper.rb
|
data/test/dummy/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
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>.
|