delayed_job_groups_plugin 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/CHANGELOG.md +4 -0
- data/README.md +2 -0
- data/delayed_job_groups.gemspec +2 -1
- data/lib/delayed/job_groups/job_group.rb +1 -1
- data/lib/delayed/job_groups/version.rb +1 -1
- data/spec/delayed/job_groups/job_group_spec.rb +9 -4
- data/spec/spec_helper.rb +1 -0
- metadata +24 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40f1d73ab96a59d9a844454f73355c43fe4adece
|
4
|
+
data.tar.gz: d3f901a08c15556844f649ec5c63d2ebc8f5ae7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b440e778b155e86b9ed22d00b4737b3d16ab951abffae076614ffea30d7e55cead394a51977b4e23b1f7458eda130b47963360cc6dd0aa38e49b939e3c03a68
|
7
|
+
data.tar.gz: 3855f98e948a154ef67918f1ef8f370da4ab3d6f01a9382a723d530e526e350d0ddbafa613adebd3ed8251b5a4dec35e90d2dd5986d83851d95e6c4d9ec791ca
|
data/.travis.yml
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
language: ruby
|
2
2
|
env:
|
3
3
|
matrix:
|
4
|
-
- RAILS_VERSION="~> 3.2.
|
5
|
-
- RAILS_VERSION="~> 4.0.
|
4
|
+
- RAILS_VERSION="~> 3.2.19" JRUBY_OPTS="$JRUBY_OPTS --debug"
|
5
|
+
- RAILS_VERSION="~> 4.0.10" JRUBY_OPTS="$JRUBY_OPTS --debug"
|
6
6
|
rvm:
|
7
7
|
- 1.9.3
|
8
8
|
- 2.0.0
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# Delayed Job Groups
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/delayed_job_groups_plugin.png)][gem]
|
2
3
|
[![Build Status](https://secure.travis-ci.org/salsify/delayed_job_groups_plugin.png?branch=master)][travis]
|
3
4
|
[![Code Climate](https://codeclimate.com/github/salsify/delayed_job_groups_plugin.png)][codeclimate]
|
4
5
|
[![Coverage Status](https://coveralls.io/repos/salsify/delayed_job_groups_plugin/badge.png)][coveralls]
|
5
6
|
|
7
|
+
[gem]: https://rubygems.org/gems/delayed_job_groups_plugin
|
6
8
|
[travis]: http://travis-ci.org/salsify/delayed_job_groups_plugin
|
7
9
|
[codeclimate]: https://codeclimate.com/github/salsify/delayed_job_groups_plugin
|
8
10
|
[coveralls]: https://coveralls.io/r/salsify/delayed_job_groups_plugin
|
data/delayed_job_groups.gemspec
CHANGED
@@ -24,8 +24,9 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency 'coveralls'
|
25
25
|
spec.add_development_dependency 'database_cleaner', '>= 1.2'
|
26
26
|
spec.add_development_dependency 'rake'
|
27
|
-
spec.add_development_dependency 'rspec', '>= 2.14'
|
27
|
+
spec.add_development_dependency 'rspec', '>= 2.14', '< 2.99'
|
28
28
|
spec.add_development_dependency 'simplecov', '~> 0.7.1'
|
29
|
+
spec.add_development_dependency 'timecop'
|
29
30
|
|
30
31
|
if RUBY_PLATFORM == 'java'
|
31
32
|
spec.add_development_dependency 'jdbc-sqlite3'
|
@@ -18,10 +18,14 @@ describe Delayed::JobGroups::JobGroup do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
before do
|
21
|
-
|
21
|
+
Timecop.freeze(current_time)
|
22
22
|
Delayed::Job.stub(:enqueue)
|
23
23
|
end
|
24
24
|
|
25
|
+
after do
|
26
|
+
Timecop.return
|
27
|
+
end
|
28
|
+
|
25
29
|
shared_examples "the job group was completed" do
|
26
30
|
it "queues the completion job" do
|
27
31
|
Delayed::Job.should have_received(:enqueue).with(on_completion_job, on_completion_job_options)
|
@@ -173,16 +177,17 @@ describe Delayed::JobGroups::JobGroup do
|
|
173
177
|
|
174
178
|
context "when there are pending jobs" do
|
175
179
|
let!(:job) { Delayed::Job.create!(job_group_id: job_group.id, blocked: true) }
|
180
|
+
let(:unblock_time) { Time.utc(2014) }
|
176
181
|
|
177
182
|
before do
|
178
183
|
job_group.mark_queueing_complete
|
179
|
-
job_group.unblock
|
184
|
+
Timecop.freeze(unblock_time) { job_group.unblock }
|
180
185
|
end
|
181
186
|
|
182
187
|
its(:blocked?) { should be_false }
|
183
188
|
|
184
|
-
it "sets the job's run_at to the
|
185
|
-
job.reload.run_at.should eq
|
189
|
+
it "sets the job's run_at to the unblocked time" do
|
190
|
+
job.reload.run_at.should eq unblock_time
|
186
191
|
end
|
187
192
|
|
188
193
|
it_behaves_like "the job group was not completed"
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed_job_groups_plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Turkel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: delayed_job
|
@@ -107,6 +107,9 @@ dependencies:
|
|
107
107
|
- - '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '2.14'
|
110
|
+
- - <
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '2.99'
|
110
113
|
type: :development
|
111
114
|
prerelease: false
|
112
115
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -114,6 +117,9 @@ dependencies:
|
|
114
117
|
- - '>='
|
115
118
|
- !ruby/object:Gem::Version
|
116
119
|
version: '2.14'
|
120
|
+
- - <
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '2.99'
|
117
123
|
- !ruby/object:Gem::Dependency
|
118
124
|
name: simplecov
|
119
125
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,6 +134,20 @@ dependencies:
|
|
128
134
|
- - ~>
|
129
135
|
- !ruby/object:Gem::Version
|
130
136
|
version: 0.7.1
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: timecop
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
type: :development
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - '>='
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
131
151
|
- !ruby/object:Gem::Dependency
|
132
152
|
name: sqlite3
|
133
153
|
requirement: !ruby/object:Gem::Requirement
|
@@ -153,6 +173,7 @@ files:
|
|
153
173
|
- .gitignore
|
154
174
|
- .rspec
|
155
175
|
- .travis.yml
|
176
|
+
- CHANGELOG.md
|
156
177
|
- Gemfile
|
157
178
|
- LICENSE.txt
|
158
179
|
- README.md
|
@@ -192,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
213
|
version: '0'
|
193
214
|
requirements: []
|
194
215
|
rubyforge_project:
|
195
|
-
rubygems_version: 2.
|
216
|
+
rubygems_version: 2.2.2
|
196
217
|
signing_key:
|
197
218
|
specification_version: 4
|
198
219
|
summary: Delayed::Job job groups plugin
|