http_health_check 0.4.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.env +1 -1
- data/.rspec +1 -0
- data/.rubocop.yml +1 -1
- data/.tool-versions +1 -1
- data/Appraisals +24 -0
- data/CHANGELOG.md +17 -0
- data/Dockerfile +14 -0
- data/Gemfile +1 -4
- data/README.md +1 -1
- data/dip.yml +68 -0
- data/docker-compose.yml +30 -3
- data/http_health_check.gemspec +22 -14
- data/lib/http_health_check/probes/ruby_kafka.rb +15 -2
- data/lib/http_health_check/probes/sidekiq.rb +1 -1
- data/lib/http_health_check/utils/karafka.rb +1 -1
- data/lib/http_health_check/version.rb +1 -1
- metadata +123 -28
- data/.github/workflows/ci.yml +0 -41
- data/.gitignore +0 -10
- data/Gemfile.lock +0 -95
- data/bin/console +0 -15
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c44fb8689fc6d389a04a16def9b1be4f3807d229469de0aa7c4ecff6e15ec4bd
|
4
|
+
data.tar.gz: bdaa77e4133537250f5be342b9140275286e178437705c68c19c0092191c4add
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3e45db25b084cdc00d65e0fd3e8054c7abb7ce66a70d2852413b57c8c77bdcb54f10b8b4fcdedf02dbb298d24c6a08d0235af3332f5dcd6990d897a316d870c
|
7
|
+
data.tar.gz: 1d4eeea26dea62cdc0b82736c123e9c5a2b4a6872e35989ae2d9fe0f99a60182e9534819cf64c193c25ab7d86e1e06047a400f3a426e9d2a51f7d35ac2ce5ae5
|
data/.env
CHANGED
@@ -1 +1 @@
|
|
1
|
-
REDIS_URL=redis://:supersecret@
|
1
|
+
REDIS_URL=redis://:supersecret@redis:6379/10
|
data/.rspec
CHANGED
data/.rubocop.yml
CHANGED
data/.tool-versions
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby 2.
|
1
|
+
ruby 3.2.0
|
data/Appraisals
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# See compatibility table at https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
|
4
|
+
|
5
|
+
versions_map = {
|
6
|
+
'6.0' => %w[2.7],
|
7
|
+
'6.1' => %w[2.7 3.0],
|
8
|
+
'7.0' => %w[3.1],
|
9
|
+
'7.1' => %w[3.2],
|
10
|
+
'7.2' => %w[3.3 3.4],
|
11
|
+
'8.0' => %w[3.4]
|
12
|
+
}
|
13
|
+
|
14
|
+
current_ruby_version = RUBY_VERSION.split('.').first(2).join('.')
|
15
|
+
|
16
|
+
versions_map.each do |rails_version, ruby_versions|
|
17
|
+
ruby_versions.each do |ruby_version|
|
18
|
+
next if ruby_version != current_ruby_version
|
19
|
+
|
20
|
+
appraise "rails-#{rails_version}" do
|
21
|
+
gem 'rails', "~> #{rails_version}.0"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# CHANGELOG.md
|
2
2
|
|
3
|
+
## 1.0.0 (2024-12-28)
|
4
|
+
|
5
|
+
Features:
|
6
|
+
|
7
|
+
- Drop ruby 2.5/2.6 support
|
8
|
+
- Add appraisals
|
9
|
+
|
10
|
+
Fix:
|
11
|
+
|
12
|
+
- Fix ruby-kafka health-check bug for some ActiveSupport versions
|
13
|
+
|
14
|
+
## 0.5.0 (2023-08-16)
|
15
|
+
|
16
|
+
Features:
|
17
|
+
|
18
|
+
- Add Sidekiq 6+ support [PR#4](https://github.com/SberMarket-Tech/http_health_check/pull/4)
|
19
|
+
|
3
20
|
## 0.4.1 (2022-08-05)
|
4
21
|
|
5
22
|
Fix:
|
data/Dockerfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
ARG RUBY_VERSION
|
2
|
+
|
3
|
+
FROM ruby:$RUBY_VERSION
|
4
|
+
|
5
|
+
ARG BUNDLER_VERSION
|
6
|
+
ARG RUBYGEMS_VERSION
|
7
|
+
|
8
|
+
ENV BUNDLE_JOBS=4 \
|
9
|
+
BUNDLE_RETRY=3
|
10
|
+
|
11
|
+
RUN gem update --system "${RUBYGEMS_VERSION}" \
|
12
|
+
&& rm /usr/local/lib/ruby/gems/*/specifications/default/bundler*.gemspec \
|
13
|
+
&& gem install --default bundler:${BUNDLER_VERSION} \
|
14
|
+
&& gem install bundler -v ${BUNDLER_VERSION}
|
data/Gemfile
CHANGED
@@ -1,14 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
source 'https://rubygems.org'
|
3
|
+
source ENV.fetch('RUBYGEMS_PUBLIC_SOURCE', 'https://rubygems.org/')
|
4
4
|
|
5
5
|
# Specify your gem's dependencies in http_health_check.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
gem 'rake', '~> 13.0'
|
9
|
-
|
10
8
|
group :test do
|
11
|
-
gem 'rspec_junit_formatter'
|
12
9
|
gem 'simplecov', require: false
|
13
10
|
gem 'simplecov-cobertura', require: false
|
14
11
|
end
|
data/README.md
CHANGED
@@ -203,7 +203,7 @@ Be aware that this approach does not cover issues with sidekiq being stuck proce
|
|
203
203
|
|
204
204
|
```ruby
|
205
205
|
HttpHealthCheck.configure do |config|
|
206
|
-
config.probe '/readiness/
|
206
|
+
config.probe '/readiness/sidekiq', HttpHealthCheck::Probes::Sidekiq.new
|
207
207
|
end
|
208
208
|
```
|
209
209
|
|
data/dip.yml
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
version: '7'
|
2
|
+
|
3
|
+
environment:
|
4
|
+
RUBY_VERSION: '3.3'
|
5
|
+
|
6
|
+
compose:
|
7
|
+
files:
|
8
|
+
- docker-compose.yml
|
9
|
+
|
10
|
+
interaction:
|
11
|
+
bash:
|
12
|
+
description: Open the Bash shell in app's container
|
13
|
+
service: ruby
|
14
|
+
command: /bin/bash
|
15
|
+
|
16
|
+
bundle:
|
17
|
+
description: Run Bundler commands
|
18
|
+
service: ruby
|
19
|
+
command: bundle
|
20
|
+
|
21
|
+
rails:
|
22
|
+
description: Run RoR commands
|
23
|
+
service: ruby
|
24
|
+
command: bundle exec rails
|
25
|
+
|
26
|
+
appraisal:
|
27
|
+
description: Run Appraisal commands
|
28
|
+
service: ruby
|
29
|
+
command: bundle exec appraisal
|
30
|
+
|
31
|
+
rspec:
|
32
|
+
description: Run Rspec commands
|
33
|
+
service: ruby
|
34
|
+
command: bundle exec rspec
|
35
|
+
subcommands:
|
36
|
+
all:
|
37
|
+
command: bundle exec appraisal rspec
|
38
|
+
rails-6.0:
|
39
|
+
command: bundle exec appraisal rails-6.0 rspec
|
40
|
+
rails-6.1:
|
41
|
+
command: bundle exec appraisal rails-6.1 rspec
|
42
|
+
rails-7.0:
|
43
|
+
command: bundle exec appraisal rails-7.0 rspec
|
44
|
+
rails-7.1:
|
45
|
+
command: bundle exec appraisal rails-7.1 rspec
|
46
|
+
rails-7.2:
|
47
|
+
command: bundle exec appraisal rails-7.2 rspec
|
48
|
+
|
49
|
+
rubocop:
|
50
|
+
description: Run Ruby linter
|
51
|
+
service: ruby
|
52
|
+
command: bundle exec rubocop
|
53
|
+
|
54
|
+
setup:
|
55
|
+
description: Install deps
|
56
|
+
service: ruby
|
57
|
+
command: bin/setup
|
58
|
+
|
59
|
+
test:
|
60
|
+
description: Run linters, run all tests
|
61
|
+
service: ruby
|
62
|
+
command: bin/test
|
63
|
+
|
64
|
+
provision:
|
65
|
+
- dip compose down --volumes
|
66
|
+
- rm -f Gemfile.lock
|
67
|
+
- rm -f gemfiles/*gemfile*
|
68
|
+
- dip setup
|
data/docker-compose.yml
CHANGED
@@ -1,13 +1,40 @@
|
|
1
|
-
version: '3.5'
|
2
1
|
services:
|
2
|
+
ruby:
|
3
|
+
build:
|
4
|
+
context: .
|
5
|
+
dockerfile: Dockerfile
|
6
|
+
args:
|
7
|
+
RUBY_VERSION: ${RUBY_VERSION:-3.3}
|
8
|
+
BUNDLER_VERSION: 2.4.22
|
9
|
+
RUBYGEMS_VERSION: 3.4.22
|
10
|
+
image: http_health_check-dev:0.1.0-ruby_${RUBY_VERSION:-3.3}
|
11
|
+
environment:
|
12
|
+
HISTFILE: /app/tmp/.bash_history
|
13
|
+
BUNDLE_PATH: /usr/local/bundle
|
14
|
+
BUNDLE_CONFIG: /app/.bundle/config
|
15
|
+
REDIS_URL: redis://:supersecret@redis:6379/10
|
16
|
+
command: bash
|
17
|
+
working_dir: /app
|
18
|
+
depends_on:
|
19
|
+
redis:
|
20
|
+
condition: service_healthy
|
21
|
+
volumes:
|
22
|
+
- .:/app:cached
|
23
|
+
- ${SBMT_RUBYGEMS_PATH:-..}:/app/vendor/gems:cached
|
24
|
+
- bundler_data:/usr/local/bundle
|
25
|
+
|
3
26
|
redis:
|
4
27
|
image: bitnami/redis:6.2
|
5
28
|
environment:
|
6
29
|
REDIS_PASSWORD: supersecret
|
7
30
|
volumes:
|
8
31
|
- redis:/data
|
32
|
+
healthcheck:
|
33
|
+
test: redis-cli -a supersecret ping
|
34
|
+
interval: 10s
|
9
35
|
ports:
|
10
|
-
- '6379
|
36
|
+
- '6379'
|
11
37
|
|
12
38
|
volumes:
|
13
|
-
|
39
|
+
bundler_data:
|
40
|
+
redis:
|
data/http_health_check.gemspec
CHANGED
@@ -6,34 +6,42 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = 'http_health_check'
|
7
7
|
spec.version = HttpHealthCheck::VERSION
|
8
8
|
spec.licenses = ['MIT']
|
9
|
-
spec.authors = ['
|
10
|
-
spec.email = ['pochi.73@gmail.com']
|
9
|
+
spec.authors = ['Kuper Ruby Platform Team']
|
11
10
|
|
12
11
|
spec.summary = 'Simple and extensible HTTP health checks server.'
|
13
12
|
spec.description = spec.summary
|
14
|
-
spec.homepage = 'https://github.com/
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
13
|
+
spec.homepage = 'https://github.com/Kuper-Tech/http_health_check'
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
|
16
15
|
|
17
|
-
spec.metadata['allowed_push_host'] = 'https://rubygems.org
|
16
|
+
spec.metadata['allowed_push_host'] = ENV.fetch('NEXUS_URL', 'https://rubygems.org')
|
18
17
|
|
19
18
|
spec.metadata['homepage_uri'] = spec.homepage
|
20
|
-
spec.metadata['source_code_uri'] =
|
21
|
-
spec.metadata['changelog_uri'] =
|
19
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
20
|
+
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
22
21
|
|
23
|
-
spec.files = Dir.chdir(
|
24
|
-
`git ls-files -z`.split("\x0").reject
|
22
|
+
spec.files = Dir.chdir(__dir__) do
|
23
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
24
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
25
|
+
end
|
25
26
|
end
|
26
|
-
spec.bindir
|
27
|
-
spec.executables
|
27
|
+
spec.bindir = 'exe'
|
28
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
28
29
|
spec.require_paths = ['lib']
|
29
30
|
|
30
31
|
spec.add_dependency 'rack', '~> 2.0'
|
31
32
|
spec.add_dependency 'webrick'
|
32
33
|
|
33
|
-
spec.add_development_dependency 'activesupport', '
|
34
|
+
spec.add_development_dependency 'activesupport', '>= 6.0'
|
35
|
+
spec.add_development_dependency 'appraisal', '>= 2.4'
|
36
|
+
spec.add_development_dependency 'bundler', '>= 2.3'
|
37
|
+
spec.add_development_dependency 'combustion', '>= 1.3'
|
34
38
|
spec.add_development_dependency 'dotenv', '~> 2.7.6'
|
35
|
-
spec.add_development_dependency '
|
36
|
-
spec.add_development_dependency '
|
39
|
+
spec.add_development_dependency 'rake', '>= 13.0'
|
40
|
+
spec.add_development_dependency 'redis'
|
41
|
+
spec.add_development_dependency 'redis-client'
|
42
|
+
spec.add_development_dependency 'rspec', '>= 3.0'
|
43
|
+
spec.add_development_dependency 'rspec_junit_formatter'
|
44
|
+
spec.add_development_dependency 'rspec-rails'
|
37
45
|
spec.add_development_dependency 'rubocop', '~> 0.81'
|
38
46
|
spec.add_development_dependency 'thor', '>= 0.20'
|
39
47
|
end
|
@@ -19,7 +19,7 @@ module HttpHealthCheck
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def probe(_env)
|
22
|
-
now = @timer.now
|
22
|
+
now = @timer.now.to_i
|
23
23
|
failed_heartbeats = select_failed_heartbeats(now)
|
24
24
|
return probe_ok groups: meta_from_heartbeats(@heartbeats, now) if failed_heartbeats.empty?
|
25
25
|
|
@@ -59,9 +59,22 @@ module HttpHealthCheck
|
|
59
59
|
group = event.payload[:group_id]
|
60
60
|
|
61
61
|
@heartbeats[group] ||= {}
|
62
|
-
@heartbeats[group][event.transaction_id] = Heartbeat.new(
|
62
|
+
@heartbeats[group][event.transaction_id] = Heartbeat.new(
|
63
|
+
event_time(event), group, event.payload[:topic_partitions]
|
64
|
+
)
|
63
65
|
end
|
64
66
|
end
|
67
|
+
|
68
|
+
def event_time(event)
|
69
|
+
# event.time in millis in ActiveSupport >= 7.0 && ActiveSupport< 7.1.4
|
70
|
+
# see ActiveSupport::Notifications::Event.initialize
|
71
|
+
active_support_version = ActiveSupport.gem_version
|
72
|
+
if active_support_version >= Gem::Version.new('7.0.0') && active_support_version < Gem::Version.new('7.1.4')
|
73
|
+
return (event.time.to_i / 1000)
|
74
|
+
end
|
75
|
+
|
76
|
+
event.time.to_i
|
77
|
+
end
|
65
78
|
end
|
66
79
|
end
|
67
80
|
end
|
@@ -10,7 +10,7 @@ module HttpHealthCheck
|
|
10
10
|
# @param karafka_app descendant of Karafka::App
|
11
11
|
def self.consumer_groups(karafka_app, program_name: $PROGRAM_NAME, argv: ARGV) # rubocop:disable Metrics/AbcSize
|
12
12
|
all_groups = karafka_app.consumer_groups.map(&:id)
|
13
|
-
client_id_prefix = karafka_app.config.client_id.gsub('-', '_')
|
13
|
+
client_id_prefix = "#{karafka_app.config.client_id.gsub('-', '_')}_"
|
14
14
|
|
15
15
|
return all_groups if program_name.split('/').last != 'karafka'
|
16
16
|
return all_groups if argv[0] != 'server'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_health_check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Kuper Ruby Platform Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -42,16 +42,58 @@ dependencies:
|
|
42
42
|
name: activesupport
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '6.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '6.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: appraisal
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.4'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.4'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.3'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.3'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: combustion
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.3'
|
55
97
|
- !ruby/object:Gem::Dependency
|
56
98
|
name: dotenv
|
57
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,34 +108,90 @@ dependencies:
|
|
66
108
|
- - "~>"
|
67
109
|
- !ruby/object:Gem::Version
|
68
110
|
version: 2.7.6
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '13.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '13.0'
|
69
125
|
- !ruby/object:Gem::Dependency
|
70
126
|
name: redis
|
71
127
|
requirement: !ruby/object:Gem::Requirement
|
72
128
|
requirements:
|
73
|
-
- - "
|
129
|
+
- - ">="
|
74
130
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
131
|
+
version: '0'
|
76
132
|
type: :development
|
77
133
|
prerelease: false
|
78
134
|
version_requirements: !ruby/object:Gem::Requirement
|
79
135
|
requirements:
|
80
|
-
- - "
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: redis-client
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
81
151
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
152
|
+
version: '0'
|
83
153
|
- !ruby/object:Gem::Dependency
|
84
154
|
name: rspec
|
85
155
|
requirement: !ruby/object:Gem::Requirement
|
86
156
|
requirements:
|
87
|
-
- - "
|
157
|
+
- - ">="
|
88
158
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
159
|
+
version: '3.0'
|
90
160
|
type: :development
|
91
161
|
prerelease: false
|
92
162
|
version_requirements: !ruby/object:Gem::Requirement
|
93
163
|
requirements:
|
94
|
-
- - "
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '3.0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rspec_junit_formatter
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rspec-rails
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
95
193
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
194
|
+
version: '0'
|
97
195
|
- !ruby/object:Gem::Dependency
|
98
196
|
name: rubocop
|
99
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,26 +222,23 @@ dependencies:
|
|
124
222
|
version: '0.20'
|
125
223
|
description: Simple and extensible HTTP health checks server.
|
126
224
|
email:
|
127
|
-
- pochi.73@gmail.com
|
128
225
|
executables: []
|
129
226
|
extensions: []
|
130
227
|
extra_rdoc_files: []
|
131
228
|
files:
|
132
229
|
- ".bumpversion.cfg"
|
133
230
|
- ".env"
|
134
|
-
- ".github/workflows/ci.yml"
|
135
|
-
- ".gitignore"
|
136
231
|
- ".rspec"
|
137
232
|
- ".rubocop.yml"
|
138
233
|
- ".tool-versions"
|
234
|
+
- Appraisals
|
139
235
|
- CHANGELOG.md
|
236
|
+
- Dockerfile
|
140
237
|
- Gemfile
|
141
|
-
- Gemfile.lock
|
142
238
|
- LICENSE
|
143
239
|
- README.md
|
144
240
|
- Rakefile
|
145
|
-
-
|
146
|
-
- bin/setup
|
241
|
+
- dip.yml
|
147
242
|
- docker-compose.yml
|
148
243
|
- http_health_check.gemspec
|
149
244
|
- lib/http_health_check.rb
|
@@ -158,14 +253,14 @@ files:
|
|
158
253
|
- lib/http_health_check/utils.rb
|
159
254
|
- lib/http_health_check/utils/karafka.rb
|
160
255
|
- lib/http_health_check/version.rb
|
161
|
-
homepage: https://github.com/
|
256
|
+
homepage: https://github.com/Kuper-Tech/http_health_check
|
162
257
|
licenses:
|
163
258
|
- MIT
|
164
259
|
metadata:
|
165
|
-
allowed_push_host: https://rubygems.org
|
166
|
-
homepage_uri: https://github.com/
|
167
|
-
source_code_uri: https://github.com/
|
168
|
-
changelog_uri: https://github.com/
|
260
|
+
allowed_push_host: https://rubygems.org
|
261
|
+
homepage_uri: https://github.com/Kuper-Tech/http_health_check
|
262
|
+
source_code_uri: https://github.com/Kuper-Tech/http_health_check
|
263
|
+
changelog_uri: https://github.com/Kuper-Tech/http_health_check/blob/main/CHANGELOG.md
|
169
264
|
post_install_message:
|
170
265
|
rdoc_options: []
|
171
266
|
require_paths:
|
@@ -174,14 +269,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
269
|
requirements:
|
175
270
|
- - ">="
|
176
271
|
- !ruby/object:Gem::Version
|
177
|
-
version: 2.
|
272
|
+
version: 2.7.0
|
178
273
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
274
|
requirements:
|
180
275
|
- - ">="
|
181
276
|
- !ruby/object:Gem::Version
|
182
277
|
version: '0'
|
183
278
|
requirements: []
|
184
|
-
rubygems_version: 3.
|
279
|
+
rubygems_version: 3.3.7
|
185
280
|
signing_key:
|
186
281
|
specification_version: 4
|
187
282
|
summary: Simple and extensible HTTP health checks server.
|
data/.github/workflows/ci.yml
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
name: ci
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches: [main]
|
6
|
-
pull_request:
|
7
|
-
branches: [main]
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
build:
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
strategy:
|
13
|
-
matrix:
|
14
|
-
ruby: ["2.5", "2.6", "2.7", "3.0"]
|
15
|
-
services:
|
16
|
-
redis:
|
17
|
-
image: bitnami/redis:6.2
|
18
|
-
ports:
|
19
|
-
- 6379:6379
|
20
|
-
env:
|
21
|
-
REDIS_PASSWORD: supersecret
|
22
|
-
options: >-
|
23
|
-
--health-cmd "redis-cli -p 6379 -a 'supersecret' ping"
|
24
|
-
--health-interval 1s
|
25
|
-
--health-timeout 3s
|
26
|
-
--health-retries 10
|
27
|
-
steps:
|
28
|
-
- uses: actions/checkout@v3
|
29
|
-
- name: Set up Ruby
|
30
|
-
uses: ruby/setup-ruby@v1
|
31
|
-
with:
|
32
|
-
bundler-cache: true
|
33
|
-
ruby-version: ${{ matrix.ruby }}
|
34
|
-
- name: Run all tests
|
35
|
-
run: bundle exec rspec
|
36
|
-
env:
|
37
|
-
REDIS_URL: redis://:supersecret@redis:${{ job.services.redis.ports[6379] }}/0
|
38
|
-
# FIXME!
|
39
|
-
SKIP_REDIS_SPECS: true
|
40
|
-
- name: Run rubocop
|
41
|
-
run: bundle exec rubocop
|
data/.gitignore
DELETED
data/Gemfile.lock
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
http_health_check (0.4.1)
|
5
|
-
rack (~> 2.0)
|
6
|
-
webrick
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
activesupport (5.2.8.1)
|
12
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
-
i18n (>= 0.7, < 2)
|
14
|
-
minitest (~> 5.1)
|
15
|
-
tzinfo (~> 1.1)
|
16
|
-
ast (2.4.2)
|
17
|
-
concurrent-ruby (1.1.10)
|
18
|
-
diff-lcs (1.5.0)
|
19
|
-
docile (1.4.0)
|
20
|
-
dotenv (2.7.6)
|
21
|
-
i18n (1.12.0)
|
22
|
-
concurrent-ruby (~> 1.0)
|
23
|
-
minitest (5.15.0)
|
24
|
-
parallel (1.22.1)
|
25
|
-
parser (3.1.2.0)
|
26
|
-
ast (~> 2.4.1)
|
27
|
-
rack (2.2.4)
|
28
|
-
rainbow (3.1.1)
|
29
|
-
rake (13.0.6)
|
30
|
-
redis (4.2.5)
|
31
|
-
regexp_parser (2.5.0)
|
32
|
-
rexml (3.2.5)
|
33
|
-
rspec (3.11.0)
|
34
|
-
rspec-core (~> 3.11.0)
|
35
|
-
rspec-expectations (~> 3.11.0)
|
36
|
-
rspec-mocks (~> 3.11.0)
|
37
|
-
rspec-core (3.11.0)
|
38
|
-
rspec-support (~> 3.11.0)
|
39
|
-
rspec-expectations (3.11.0)
|
40
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.11.0)
|
42
|
-
rspec-mocks (3.11.1)
|
43
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.11.0)
|
45
|
-
rspec-support (3.11.0)
|
46
|
-
rspec_junit_formatter (0.5.1)
|
47
|
-
rspec-core (>= 2, < 4, != 2.12.0)
|
48
|
-
rubocop (0.93.1)
|
49
|
-
parallel (~> 1.10)
|
50
|
-
parser (>= 2.7.1.5)
|
51
|
-
rainbow (>= 2.2.2, < 4.0)
|
52
|
-
regexp_parser (>= 1.8)
|
53
|
-
rexml
|
54
|
-
rubocop-ast (>= 0.6.0)
|
55
|
-
ruby-progressbar (~> 1.7)
|
56
|
-
unicode-display_width (>= 1.4.0, < 2.0)
|
57
|
-
rubocop-ast (1.17.0)
|
58
|
-
parser (>= 3.1.1.0)
|
59
|
-
ruby-progressbar (1.11.0)
|
60
|
-
simplecov (0.21.2)
|
61
|
-
docile (~> 1.1)
|
62
|
-
simplecov-html (~> 0.11)
|
63
|
-
simplecov_json_formatter (~> 0.1)
|
64
|
-
simplecov-cobertura (2.1.0)
|
65
|
-
rexml
|
66
|
-
simplecov (~> 0.19)
|
67
|
-
simplecov-html (0.12.3)
|
68
|
-
simplecov_json_formatter (0.1.4)
|
69
|
-
thor (1.1.0)
|
70
|
-
thread_safe (0.3.6)
|
71
|
-
tzinfo (1.2.9)
|
72
|
-
thread_safe (~> 0.1)
|
73
|
-
unicode-display_width (1.8.0)
|
74
|
-
webrick (1.7.0)
|
75
|
-
|
76
|
-
PLATFORMS
|
77
|
-
ruby
|
78
|
-
x86_64-darwin-21
|
79
|
-
x86_64-linux
|
80
|
-
|
81
|
-
DEPENDENCIES
|
82
|
-
activesupport (~> 5.0)
|
83
|
-
dotenv (~> 2.7.6)
|
84
|
-
http_health_check!
|
85
|
-
rake (~> 13.0)
|
86
|
-
redis (~> 4.2.5)
|
87
|
-
rspec (~> 3.2)
|
88
|
-
rspec_junit_formatter
|
89
|
-
rubocop (~> 0.81)
|
90
|
-
simplecov
|
91
|
-
simplecov-cobertura
|
92
|
-
thor (>= 0.20)
|
93
|
-
|
94
|
-
BUNDLED WITH
|
95
|
-
2.3.15
|
data/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'http_health_check'
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require 'irb'
|
15
|
-
IRB.start(__FILE__)
|