rabbit_feed 2.3.3 → 2.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/README.md +8 -0
- data/example/non_rails_app/Gemfile.lock +7 -7
- data/example/rails_app/Gemfile.lock +3 -3
- data/lib/rabbit_feed/testing_support.rb +9 -6
- data/lib/rabbit_feed/version.rb +1 -1
- data/run_example +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3f8f9a636fd9c4329571387c7418d6fd977f195
|
4
|
+
data.tar.gz: 6a1de38edebf587075b7193eb391fe18991ade52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
15
|
-
activesupport (= 4.2.
|
14
|
+
activemodel (4.2.4)
|
15
|
+
activesupport (= 4.2.4)
|
16
16
|
builder (~> 3.1)
|
17
|
-
activesupport (4.2.
|
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 (
|
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.
|
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.
|
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.
|
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.
|
15
|
-
activesupport (= 4.2.
|
14
|
+
activemodel (4.2.4)
|
15
|
+
activesupport (= 4.2.4)
|
16
16
|
builder (~> 3.1)
|
17
|
-
activesupport (4.2.
|
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 (
|
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.
|
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.
|
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.
|
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 (
|
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.
|
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
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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
|
|
data/lib/rabbit_feed/version.rb
CHANGED
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
|
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.
|
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-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|