delayed_job 3.0.3 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +1 -16
- data/contrib/delayed_job_multiple.monitrc +11 -0
- data/lib/delayed/backend/base.rb +2 -1
- data/lib/delayed/backend/shared_spec.rb +149 -169
- data/lib/delayed/performable_method.rb +2 -2
- data/lib/delayed/psych_ext.rb +1 -5
- data/lib/delayed/recipes.rb +7 -3
- data/lib/delayed/serialization/active_record.rb +1 -5
- data/lib/delayed/worker.rb +5 -2
- data/spec/lifecycle_spec.rb +5 -5
- data/spec/message_sending_spec.rb +45 -38
- data/spec/performable_mailer_spec.rb +10 -10
- data/spec/performable_method_spec.rb +17 -17
- data/spec/spec_helper.rb +4 -0
- data/spec/test_backend_spec.rb +2 -2
- data/spec/worker_spec.rb +25 -4
- data/spec/yaml_ext_spec.rb +18 -24
- metadata +6 -7
- data/spec/fixtures/bad_alias.yml +0 -1
data/spec/yaml_ext_spec.rb
CHANGED
@@ -1,41 +1,35 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe "YAML" do
|
4
|
-
it "
|
5
|
-
|
4
|
+
it "autoloads classes" do
|
5
|
+
expect {
|
6
6
|
yaml = "--- !ruby/class Autoloaded::Clazz\n"
|
7
|
-
YAML.load(yaml).
|
8
|
-
}.
|
7
|
+
expect(YAML.load(yaml)).to eq(Autoloaded::Clazz)
|
8
|
+
}.not_to raise_error
|
9
9
|
end
|
10
10
|
|
11
|
-
it "
|
12
|
-
|
11
|
+
it "autoloads the class of a struct" do
|
12
|
+
expect {
|
13
13
|
yaml = "--- !ruby/class Autoloaded::Struct\n"
|
14
|
-
YAML.load(yaml).
|
15
|
-
}.
|
14
|
+
expect(YAML.load(yaml)).to eq(Autoloaded::Struct)
|
15
|
+
}.not_to raise_error
|
16
16
|
end
|
17
17
|
|
18
|
-
it "
|
19
|
-
|
18
|
+
it "autoloads the class for the instance of a struct" do
|
19
|
+
expect {
|
20
20
|
yaml = "--- !ruby/struct:Autoloaded::InstanceStruct {}"
|
21
|
-
YAML.load(yaml).class.
|
22
|
-
}.
|
21
|
+
expect(YAML.load(yaml).class).to eq(Autoloaded::InstanceStruct)
|
22
|
+
}.not_to raise_error
|
23
23
|
end
|
24
24
|
|
25
|
-
it "
|
26
|
-
|
25
|
+
it "autoloads the class for the instance" do
|
26
|
+
expect {
|
27
27
|
yaml = "--- !ruby/object:Autoloaded::InstanceClazz {}\n"
|
28
|
-
YAML.load(yaml).class.
|
29
|
-
}.
|
28
|
+
expect(YAML.load(yaml).class).to eq(Autoloaded::InstanceClazz)
|
29
|
+
}.not_to raise_error
|
30
30
|
end
|
31
31
|
|
32
|
-
it "
|
33
|
-
|
34
|
-
YAML.load_file(File.expand_path('spec/fixtures/bad_alias.yml'))
|
35
|
-
}.should_not raise_error
|
36
|
-
end
|
37
|
-
|
38
|
-
it "should not throw an uninitialized constant Syck::Syck when using YAML.load with poorly formed yaml" do
|
39
|
-
lambda { YAML.load(YAML.dump("foo: *bar"))}.should_not raise_error
|
32
|
+
it "does not throw an uninitialized constant Syck::Syck when using YAML.load with poorly formed yaml" do
|
33
|
+
expect{ YAML.load(YAML.dump("foo: *bar"))}.not_to raise_error
|
40
34
|
end
|
41
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,10 +11,11 @@ authors:
|
|
11
11
|
- Chris Gaffney
|
12
12
|
- Brandon Keepers
|
13
13
|
- Tobias Lütke
|
14
|
+
- David Genord II
|
14
15
|
autorequire:
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
|
-
date: 2012-
|
18
|
+
date: 2012-11-09 00:00:00.000000000 Z
|
18
19
|
dependencies:
|
19
20
|
- !ruby/object:Gem::Dependency
|
20
21
|
name: activesupport
|
@@ -155,7 +156,6 @@ files:
|
|
155
156
|
- spec/autoloaded/struct.rb
|
156
157
|
- spec/delayed/backend/test.rb
|
157
158
|
- spec/delayed/serialization/test.rb
|
158
|
-
- spec/fixtures/bad_alias.yml
|
159
159
|
- spec/lifecycle_spec.rb
|
160
160
|
- spec/message_sending_spec.rb
|
161
161
|
- spec/performable_mailer_spec.rb
|
@@ -185,7 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
segments:
|
187
187
|
- 0
|
188
|
-
hash:
|
188
|
+
hash: 1239923890963384547
|
189
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
190
|
none: false
|
191
191
|
requirements:
|
@@ -194,10 +194,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
194
|
version: '0'
|
195
195
|
segments:
|
196
196
|
- 0
|
197
|
-
hash:
|
197
|
+
hash: 1239923890963384547
|
198
198
|
requirements: []
|
199
199
|
rubyforge_project:
|
200
|
-
rubygems_version: 1.8.
|
200
|
+
rubygems_version: 1.8.23
|
201
201
|
signing_key:
|
202
202
|
specification_version: 3
|
203
203
|
summary: Database-backed asynchronous priority queue system -- Extracted from Shopify
|
@@ -208,7 +208,6 @@ test_files:
|
|
208
208
|
- spec/autoloaded/struct.rb
|
209
209
|
- spec/delayed/backend/test.rb
|
210
210
|
- spec/delayed/serialization/test.rb
|
211
|
-
- spec/fixtures/bad_alias.yml
|
212
211
|
- spec/lifecycle_spec.rb
|
213
212
|
- spec/message_sending_spec.rb
|
214
213
|
- spec/performable_mailer_spec.rb
|
data/spec/fixtures/bad_alias.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
foo: *bar
|