google-pubsub-enhancer 0.1.1 → 0.1.2

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: 8cf06517fd86e363125005c35ea1b455a325e9b1
4
- data.tar.gz: 6583625e351b512caff7819d0243e89e79380020
3
+ metadata.gz: dcbdcd5a108f70005e0cdbba99a86ba2d1c28ae2
4
+ data.tar.gz: d7aad5dc5694aa7b68ec0280060ade50d39cf610
5
5
  SHA512:
6
- metadata.gz: 9e66c168743d59963242d257cb0ea7c7a9a051b2cf0d92344eb93272db1e86c747cc50202ea42078ec5100f11cca30b35f786ce555dfa4af36d3b5c1a3cb17c5
7
- data.tar.gz: c1ed16cce02b9ed49b219cca023e6ce543b39ff89cf52f13fd63e6fef0d0cc8d036e302f310db3187fa04d45bb79297c9858b91f10754246e9d79ba6864dd1b9
6
+ metadata.gz: d75738727b12692e418c96928a4d30b25af903f2f265972f993d6c176a8eeac7f175c91dbdb362ab1a39b0a4dc7e113838f5e2c1a45825da27d0ea61d2b6280d
7
+ data.tar.gz: bb1953a40da13522700e0f761c0ef88dc72fd2dbc9576b4a22f71652867ed953b44155f476fcd8bb277a6250121b9c8af2152b1dda4a7d44cfcb1907074cabc4
@@ -5,10 +5,11 @@ class GooglePubsubEnhancer::Publisher
5
5
  @short_topic_name = opts[:short_topic_name] || raise
6
6
  @full_topic_name = GooglePubsubEnhancer.name_by('topics',@short_topic_name)
7
7
  @messages_key = opts[:messages] || raise
8
+ @google_cloud_pubsub ||= Google::Cloud::Pubsub.new
8
9
  end
9
10
 
10
11
  def call(env)
11
- google_cloud_pubsub.publish(@full_topic_name) do |publisher|
12
+ @google_cloud_pubsub.publish(@full_topic_name) do |publisher|
12
13
  [*env[@messages_key]].each do |m|
13
14
  publisher.publish(m)
14
15
  end
@@ -16,7 +17,4 @@ class GooglePubsubEnhancer::Publisher
16
17
  @app.call(env)
17
18
  end
18
19
 
19
- def google_cloud_pubsub
20
- Google::Cloud::Pubsub.new
21
- end
22
20
  end
@@ -1,3 +1,3 @@
1
1
  class GooglePubsubEnhancer
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-pubsub-enhancer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - bejczib
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-26 00:00:00.000000000 Z
11
+ date: 2017-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler