bumbleworks 0.0.84 → 0.0.85
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 +4 -4
- data/lib/bumbleworks/process.rb +4 -0
- data/lib/bumbleworks/version.rb +1 -1
- data/spec/lib/bumbleworks/process_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47d3d5c9dcf82c6040641bd3fc2ebad001223025
|
4
|
+
data.tar.gz: 581a2b5a3a244221f42dcb06c87c24fcb1323468
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df6d711ecdc07505a85c028b40f329c0ec3a279a87b2a897e21e9ed64751c5526cd625333e1020f534c941d2b28297f6a93e857d10f6f4d6c7b4a571f5fccd2c
|
7
|
+
data.tar.gz: 9d1448f9ae21f784d24aca0b710c541905ac5db8d97326197558c365bd591bf7e21d4d4b098577e2b241da172cc9bb001d1be95e6d7762519f077386ee60e0ac
|
data/lib/bumbleworks/process.rb
CHANGED
@@ -47,10 +47,14 @@ module Bumbleworks
|
|
47
47
|
alias_method :wfid, :id
|
48
48
|
|
49
49
|
def <=>(other)
|
50
|
+
unless other.respond_to?(:wfid)
|
51
|
+
raise ArgumentError, "comparison of Bumbleworks::Process with #{other.class} failed"
|
52
|
+
end
|
50
53
|
wfid <=> other.wfid
|
51
54
|
end
|
52
55
|
|
53
56
|
def ==(other)
|
57
|
+
return false unless other.respond_to?(:wfid)
|
54
58
|
wfid == other.wfid
|
55
59
|
end
|
56
60
|
|
data/lib/bumbleworks/version.rb
CHANGED
@@ -356,6 +356,13 @@ describe Bumbleworks::Process do
|
|
356
356
|
bp2 = described_class.new('in_da_sky')
|
357
357
|
expect(bp1).to eq(bp2)
|
358
358
|
end
|
359
|
+
|
360
|
+
it 'returns false if other object does not respond to wfid' do
|
361
|
+
bp1 = described_class.new('in_da_sky')
|
362
|
+
bp2 = double('not a process')
|
363
|
+
allow(bp2).to receive(:respond_to?).with(:wfid).and_return(false)
|
364
|
+
expect(bp1).not_to eq(bp2)
|
365
|
+
end
|
359
366
|
end
|
360
367
|
|
361
368
|
describe '#<=>' do
|
@@ -367,6 +374,13 @@ describe Bumbleworks::Process do
|
|
367
374
|
expect(bp2 <=> bp3).to eq 1
|
368
375
|
expect(bp3 <=> bp1).to eq 0
|
369
376
|
end
|
377
|
+
|
378
|
+
it 'raises ArgumentError if other object does not respond to wfid' do
|
379
|
+
bp1 = described_class.new('in_da_sky')
|
380
|
+
bp2 = double('not a process')
|
381
|
+
allow(bp2).to receive(:respond_to?).with(:wfid).and_return(false)
|
382
|
+
expect { bp1 <=> bp2 }.to raise_error(ArgumentError, "comparison of Bumbleworks::Process with RSpec::Mocks::Double failed")
|
383
|
+
end
|
370
384
|
end
|
371
385
|
|
372
386
|
describe '#running?' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bumbleworks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.85
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maher Hawash
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-
|
14
|
+
date: 2014-09-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: ruote
|