sucker_punch 1.1 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -1
- data/README.md +3 -3
- data/lib/sucker_punch/testing/inline.rb +1 -1
- data/lib/sucker_punch/version.rb +1 -1
- data/spec/sucker_punch/job_spec.rb +3 -3
- data/spec/sucker_punch_spec.rb +2 -2
- data/sucker_punch.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca5c2b88a28de002a720c0921507cd671cc03429
|
4
|
+
data.tar.gz: a689abb36e1a358a064bc3e12d9c0a061e252567
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35739fb7b9d0599f9a88b03e8565e2f941df5743cf83d88ce3f130f598614e158ff18bbc29574e0f97ea46a2654b3eade81f8778219e0739b4acb73e32c0fee7
|
7
|
+
data.tar.gz: cea602e10301105017d8a72076c51bf17b2a981054890e3d23e5026681daa20bb9f15d377e64846f27f1bd93b19d433b490c03140d737d607085244b856bb641
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -23,10 +23,10 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
## Usage
|
25
25
|
|
26
|
-
Each job should be a separate Ruby class
|
26
|
+
Each job acts as its own queue and should be a separate Ruby class that:
|
27
27
|
|
28
|
-
*
|
29
|
-
*
|
28
|
+
* includes `SuckerPunch::Job`
|
29
|
+
* defines the instance method `perform` that includes the code the job will run when enqueued
|
30
30
|
|
31
31
|
|
32
32
|
```Ruby
|
data/lib/sucker_punch/version.rb
CHANGED
@@ -17,7 +17,7 @@ describe SuckerPunch::Job do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it "includes Celluloid into requesting class when included" do
|
20
|
-
FakeJob.
|
20
|
+
expect(FakeJob).to respond_to(:pool)
|
21
21
|
end
|
22
22
|
|
23
23
|
it "sets the pool size to 4" do
|
@@ -34,8 +34,8 @@ describe SuckerPunch::Job do
|
|
34
34
|
describe "when pool hasn't been created" do
|
35
35
|
it "registers queue" do
|
36
36
|
queue = double("queue")
|
37
|
-
SuckerPunch::Queue.
|
38
|
-
queue.
|
37
|
+
allow(SuckerPunch::Queue).to receive(:new).and_return(queue)
|
38
|
+
expect(queue).to receive(:register){ 4 }
|
39
39
|
pool = FakeJob.new
|
40
40
|
end
|
41
41
|
end
|
data/spec/sucker_punch_spec.rb
CHANGED
@@ -3,11 +3,11 @@ require 'spec_helper'
|
|
3
3
|
describe SuckerPunch do
|
4
4
|
describe 'logger' do
|
5
5
|
it "delegates get to Celluloid's logger" do
|
6
|
-
SuckerPunch.logger.
|
6
|
+
expect(SuckerPunch.logger).to eq Celluloid.logger
|
7
7
|
end
|
8
8
|
|
9
9
|
it "delegates set to Celluloid's logger" do
|
10
|
-
Celluloid.
|
10
|
+
expect(Celluloid).to receive(:logger=)
|
11
11
|
SuckerPunch.logger = nil
|
12
12
|
end
|
13
13
|
end
|
data/sucker_punch.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sucker_punch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Hilkert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.16.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.16.0
|
69
69
|
description: Asynchronous processing library for Ruby
|
70
70
|
email:
|
71
71
|
- brandonhilkert@gmail.com
|