philae 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/philae/docker_probe.rb +5 -5
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30d73e3e0425c11acc1fb1f03291b6d922b9141b077d5df15c82fd1bb654be9a
4
- data.tar.gz: f2296b07a57836132bc39c34de390d54a19cf91b31fe91420629fac920ff1a5b
3
+ metadata.gz: ffa3d30f51168d0d1ae72b1689900daf71eeb832aa9434f2c8d13040b962e156
4
+ data.tar.gz: e2eca87f43d64cf211f8d8705032f35378473c53e50dad83520bf408fbfcf857
5
5
  SHA512:
6
- metadata.gz: 80374b372327ad433cfe231df3cba1e555af3225b4bc0747c66fa304885f08242058666a8d7853e64751666d15cd419d2d72a805ca8a71be1b32779f532de46e
7
- data.tar.gz: 68507be35885a378a305df2172a718c331e8b51b1bd7b2b5630228d10a4d1cc21ddb82c5eb28b4e59f167fea9d8847905140b0c566f065ef5b26597f1d10efe6
6
+ metadata.gz: 186c411027e257cd9d2b482c2228e0bdc1cd8be2f68730b40ff23329ecd8b544afed4866fdad86625ecd57d3ce6a31a6627c4450110846885d8c6389e6005bae
7
+ data.tar.gz: 19377fb811659ff0a3339f223ff1502ed3678e2e9626476338811caa7e258c27676ae63f4ddb8fd1147a7bd683af5a0b6a700e386302892530637d44d4d75b75
@@ -4,19 +4,19 @@ module Philae
4
4
  class DockerProbe
5
5
  attr_reader :name
6
6
 
7
- def initialize(name, endpoint = '/var/run/docker.sock', options = nil)
7
+ def initialize(name, endpoint = '/var/run/docker.sock', options = {})
8
8
  @name = name
9
9
  @endpoint = endpoint
10
- @docker_options = options
10
+ @docker_options = {read_timeout: 50, connect_timeout: 50}.merge(options)
11
11
  end
12
12
 
13
13
  def check
14
14
  Docker.url = @endpoint
15
- Docker.options = @docker_options if !@docker_options.nil?
15
+ Docker.options = @docker_options
16
16
  begin
17
17
  Docker::Container.all
18
- rescue
19
- return { healthy: false, comment: 'Unable to communicate with docker' }
18
+ rescue => e
19
+ return { healthy: false, comment: "Unable to communicate with docker (#{e.message})" }
20
20
  end
21
21
 
22
22
  return { healthy: true, comment: '' }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: philae
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - leo@scalingo.com
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-08-23 00:00:00.000000000 Z
13
+ date: 2022-01-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: docker-api
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubygems_version: 3.1.4
123
+ rubygems_version: 3.2.22
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: Provide an health check API