sensu-redis 2.2.1 → 2.3.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: 6e5f7655bb7532d8a8eceb8c97355780c0662871
4
- data.tar.gz: 845f5bea88e14f020730b9d10eb17a8c6f2f5f51
3
+ metadata.gz: 130f1d035399f05c74f3540743bfea9496d416ad
4
+ data.tar.gz: 3f1f33e4524d9691f8ed0924c66159d16cd7cd0b
5
5
  SHA512:
6
- metadata.gz: 4b27ec1f7c0b62543fa239ee74365d6c5bdd25a618ccdd6b97cc0ff2ee290adb1d87b7dfa1df2a79200ef3c25bf674d84e2b63b3de28e9a3018a2ef194e40943
7
- data.tar.gz: 768b1a5b3010565f0c4eafa7ee2f52816e93fad31df22de9fa66fa1da2cad6609504c6ec63b19a8c9c2118250a54be286eb21552d25a979f7e5001f9f7883b48
6
+ metadata.gz: 76f796f5c02eb17b2b5ec6443d6f9352909ae05e974a7db64d2e59af679d27466bf1d1e03c7d11c68c755b56e5860ec5dd9adf8f889ab68c973cc9898be66dea
7
+ data.tar.gz: 9cb0310c6bb4efd8935411bc97d88fb36178179f85e6ba7beac56864e935180d9618582a690ebeb56f7c5645b4e94475559b25650646c010a733d8e3e858b7a4
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -19,6 +19,7 @@ module Sensu
19
19
  @port = (options[:port] || 6379).to_i
20
20
  @db = options[:db]
21
21
  @password = options[:password]
22
+ @tls = options[:tls] || options[:ssl]
22
23
  @auto_reconnect = options.fetch(:auto_reconnect, true)
23
24
  @reconnect_on_error = options.fetch(:reconnect_on_error, true)
24
25
  @error_callback = Proc.new {}
@@ -264,12 +265,14 @@ module Sensu
264
265
  end
265
266
 
266
267
  # This method is called by EM when the connection is
267
- # established. This method is reponsible for validating the
268
- # connection before Redis commands can be sent.
268
+ # established. This method is reponsible for upgrading to TLS if
269
+ # necessary and validating the connection before Redis commands
270
+ # can be sent.
269
271
  def connection_completed
270
272
  @response_callbacks = []
271
273
  @multibulk_count = false
272
274
  @connected = true
275
+ start_tls(@tls) unless @tls.nil?
273
276
  authenticate do
274
277
  select_db
275
278
  verify_version do
@@ -280,6 +283,20 @@ module Sensu
280
283
  end
281
284
  end
282
285
 
286
+ # This method is called by EM when the SSL/TLS handshake has
287
+ # been completed, as a result of calling #start_tls to initiate
288
+ # SSL/TLS on the connection. Log when the TLS handshake is
289
+ # complete.
290
+ def ssl_handshake_completed
291
+ if @logger
292
+ @logger.debug("redis tls handshake complete", {
293
+ :host => @host,
294
+ :port => @port,
295
+ :tls => @tls
296
+ })
297
+ end
298
+ end
299
+
283
300
  # Begin a multi bulk response array for an expected number of
284
301
  # responses. Using this method causes `dispatch_response()` to
285
302
  # wait until all of the expected responses have been added to
data/sensu-redis.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "sensu-redis"
5
- spec.version = "2.2.1"
5
+ spec.version = "2.3.0"
6
6
  spec.authors = ["Sean Porter"]
7
7
  spec.email = ["portertech@gmail.com", "engineering@sensu.io"]
8
8
  spec.summary = "The Sensu Redis client library"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Porter
@@ -30,7 +30,7 @@ cert_chain:
30
30
  jOeGyhtQa9j4FFmsEJDg59f5v/3hECXsa3Xuml3foaFHzX3Ya/YIyd2YFxvkFKIu
31
31
  GVbe7A3YdxzdkH2Es/Ym9twdxXaIDdXzj8sWhw==
32
32
  -----END CERTIFICATE-----
33
- date: 2018-03-08 00:00:00.000000000 Z
33
+ date: 2018-03-09 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: eventmachine
metadata.gz.sig CHANGED
Binary file