hanami-events-cloud_pubsub 2.6.1 → 2.6.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
  SHA256:
3
- metadata.gz: 530af9e648eba440c829ae5dbd74a0995be1e6ed06b30739af8c4262d4b0392e
4
- data.tar.gz: d40192fb6bb29dfd2cdee06d7fab0e0af4c1a1098bdc4c0feaf0f1261bd5ff2b
3
+ metadata.gz: a98d3008033cab806ac81b85a905da7b99b4004d05aa2f66ebace18393e06661
4
+ data.tar.gz: 0b5f35229ed7284a4cf31fe019b7332e95c33157c1c0c4910340059f8babc152
5
5
  SHA512:
6
- metadata.gz: 04a959376690935554a47591152c1b52403f966a506cf120e7fe48d3df6f0f1b677af558c1d063a3cee36cc2f4eace9897a1980a7e6b86daeeb8dccfdc3da334
7
- data.tar.gz: d13ad1e5f311a89005a3a9b7be6ab50558c42ae11e5f27a60328a4b56dbfdc707250b785008bced841bfce7cf1b09c8277a047ea2bceba1075bf78604b5298fd
6
+ metadata.gz: 204b4a858ddc8dada4ab5a7ccf6959dd9a5e25e579cfc96c562a20f7ca8138201f32ef8568859a27e51071ead172272acfa6c0b5090fc373946d25aa353d9c9d
7
+ data.tar.gz: 5f0d93acec60125c75b4c0b489cccd9fe282edcfc0918a850d8cbf9b828f700a0ba5061c4b6d68b96a1fa8c5998bec0597043ae11c70c05f755c7cbfd2c44851
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- hanami-events-cloud_pubsub (2.6.1)
11
+ hanami-events-cloud_pubsub (2.6.2)
12
12
  dry-configurable (>= 0.8)
13
13
  google-cloud-pubsub (>= 0.38.1, < 1.4)
14
14
  hanami-cli (~> 0.2)
@@ -6,7 +6,6 @@ require 'hanami/events/cloud_pubsub/version'
6
6
  require 'hanami/events/cloud_pubsub/middleware/stack'
7
7
  require 'hanami/events/cloud_pubsub/middleware/logging'
8
8
  require 'hanami/events/cloud_pubsub/middleware/auto_retry'
9
- require 'hanami/events/cloud_pubsub/middleware/prometheus'
10
9
  require 'hanami/events/cloud_pubsub/runner'
11
10
  require 'hanami/events/cloud_pubsub/errors'
12
11
  require 'google/cloud/pubsub'
@@ -63,7 +62,13 @@ module Hanami
63
62
  Middleware::AutoRetry.new
64
63
  )
65
64
 
66
- middleware_stack.prepend(Middleware::Prometheus) if defined?(::Prometheus::Client)
65
+ begin
66
+ require 'prometheus/client'
67
+ require 'hanami/events/cloud_pubsub/middleware/prometheus'
68
+ middleware_stack.prepend(Middleware::Prometheus.new)
69
+ rescue LoadError
70
+ # ok
71
+ end
67
72
 
68
73
  setting :middleware, middleware_stack
69
74
 
@@ -12,7 +12,7 @@ module Hanami
12
12
  require 'prometheus/client'
13
13
  prometheus = ::Prometheus::Client.registry
14
14
  @events_counter = prometheus.counter(
15
- :pubsub_events,
15
+ :received_pubsub_events,
16
16
  docstring: 'A counter of received pubsub events',
17
17
  labels: %i[event_name subscription]
18
18
  )
@@ -3,7 +3,7 @@
3
3
  module Hanami
4
4
  module Events
5
5
  module CloudPubsub
6
- VERSION = '2.6.1'
6
+ VERSION = '2.6.2'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanami-events-cloud_pubsub
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ker-Seymer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-27 00:00:00.000000000 Z
11
+ date: 2020-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable