google-pubsub-enhancer 0.5.7 → 0.6.0

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: 468a1c805763244fa09086b76a07509bceaabafc
4
- data.tar.gz: 57bb90b802e4c3b4e73f75c1eb5608dd95734eb2
3
+ metadata.gz: 2067bce55a4418d118d8e65ee1495d21daadda81
4
+ data.tar.gz: a95da52e25d952377ecf48e555fa67d082c55964
5
5
  SHA512:
6
- metadata.gz: cee422918c478a9a8b71ab0b77a2dba440fb1d7937500ee25f04eeadcd9d0f9174b49695adeccfb682893e208f6d45b957d87bba1d5652bf421112b599be7e46
7
- data.tar.gz: 28dd4444715f981733eb8d9d907c6b35675fb2f585b81882dc5aa1cdcc0f69c8efd9914265faa8a9edf487806924d75766bc1a65a4d0725c7d2a2984dcb33f69
6
+ metadata.gz: efd4e7229adb6b022c55fb4d6bea92570eb59b7a9d264a7b2fe5293f9a0ede150e06929a34c26bb77a6ed1198a181ec85b4607ae5cd9174ac8618e551bae8bad
7
+ data.tar.gz: 3fa5ab956a2becf7800e5c6d665dbaafd48c92b167fe4e95ae7a14bdf4bc5ca18896cd89eeecd4e2b6b4b1302cbb142cd71d5ec3f825665ae98de4a927e1fb91
data/README.md CHANGED
@@ -59,9 +59,6 @@ describe YourApplication do
59
59
  #set messages that come from a topic
60
60
  let(:messages) {[JSON.dump({foo:1}), JSON.dump({bar:2})]}
61
61
 
62
- #set expected_messages that you expect to publish after your middleware's work done
63
- let(:expected_messages) { [{"foo" => 1}, {"bar" => 2}]}
64
-
65
62
  it "should do the magic you write into" do
66
63
 
67
64
  app = GooglePubsubEnhancer.new do
@@ -79,7 +76,8 @@ describe YourApplication do
79
76
  end
80
77
 
81
78
  # the only expectation you need
82
- publish_called_with expected_messages
79
+ publish_called_with({"foo" => 1})
80
+ publish_called_with({"bar" => 2})
83
81
 
84
82
  app.run 'subscription_short_name'
85
83
  end
@@ -16,7 +16,6 @@ module GooglePubsubEnhancer::Spec
16
16
  allow(publisher).to receive(:publish)
17
17
  allow(subscription).to receive(:acknowledge)
18
18
  allow(Digest::MD5).to receive(:hexdigest).and_return("a1s2d3f4g5")
19
-
20
19
  end
21
20
 
22
21
  after do
@@ -26,10 +25,8 @@ module GooglePubsubEnhancer::Spec
26
25
  end
27
26
 
28
27
  module PublisherTester
29
- def publish_called_with(messages)
30
- messages.each do |msg|
31
- expect(publisher).to receive(:publish).with(msg, {recordId: "a1s2d3f4g5"} )
32
- end
28
+ def publish_called_with(msg)
29
+ expect(publisher).to receive(:publish).with(msg, {recordId: "a1s2d3f4g5"}).ordered
33
30
  end
34
31
  end
35
32
 
@@ -1,3 +1,3 @@
1
1
  class GooglePubsubEnhancer
2
- VERSION = "0.5.7"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-pubsub-enhancer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - bejczib