bumbleworks 0.0.85 → 0.0.86
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/expression.rb +1 -0
- data/lib/bumbleworks/process.rb +2 -2
- data/lib/bumbleworks/schedule.rb +1 -0
- data/lib/bumbleworks/version.rb +1 -1
- data/lib/bumbleworks/workitem.rb +1 -0
- data/spec/lib/bumbleworks/expression_spec.rb +6 -0
- data/spec/lib/bumbleworks/process_spec.rb +2 -4
- data/spec/lib/bumbleworks/schedule_spec.rb +6 -0
- data/spec/lib/bumbleworks/workitem_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 803b0ca4b01ae7606eb47ce6c2037656f7d92564
|
4
|
+
data.tar.gz: e5fa78cad9e93b529310cfd7df343cca83026061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f5e0d79e475abb6cdde5a7e77f494804f81623a98dd9b09a1f5275b0a4ebe7e0da3e19d967117a595b8716577ea607951f4d7d5f31cee8978368fd9ab3f8d94
|
7
|
+
data.tar.gz: 4c7d72432405cdf5c44da24b09888436865a1a2ef7db212501cff7099b0e0425f767ab0e36d3b0034ef4b0c75544a116e73c69acd107b90bf1805b52337a9744
|
data/lib/bumbleworks/process.rb
CHANGED
@@ -47,14 +47,14 @@ module Bumbleworks
|
|
47
47
|
alias_method :wfid, :id
|
48
48
|
|
49
49
|
def <=>(other)
|
50
|
-
unless other.
|
50
|
+
unless other.is_a?(self.class)
|
51
51
|
raise ArgumentError, "comparison of Bumbleworks::Process with #{other.class} failed"
|
52
52
|
end
|
53
53
|
wfid <=> other.wfid
|
54
54
|
end
|
55
55
|
|
56
56
|
def ==(other)
|
57
|
-
return false unless other.
|
57
|
+
return false unless other.is_a?(self.class)
|
58
58
|
wfid == other.wfid
|
59
59
|
end
|
60
60
|
|
data/lib/bumbleworks/schedule.rb
CHANGED
data/lib/bumbleworks/version.rb
CHANGED
data/lib/bumbleworks/workitem.rb
CHANGED
@@ -23,6 +23,12 @@ describe Bumbleworks::Expression do
|
|
23
23
|
exp2 = described_class.new(double('FlowExpression', :fei => double(:expid => '4')))
|
24
24
|
expect(exp1).not_to eq(exp2)
|
25
25
|
end
|
26
|
+
|
27
|
+
it 'returns false if other object has is not an expression' do
|
28
|
+
exp1 = described_class.new(fexp)
|
29
|
+
exp2 = double('not an expression')
|
30
|
+
expect(exp1).not_to eq(exp2)
|
31
|
+
end
|
26
32
|
end
|
27
33
|
|
28
34
|
describe '#expid' do
|
@@ -357,10 +357,9 @@ describe Bumbleworks::Process do
|
|
357
357
|
expect(bp1).to eq(bp2)
|
358
358
|
end
|
359
359
|
|
360
|
-
it 'returns false if other object
|
360
|
+
it 'returns false if other object is not a process' do
|
361
361
|
bp1 = described_class.new('in_da_sky')
|
362
362
|
bp2 = double('not a process')
|
363
|
-
allow(bp2).to receive(:respond_to?).with(:wfid).and_return(false)
|
364
363
|
expect(bp1).not_to eq(bp2)
|
365
364
|
end
|
366
365
|
end
|
@@ -375,10 +374,9 @@ describe Bumbleworks::Process do
|
|
375
374
|
expect(bp3 <=> bp1).to eq 0
|
376
375
|
end
|
377
376
|
|
378
|
-
it 'raises ArgumentError if other object
|
377
|
+
it 'raises ArgumentError if other object is not a process' do
|
379
378
|
bp1 = described_class.new('in_da_sky')
|
380
379
|
bp2 = double('not a process')
|
381
|
-
allow(bp2).to receive(:respond_to?).with(:wfid).and_return(false)
|
382
380
|
expect { bp1 <=> bp2 }.to raise_error(ArgumentError, "comparison of Bumbleworks::Process with RSpec::Mocks::Double failed")
|
383
381
|
end
|
384
382
|
end
|
@@ -45,6 +45,12 @@ describe Bumbleworks::Schedule do
|
|
45
45
|
schedule2 = described_class.new({ '_id' => 'snooglebunk', 'yeah' => 'whatevs' })
|
46
46
|
expect(schedule1).not_to eq(schedule2)
|
47
47
|
end
|
48
|
+
|
49
|
+
it 'returns false if other object is not a schedule' do
|
50
|
+
schedule1 = described_class.new({ '_id' => 'snaggletooth', 'who' => 'cares' })
|
51
|
+
schedule2 = double('not a schedule')
|
52
|
+
expect(schedule1).not_to eq(schedule2)
|
53
|
+
end
|
48
54
|
end
|
49
55
|
|
50
56
|
describe '#wfid' do
|
@@ -10,6 +10,12 @@ describe Bumbleworks::Workitem do
|
|
10
10
|
bw2 = described_class.new('in_da_sky')
|
11
11
|
expect(bw1).to eq(bw2)
|
12
12
|
end
|
13
|
+
|
14
|
+
it 'returns false if other object is not a workitem' do
|
15
|
+
bw1 = described_class.new('in_da_sky')
|
16
|
+
bw2 = double('not a workitem')
|
17
|
+
expect(bw1).not_to eq(bw2)
|
18
|
+
end
|
13
19
|
end
|
14
20
|
|
15
21
|
describe '#has_entity_fields?' do
|