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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a41e2e146849e9de9752fcc88353008da72e6c94
4
- data.tar.gz: 776a60a147c9cbd1512cae7d81519667ec514c2a
3
+ metadata.gz: 0df99684fff68087775bfb18c85a3f7694ec3b48
4
+ data.tar.gz: c68565a77f17645225e9a2bd0db42aeb2662deef
5
5
  SHA512:
6
- metadata.gz: 5f1d34125e457ae2b08b599d80cddd4e2f51b7ae332636d14c52cfb0fa2dd8f40e92ccc9336c30356d43bf17593338c5018bb5e1cc0d5a0e90ce0a5fd7d8a030
7
- data.tar.gz: 01636c8cf9af7e4b5f452282f663962ef16afe8520ccb469a5f1deb8730bbcd76f810acb39aae6eaf13e3e436e41ea14f017910a479994c11414abe0c30c94ca
6
+ metadata.gz: 5c343ac5331a98abc82b0f8215ffd7eee6064273a05f89d49eaa40a5130d032b21ef7c8cd72494da24e09c1790e1dac6f77b4a12eca54a9d8d0547d4fd19a169
7
+ data.tar.gz: 2d03b80893c9812932f43e67c322ac64f554bb6efd0c093d37659bcd6a71a613915ad5065ca58514b8a3ae848cc5e1fc10849ab1e17f3044525b47593f20afed
@@ -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
@@ -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
- process.cancel!
55
- unless options[:clear_identifiers] == false
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
@@ -1,3 +1,3 @@
1
1
  module Bumbleworks
2
- VERSION = "0.0.91"
2
+ VERSION = "0.0.92"
3
3
  end
@@ -60,17 +60,17 @@ describe Bumbleworks::Entity do
60
60
  end
61
61
  end
62
62
 
63
- describe '#cancel_processes!' do
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
- expect(bp).to receive(:cancel!)
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, :clear_identifiers => false)
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.91
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-03-17 00:00:00.000000000 Z
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
  - - ">="