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 +4 -4
- data/.circleci/config.yml +1 -1
- data/.github/workflows/ci.yml +1 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +18 -6
- data/lib/file_based_healthcheck/version.rb +1 -1
- data/lib/file_based_healthcheck.rb +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73547e035d184ba3c0c5de0e5b3f2f440b938989e28633ef48ced8060f461af9
|
4
|
+
data.tar.gz: e3043310abe2781bf5807813a942dcad8fe86db4f161a0af99a17d268c2a11f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a28073d389cf3e70eadd17e8fbcb5f6c0ab961df067185bf14552d970cefd74b0b6b6329488d983a36af63fccc26b3bef1ba8fd311f7a99fc601576aaafba61e
|
7
|
+
data.tar.gz: 67ba6d8717056695a8c6039cf6b1abbdf95b8e9a3094e9d10aa714e194c38cf5dd75f6d00aa42ad350d4c39646910c3d752bbcb42309930909b4a82f918df2cc
|
data/.circleci/config.yml
CHANGED
data/.github/workflows/ci.yml
CHANGED
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.
|
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.
|
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
|
-
|
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
|
-
|
25
|
+
drb (2.2.1)
|
26
|
+
i18n (1.14.5)
|
18
27
|
concurrent-ruby (~> 1.0)
|
19
|
-
minitest (5.
|
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.
|
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,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.
|
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.
|
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.
|
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:
|
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.
|
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.
|