rabbit_feed 2.3.3 → 2.3.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b176593f03734d7f6bb37fd4e72d4689a40cb08d
4
- data.tar.gz: b7bb7cf5c77e4dec54b5eeace384d77a3d459a63
3
+ metadata.gz: b3f8f9a636fd9c4329571387c7418d6fd977f195
4
+ data.tar.gz: 6a1de38edebf587075b7193eb391fe18991ade52
5
5
  SHA512:
6
- metadata.gz: 10e31f0644ded6301e9c4f83b3cfe235cde4dd28d2c0e6099443896b804841ca67b498e8aeef9b8e439ed0dcd41e1bf782aca716647b3461a616f364d78b7afc
7
- data.tar.gz: 79f60e26e3351022e2d2fed04ed4852d30a6d4da3b950acdd4fb08200e7da5f4e1d348681bf8cee079da6342a2ffc597cfc570d4c8093f495e8ec07de903a376
6
+ metadata.gz: af781a201c09f92e0df78c03eec0adbb0e1c63150dfea59c2bafbe1b4b3215bf577a34ec5926ff976e05272d29f8023dee0e783e91689e0268615ce2d6bc3aa0
7
+ data.tar.gz: 4bd6a926772400c407fdcc9ffc295d632fabd05257c0cd0c038d70235d91462e6da1d3f1820b83513e9fc0c1b024a5f909563cdc63a8b8a958d06100e01920eb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rabbit_feed (2.3.3)
4
+ rabbit_feed (2.3.4)
5
5
  activemodel (>= 3.2.0, < 5.0.0)
6
6
  activesupport (>= 3.2.0, < 5.0.0)
7
7
  avro (>= 1.5.4, < 1.8.0)
@@ -11,23 +11,23 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activemodel (4.2.3)
15
- activesupport (= 4.2.3)
14
+ activemodel (4.2.4)
15
+ activesupport (= 4.2.4)
16
16
  builder (~> 3.1)
17
- activesupport (4.2.3)
17
+ activesupport (4.2.4)
18
18
  i18n (~> 0.7)
19
19
  json (~> 1.7, >= 1.7.7)
20
20
  minitest (~> 5.1)
21
21
  thread_safe (~> 0.3, >= 0.3.4)
22
22
  tzinfo (~> 1.1)
23
- amq-protocol (1.9.2)
23
+ amq-protocol (2.0.0)
24
24
  avro (1.7.7)
25
25
  multi_json
26
26
  binding_of_caller (0.7.2)
27
27
  debug_inspector (>= 0.0.1)
28
28
  bond (0.5.1)
29
29
  builder (3.2.2)
30
- bunny (2.0.0)
30
+ bunny (2.0.1)
31
31
  amq-protocol (>= 1.9.2)
32
32
  codeclimate-test-reporter (0.4.6)
33
33
  simplecov (>= 0.7.1, < 1.0.0)
@@ -50,7 +50,7 @@ GEM
50
50
  json
51
51
  json (1.8.2)
52
52
  method_source (0.8.2)
53
- minitest (5.7.0)
53
+ minitest (5.8.3)
54
54
  multi_json (1.10.1)
55
55
  pidfile (0.3.0)
56
56
  pry (0.10.1)
data/README.md CHANGED
@@ -129,6 +129,14 @@ RSpec.configure do |config|
129
129
  end
130
130
  ```
131
131
 
132
+ Or, if using Cucumber, put this in your `env.rb`:
133
+
134
+ ```ruby
135
+ Before do
136
+ RabbitFeed::TestingSupport.capture_published_events_in_context(self)
137
+ end
138
+ ```
139
+
132
140
  #### RSpec
133
141
 
134
142
  To verify that your application publishes an event, use the custom RSpec matcher provided with this application.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../
3
3
  specs:
4
- rabbit_feed (2.3.2)
4
+ rabbit_feed (2.3.4)
5
5
  activemodel (>= 3.2.0, < 5.0.0)
6
6
  activesupport (>= 3.2.0, < 5.0.0)
7
7
  avro (>= 1.5.4, < 1.8.0)
@@ -11,25 +11,25 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activemodel (4.2.3)
15
- activesupport (= 4.2.3)
14
+ activemodel (4.2.4)
15
+ activesupport (= 4.2.4)
16
16
  builder (~> 3.1)
17
- activesupport (4.2.3)
17
+ activesupport (4.2.4)
18
18
  i18n (~> 0.7)
19
19
  json (~> 1.7, >= 1.7.7)
20
20
  minitest (~> 5.1)
21
21
  thread_safe (~> 0.3, >= 0.3.4)
22
22
  tzinfo (~> 1.1)
23
- amq-protocol (1.9.2)
23
+ amq-protocol (2.0.0)
24
24
  avro (1.7.7)
25
25
  multi_json
26
26
  builder (3.2.2)
27
- bunny (2.0.0)
27
+ bunny (2.0.1)
28
28
  amq-protocol (>= 1.9.2)
29
29
  diff-lcs (1.2.5)
30
30
  i18n (0.7.0)
31
31
  json (1.8.3)
32
- minitest (5.7.0)
32
+ minitest (5.8.3)
33
33
  multi_json (1.11.2)
34
34
  pidfile (0.3.0)
35
35
  rake (10.4.2)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../
3
3
  specs:
4
- rabbit_feed (2.3.2)
4
+ rabbit_feed (2.3.4)
5
5
  activemodel (>= 3.2.0, < 5.0.0)
6
6
  activesupport (>= 3.2.0, < 5.0.0)
7
7
  avro (>= 1.5.4, < 1.8.0)
@@ -46,12 +46,12 @@ GEM
46
46
  minitest (~> 5.1)
47
47
  thread_safe (~> 0.3, >= 0.3.4)
48
48
  tzinfo (~> 1.1)
49
- amq-protocol (1.9.2)
49
+ amq-protocol (2.0.0)
50
50
  arel (6.0.0)
51
51
  avro (1.7.7)
52
52
  multi_json
53
53
  builder (3.2.2)
54
- bunny (2.0.0)
54
+ bunny (2.0.1)
55
55
  amq-protocol (>= 1.9.2)
56
56
  coffee-rails (4.0.1)
57
57
  coffee-script (>= 2.2.0)
@@ -16,13 +16,16 @@ module RabbitFeed
16
16
 
17
17
  def capture_published_events rspec_config
18
18
  rspec_config.before :each do
19
+ TestingSupport.capture_published_events_in_context(self)
20
+ end
21
+ end
19
22
 
20
- TestingSupport.published_events = []
21
- mock_connection = double(:rabbitmq_connection)
22
- allow(RabbitFeed::ProducerConnection).to receive(:instance).and_return(mock_connection)
23
- allow(mock_connection).to receive(:publish) do |serialized_event, routing_key|
24
- TestingSupport.published_events << (Event.deserialize serialized_event)
25
- end
23
+ def capture_published_events_in_context context
24
+ TestingSupport.published_events = []
25
+ mock_connection = context.double(:rabbitmq_connection)
26
+ context.allow(RabbitFeed::ProducerConnection).to context.receive(:instance).and_return(mock_connection)
27
+ context.allow(mock_connection).to context.receive(:publish) do |serialized_event, routing_key|
28
+ TestingSupport.published_events << (Event.deserialize serialized_event)
26
29
  end
27
30
  end
28
31
 
@@ -1,3 +1,3 @@
1
1
  module RabbitFeed
2
- VERSION = '2.3.3'
2
+ VERSION = '2.3.4'
3
3
  end
data/run_example CHANGED
@@ -35,7 +35,7 @@ echo 'Rails application started'
35
35
 
36
36
  # Trigger an event
37
37
  echo 'Triggering event...'
38
- curl -silent -H -X POST http://localhost:8080/beavers -d "beaver[name]=`date '+%m/%d/%y %H:%M:%S'`" >/dev/null
38
+ curl -silent --data "beaver[name]=`date '+%m/%d/%y %H:%M:%S'`" http://127.0.0.1:8080/beavers >/dev/null
39
39
  echo 'Event triggered'
40
40
 
41
41
  sleep 3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbit_feed
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simply Business
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-10 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny