bumbleworks 0.0.91 → 0.0.92
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bumbleworks.gemspec +1 -1
- data/lib/bumbleworks/entity.rb +5 -2
- data/lib/bumbleworks/version.rb +1 -1
- data/spec/lib/bumbleworks/entity_spec.rb +6 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0df99684fff68087775bfb18c85a3f7694ec3b48
|
4
|
+
data.tar.gz: c68565a77f17645225e9a2bd0db42aeb2662deef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c343ac5331a98abc82b0f8215ffd7eee6064273a05f89d49eaa40a5130d032b21ef7c8cd72494da24e09c1790e1dac6f77b4a12eca54a9d8d0547d4fd19a169
|
7
|
+
data.tar.gz: 2d03b80893c9812932f43e67c322ac64f554bb6efd0c093d37659bcd6a71a613915ad5065ca58514b8a3ae848cc5e1fc10849ab1e17f3044525b47593f20afed
|
data/bumbleworks.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency "rake"
|
25
25
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
26
26
|
spec.add_development_dependency 'watchr'
|
27
|
-
spec.add_development_dependency 'pry'
|
27
|
+
spec.add_development_dependency 'pry-rescue'
|
28
28
|
spec.add_development_dependency 'sqlite3'
|
29
29
|
spec.add_development_dependency 'simplecov'
|
30
30
|
end
|
data/lib/bumbleworks/entity.rb
CHANGED
@@ -51,8 +51,11 @@ module Bumbleworks
|
|
51
51
|
def cancel_process!(process_name, options = {})
|
52
52
|
process = processes_by_name[process_name.to_sym]
|
53
53
|
return nil unless process
|
54
|
-
|
55
|
-
|
54
|
+
|
55
|
+
options = options.dup
|
56
|
+
clear_identifiers = options.delete(:clear_identifiers)
|
57
|
+
process.cancel!(options)
|
58
|
+
unless clear_identifiers == false
|
56
59
|
identifier_attribute = attribute_for_process_name(process_name.to_sym)
|
57
60
|
persist_process_identifier(identifier_attribute, nil)
|
58
61
|
end
|
data/lib/bumbleworks/version.rb
CHANGED
@@ -60,17 +60,17 @@ describe Bumbleworks::Entity do
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
describe '#
|
63
|
+
describe '#cancel_process!' do
|
64
64
|
it 'cancels process with given name' do
|
65
65
|
entity = entity_class.new
|
66
66
|
allow(entity).to receive_messages(:processes_by_name => {
|
67
67
|
:foof => bp = Bumbleworks::Process.new('1234')
|
68
68
|
})
|
69
|
-
expect(bp).to receive(:cancel!)
|
69
|
+
expect(bp).to receive(:cancel!).with(:foo => :bar)
|
70
70
|
allow(entity).to receive(:attribute_for_process_name).
|
71
71
|
with(:foof).and_return(:foof_pid)
|
72
72
|
expect(entity).to receive(:update).with(:foof_pid => nil)
|
73
|
-
entity.cancel_process!('foof')
|
73
|
+
entity.cancel_process!('foof', :foo => :bar)
|
74
74
|
end
|
75
75
|
|
76
76
|
it 'does nothing if no process for given name' do
|
@@ -86,9 +86,10 @@ describe Bumbleworks::Entity do
|
|
86
86
|
allow(entity).to receive_messages(:processes_by_name => {
|
87
87
|
:foof => bp = Bumbleworks::Process.new('1234')
|
88
88
|
})
|
89
|
-
|
89
|
+
options = { :clear_identifiers => false, :foo => :bar }
|
90
|
+
expect(bp).to receive(:cancel!).with(:foo => :bar)
|
90
91
|
expect(entity).to receive(:update).never
|
91
|
-
entity.cancel_process!(:foof,
|
92
|
+
entity.cancel_process!(:foof, options)
|
92
93
|
end
|
93
94
|
end
|
94
95
|
|
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.92
|
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: 2015-
|
14
|
+
date: 2015-05-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: ruote
|
@@ -84,7 +84,7 @@ dependencies:
|
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
- !ruby/object:Gem::Dependency
|
87
|
-
name: pry
|
87
|
+
name: pry-rescue
|
88
88
|
requirement: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
90
|
- - ">="
|