reactor 0.5.2 → 0.5.3

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: 92b65b121e054e4657f60f0209b36a03258d4f4d
4
- data.tar.gz: d36e98b14a7659a97a6ad9c8dc9397b1870baa9a
3
+ metadata.gz: 2e2420e728e56ddaf2d1dac1b97d68e39be9da53
4
+ data.tar.gz: 3a6107dd7f630ffb35ffd7b3a9974c3f571e8dee
5
5
  SHA512:
6
- metadata.gz: c37a732fa832c8e4970cf3aa0f730504458823476f5f9c0438bce9ec63badc7d89815bd0765ef717024b95d5faa63813b53a80368cb26aef2bda7dfd2901b958
7
- data.tar.gz: a769df5f8e42181782789a02bc8b55a6f306eb8ab962913783e45e2570f8995ac481f43050866a4230400664e81fe2a682a32c4860fb1330cf72e0d6d58e370b
6
+ metadata.gz: db8d01bf51e70978395acf02baf414c6eaf44d720a8328c01c3cfd0d7f5c13836a0998b5d90419b191083be37a9ce0aa5868ccb3b48b1126e76a8cf1939c773f
7
+ data.tar.gz: a9a78311e709d5361ecff086cc6e3dc1b6f7a57b713c1d1056ef3225401934f875c5e6d4890d1895d48e89cc936b94e49b1324e802ba3e1514c4d4e155d21118
@@ -1,17 +1,20 @@
1
1
  RSpec::Matchers.define :publish_event do |name, data = {}|
2
-
3
2
  match do |block|
4
3
  defaults = {:actor => anything}
5
4
  Reactor::Event.should_receive(:publish).with(name, hash_including(defaults.merge(data)))
6
- block.call
5
+
6
+ begin
7
+ block.call
8
+ RSpec::Mocks::verify
9
+ true
10
+ rescue RSpec::Mocks::MockExpectationError => e
11
+ false
12
+ end
7
13
  end
8
14
  end
9
15
 
10
16
  RSpec::Matchers.define :publish_events do |*events|
11
-
12
17
  match do |block|
13
- defaults = {:actor => anything, at: anything, target: anything}
14
-
15
18
  Reactor::Event.should_receive(:publish).exactly(events.count).times.with do |event, data|
16
19
  match = events.select { |e| (e.is_a?(Hash) ? e.keys.first : e) == event }.first
17
20
  match.should be_present
@@ -21,12 +24,18 @@ RSpec::Matchers.define :publish_events do |*events|
21
24
  value.should == expected[key]
22
25
  end
23
26
  end
24
- block.call
27
+
28
+ begin
29
+ block.call
30
+ RSpec::Mocks::verify
31
+ true
32
+ rescue RSpec::Mocks::MockExpectationError => e
33
+ false
34
+ end
25
35
  end
26
36
  end
27
37
 
28
38
  RSpec::Matchers.define :subscribe_to do |name, data = {}, &expectations|
29
-
30
39
  match do
31
40
  expectations.call if expectations.present?
32
41
  Reactor::Event.publish(name, data)
@@ -1,3 +1,3 @@
1
1
  module Reactor
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reactor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - winfred
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-10-09 00:00:00.000000000 Z
15
+ date: 2014-01-23 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: sidekiq
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.0.0
138
+ rubygems_version: 2.1.11
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: Sidekiq/ActiveRecord pubsub lib