rabbit_jobs 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -126,6 +126,10 @@ module RabbitJobs
126
126
  def perform_async(*args)
127
127
  RJ::Publisher.publish_to(@rj_queue || :jobs, self, *args)
128
128
  end
129
+
130
+ def perform(*params)
131
+ new.perform(*params)
132
+ end
129
133
  end
130
134
 
131
135
  def self.parse(payload)
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
3
  module RabbitJobs
4
- VERSION = "0.8.1"
4
+ VERSION = "0.8.2"
5
5
  end
@@ -7,7 +7,7 @@ describe RabbitJobs::Consumer::JobConsumer do
7
7
 
8
8
  describe '#process_message' do
9
9
  it 'parses job' do
10
- payload = Job.serialize(TestJob)
10
+ payload = RJ::Job.serialize(TestJob)
11
11
  mock(RJ::Job).parse(payload) { job }
12
12
  consumer.process_message(:delivery_info, :properties, payload)
13
13
  end
@@ -17,7 +17,7 @@ describe RabbitJobs::Consumer::JobConsumer do
17
17
  consumer.process_message(:delivery_info, :properties, payload).should == true
18
18
  end
19
19
  it 'skips expired jobs' do
20
- payload = Job.serialize(TestJob)
20
+ payload = RJ::Job.serialize(TestJob)
21
21
  job
22
22
  mock(TestJob).new { job }
23
23
  mock(job).expired? { true }
@@ -26,7 +26,7 @@ describe RabbitJobs::Consumer::JobConsumer do
26
26
  end
27
27
 
28
28
  it 'executes job.perform' do
29
- payload = Job.serialize(TestJob)
29
+ payload = RJ::Job.serialize(TestJob)
30
30
  job
31
31
  mock(TestJob).new { job }
32
32
  mock(job).run_perform
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbit_jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-03-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bunny
16
- requirement: &7931660 !ruby/object:Gem::Requirement
16
+ requirement: &17481960 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - =
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.9.0.pre8
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *7931660
24
+ version_requirements: *17481960
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &8325480 !ruby/object:Gem::Requirement
27
+ requirement: &17480840 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *8325480
35
+ version_requirements: *17480840
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rufus-scheduler
38
- requirement: &8323900 !ruby/object:Gem::Requirement
38
+ requirement: &17872360 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '2.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *8323900
46
+ version_requirements: *17872360
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rails
49
- requirement: &8321560 !ruby/object:Gem::Requirement
49
+ requirement: &17870860 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '3.0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *8321560
57
+ version_requirements: *17870860
58
58
  description: Background jobs on RabbitMQ
59
59
  email:
60
60
  - lazureykis@gmail.com
@@ -117,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  segments:
119
119
  - 0
120
- hash: 1351375316999507504
120
+ hash: -735389398480187313
121
121
  required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  none: false
123
123
  requirements:
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  segments:
128
128
  - 0
129
- hash: 1351375316999507504
129
+ hash: -735389398480187313
130
130
  requirements: []
131
131
  rubyforge_project:
132
132
  rubygems_version: 1.8.11