file-based-healthcheck 0.1.1 → 0.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
  SHA256:
3
- metadata.gz: 39774c221c18a3f7ad66477a7c4a407605f951f0016888728e672170bbcc6206
4
- data.tar.gz: bfdc6005a88ee87d18f7d8943fb28bf676d2823e87c406c4177672946e0b356a
3
+ metadata.gz: 73547e035d184ba3c0c5de0e5b3f2f440b938989e28633ef48ced8060f461af9
4
+ data.tar.gz: e3043310abe2781bf5807813a942dcad8fe86db4f161a0af99a17d268c2a11f7
5
5
  SHA512:
6
- metadata.gz: 6bb69ea8fd5f406121604a31fa3ee74293ef55ac886e79e24f4497a1e21f13dfc2010263558ec135e86a6f051ddfb20387eb7f698c31b8f450a274188b694478
7
- data.tar.gz: 1f2653d4bd2004f2a475a428a3f2abec687cafc4ab4629b8d28b7405fa0e98598903c1583b8cabe3497e2bcb158e26706aedce7f58ff43db2aa0bee24ae45331
6
+ metadata.gz: a28073d389cf3e70eadd17e8fbcb5f6c0ab961df067185bf14552d970cefd74b0b6b6329488d983a36af63fccc26b3bef1ba8fd311f7a99fc601576aaafba61e
7
+ data.tar.gz: 67ba6d8717056695a8c6039cf6b1abbdf95b8e9a3094e9d10aa714e194c38cf5dd75f6d00aa42ad350d4c39646910c3d752bbcb42309930909b4a82f918df2cc
data/.circleci/config.yml CHANGED
@@ -2,7 +2,7 @@ version: 2.1
2
2
  jobs:
3
3
  build:
4
4
  docker:
5
- - image: ruby:2.7.2
5
+ - image: cimg/ruby:3.2.1
6
6
  steps:
7
7
  - checkout
8
8
  - run:
@@ -9,6 +9,7 @@ jobs:
9
9
  - { ruby: '2.7' }
10
10
  - { ruby: '3.0' }
11
11
  - { ruby: '3.1' }
12
+ - { ruby: '3.2' }
12
13
  runs-on: ubuntu-latest
13
14
  steps:
14
15
  - uses: actions/checkout@v2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.0] - 2024-07-22
4
+
5
+ - require "active_support" before requiring anything else
6
+
7
+ ## [0.2.0] - 2023-03-29
8
+
9
+ - Use `File.exist?` instead of `File.exists?`
10
+
3
11
  ## [0.1.1] - 2022-12-19
4
12
 
5
13
  - Fix `require` statement in a main file
data/Gemfile.lock CHANGED
@@ -1,22 +1,32 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- file-based-healthcheck (0.1.1)
4
+ file-based-healthcheck (0.3.0)
5
5
  activesupport (>= 3.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (7.0.4)
10
+ activesupport (7.1.3.4)
11
+ base64
12
+ bigdecimal
11
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ connection_pool (>= 2.2.5)
15
+ drb
12
16
  i18n (>= 1.6, < 2)
13
17
  minitest (>= 5.1)
18
+ mutex_m
14
19
  tzinfo (~> 2.0)
15
- concurrent-ruby (1.1.10)
20
+ base64 (0.2.0)
21
+ bigdecimal (3.1.8)
22
+ concurrent-ruby (1.3.3)
23
+ connection_pool (2.4.1)
16
24
  diff-lcs (1.5.0)
17
- i18n (1.12.0)
25
+ drb (2.2.1)
26
+ i18n (1.14.5)
18
27
  concurrent-ruby (~> 1.0)
19
- minitest (5.16.3)
28
+ minitest (5.24.1)
29
+ mutex_m (0.2.0)
20
30
  rake (13.0.6)
21
31
  rspec (3.11.0)
22
32
  rspec-core (~> 3.11.0)
@@ -31,11 +41,13 @@ GEM
31
41
  diff-lcs (>= 1.2.0, < 2.0)
32
42
  rspec-support (~> 3.11.0)
33
43
  rspec-support (3.11.0)
34
- tzinfo (2.0.5)
44
+ tzinfo (2.0.6)
35
45
  concurrent-ruby (~> 1.0)
36
46
 
37
47
  PLATFORMS
48
+ arm64-darwin-22
38
49
  x86_64-darwin-18
50
+ x86_64-darwin-21
39
51
  x86_64-linux
40
52
 
41
53
  DEPENDENCIES
@@ -1,5 +1,5 @@
1
1
  class FileBasedHealthcheck
2
- VERSION = "0.1.1"
2
+ VERSION = "0.3.0"
3
3
 
4
4
  module Version
5
5
  end
@@ -1,5 +1,6 @@
1
1
  require "file_based_healthcheck/version"
2
2
  require "fileutils"
3
+ require "active_support"
3
4
  require "active_support/core_ext/time"
4
5
 
5
6
  class FileBasedHealthcheck
@@ -17,13 +18,13 @@ class FileBasedHealthcheck
17
18
  end
18
19
 
19
20
  def running?
20
- return false if !File.exists?(file_path)
21
+ return false if !File.exist?(file_path)
21
22
 
22
23
  File.mtime(file_path).advance(seconds: time_threshold).utc > Time.now.utc
23
24
  end
24
25
 
25
26
  def remove
26
- File.delete(file_path) if File.exists?(file_path)
27
+ File.delete(file_path) if File.exist?(file_path)
27
28
  end
28
29
 
29
30
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: file-based-healthcheck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karol Galanciak
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-19 00:00:00.000000000 Z
11
+ date: 2024-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  requirements: []
74
- rubygems_version: 3.1.4
74
+ rubygems_version: 3.4.10
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: A gem to use a healthcheck for readiness and liveness probes in Kubernetes.