sisyphus 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f454308987e390a7ae0e4795760f41daf32a6643
4
- data.tar.gz: c37488406b5d180482b9d815d6b912f1eb99f217
3
+ metadata.gz: 09c4ed5586564bbe862e247e22ade9cf3b8d0d91
4
+ data.tar.gz: 89cb27f90e6b9b62e7152cea92866ef3b88f83f1
5
5
  SHA512:
6
- metadata.gz: 1dbd8435f29ff6bda19c1d379f9009e3bb7276f092577600a9a21a7932bf571d81ffbfd04211fa8f84857911bdcd569b05eb70182c944ad31c748f7c0e08ce7b
7
- data.tar.gz: e5b74daf39354ba9585e224645a18c7d1789fd897a16fdb1dd5a74c039ecf3371f2afae4a87d32d7e48c50138d65d796877f4788b48483bb2c77eb25ae4dabcb
6
+ metadata.gz: 1835644e1bb451fa689024a33fba8e1e12f2f6ce6ded605611b4564117ae09f0c67f58c749f984c271ef8eab2509da5f56f3c832e11a3fcf08036830c0503797
7
+ data.tar.gz: 823fb159c29104d485fa6f7320b2340de260fb36d463cd80096d3c78d45e275687d6b30ccf3c5dcdb238dfaabea886d9a9912ccc5e7f2a1ca2a1c3a948e007f0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sisyphus (0.1.1)
4
+ sisyphus (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -22,6 +22,6 @@ PLATFORMS
22
22
 
23
23
  DEPENDENCIES
24
24
  bundler (~> 1.3)
25
- sisyphus!
26
25
  rake (~> 10.0)
27
26
  rspec (~> 2.14)
27
+ sisyphus!
@@ -16,7 +16,7 @@ module Sisyphus
16
16
  perform_job
17
17
  end
18
18
 
19
- exit 0
19
+ exit! 0
20
20
  end
21
21
 
22
22
  private
@@ -33,9 +33,9 @@ module Sisyphus
33
33
  self.process_name = "Child of worker #{Process.ppid}"
34
34
  begin
35
35
  @job.perform
36
- exit 0
36
+ exit! 0
37
37
  rescue Exception
38
- exit 1
38
+ exit! 1
39
39
  end
40
40
  end
41
41
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sisyphus
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -7,7 +7,7 @@ module Sisyphus
7
7
  let(:worker) { Worker.new job, output }
8
8
 
9
9
  it 'traps signals when started' do
10
- worker.stub :exit
10
+ worker.stub :exit!
11
11
  worker.instance_variable_set(:@stopped, true)
12
12
  worker.should_receive :trap_signals
13
13
  worker.start
@@ -15,7 +15,7 @@ module Sisyphus
15
15
 
16
16
  it 'exits when it has been stopped' do
17
17
  worker.instance_variable_set(:@stopped, true)
18
- worker.should_receive :exit
18
+ worker.should_receive :exit!
19
19
  worker.start
20
20
  end
21
21
 
@@ -42,19 +42,19 @@ module Sisyphus
42
42
 
43
43
  it 'should perform the job' do
44
44
  job.should_receive :perform
45
- worker.stub :exit
45
+ worker.stub :exit!
46
46
  worker.send :perform_job
47
47
  end
48
48
 
49
49
  it 'should exit after having performed the job' do
50
50
  job.stub :perform
51
- worker.should_receive(:exit).with 0
51
+ worker.should_receive(:exit!).with 0
52
52
  worker.send :perform_job
53
53
  end
54
54
 
55
55
  it 'should change process name' do
56
56
  job.stub :perform
57
- worker.stub :exit
57
+ worker.stub :exit!
58
58
  Process.stub(:ppid) { 666 }
59
59
  worker.should_receive(:process_name=).with "Child of worker 666"
60
60
  worker.send :perform_job
@@ -63,7 +63,7 @@ module Sisyphus
63
63
  context 'when job.perform raises an error' do
64
64
  it 'should exit with a non-zero status' do
65
65
  job.stub(:perform).and_raise Exception.new "should be rescued!"
66
- worker.should_receive(:exit).with(1)
66
+ worker.should_receive(:exit!).with(1)
67
67
  worker.send :perform_job
68
68
  end
69
69
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sisyphus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rasmus Bang Grouleff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-24 00:00:00.000000000 Z
11
+ date: 2013-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.0.2
97
+ rubygems_version: 2.1.5
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: A tiny library for spawning worker processes