http_health_check 0.5.0 → 1.1.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/Appraisals +24 -0
- data/CHANGELOG.md +17 -0
- data/Dockerfile +14 -0
- data/Gemfile +1 -4
- data/dip.yml +68 -0
- data/docker-compose.yml +30 -3
- data/http_health_check.gemspec +23 -16
- data/lib/http_health_check/probes/ruby_kafka.rb +15 -2
- data/lib/http_health_check/rack_app.rb +2 -2
- data/lib/http_health_check/version.rb +1 -1
- data/lib/http_health_check.rb +13 -5
- metadata +117 -36
- data/.github/workflows/ci.yml +0 -41
- data/.gitignore +0 -10
- data/Gemfile.lock +0 -99
- 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: ebcd5edf203fcba732fff9fefaa824e1b128fa910d42583f18ceec6f22afd510
|
4
|
+
data.tar.gz: e6ef7da4d666631f64449fb3fed6350155334251668edf8549aa40a564755d76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ebc09a47a4aade8d0db68b724639a092523135644b9346c6f9db8a1ce0a3926b735672e8383d8e6c7d924d725fb8a4edc231be7a20fef6c924abd53afdcf0ad
|
7
|
+
data.tar.gz: 66a8cf658aee82d8e21101203f46b1c9433a3baf6915762e645f09ff1d0d98d178034465fc24f6b2c646b1b003fb9ede957c3e0d19824e6d2106ebcdf5c0fa1b
|
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/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.1.0 (2025-03-28)
|
4
|
+
|
5
|
+
Features:
|
6
|
+
|
7
|
+
- Support rack v3
|
8
|
+
|
9
|
+
## 1.0.0 (2024-12-28)
|
10
|
+
|
11
|
+
Features:
|
12
|
+
|
13
|
+
- Drop ruby 2.5/2.6 support
|
14
|
+
- Add appraisals
|
15
|
+
|
16
|
+
Fix:
|
17
|
+
|
18
|
+
- Fix ruby-kafka health-check bug for some ActiveSupport versions
|
19
|
+
|
3
20
|
## 0.5.0 (2023-08-16)
|
4
21
|
|
5
22
|
Features:
|
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/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,35 +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
|
-
spec.add_dependency 'rack', '
|
31
|
+
spec.add_dependency 'rack', '>= 2'
|
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 'redis
|
37
|
-
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'
|
38
45
|
spec.add_development_dependency 'rubocop', '~> 0.81'
|
39
46
|
spec.add_development_dependency 'thor', '>= 0.20'
|
40
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
|
@@ -5,8 +5,8 @@ require 'logger'
|
|
5
5
|
|
6
6
|
module HttpHealthCheck
|
7
7
|
class RackApp
|
8
|
-
HEADERS = { '
|
9
|
-
DEFAULT_FALLBACK_APP = ->(_env) { [404, HEADERS, ['{"error": "not_found"}']] }
|
8
|
+
HEADERS = { 'content-type' => 'application/json' } # rubocop:disable Style/MutableConstant
|
9
|
+
DEFAULT_FALLBACK_APP = ->(_env) { [404, HEADERS, ['{"error": "not_found"}']] }
|
10
10
|
LIVENESS_CHECK_APP = ->(_env) { [200, HEADERS, ["{}\n"]] }
|
11
11
|
|
12
12
|
def self.configure
|
data/lib/http_health_check.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
require 'rack'
|
4
4
|
|
5
|
+
require 'rackup/handler/webrick' if Gem::Version.new(::Rack.release) >= Gem::Version.new('3')
|
6
|
+
|
5
7
|
require_relative 'http_health_check/version'
|
6
8
|
require_relative 'http_health_check/config/dsl'
|
7
9
|
require_relative 'http_health_check/probe'
|
@@ -44,10 +46,16 @@ module HttpHealthCheck
|
|
44
46
|
rack_app ||= ::HttpHealthCheck.rack_app
|
45
47
|
rack_app_with_logger = ::Rack::CommonLogger.new(rack_app, rack_app.logger)
|
46
48
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
webrick.run(rack_app_with_logger,
|
50
|
+
Host: host,
|
51
|
+
Port: port,
|
52
|
+
AccessLog: [],
|
53
|
+
Logger: rack_app.logger)
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.webrick
|
57
|
+
return ::Rack::Handler::WEBrick if Gem::Version.new(::Rack.release) < Gem::Version.new('3')
|
58
|
+
|
59
|
+
::Rackup::Handler::WEBrick
|
52
60
|
end
|
53
61
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_health_check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.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-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2
|
19
|
+
version: '2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2
|
26
|
+
version: '2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: webrick
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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
|
+
- !ruby/object:Gem::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
|
+
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
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,48 +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
|
+
- - ">="
|
81
137
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
138
|
+
version: '0'
|
83
139
|
- !ruby/object:Gem::Dependency
|
84
140
|
name: redis-client
|
85
141
|
requirement: !ruby/object:Gem::Requirement
|
86
142
|
requirements:
|
87
|
-
- - "
|
143
|
+
- - ">="
|
88
144
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0
|
145
|
+
version: '0'
|
90
146
|
type: :development
|
91
147
|
prerelease: false
|
92
148
|
version_requirements: !ruby/object:Gem::Requirement
|
93
149
|
requirements:
|
94
|
-
- - "
|
150
|
+
- - ">="
|
95
151
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0
|
152
|
+
version: '0'
|
97
153
|
- !ruby/object:Gem::Dependency
|
98
154
|
name: rspec
|
99
155
|
requirement: !ruby/object:Gem::Requirement
|
100
156
|
requirements:
|
101
|
-
- - "
|
157
|
+
- - ">="
|
102
158
|
- !ruby/object:Gem::Version
|
103
|
-
version: '3.
|
159
|
+
version: '3.0'
|
104
160
|
type: :development
|
105
161
|
prerelease: false
|
106
162
|
version_requirements: !ruby/object:Gem::Requirement
|
107
163
|
requirements:
|
108
|
-
- - "
|
164
|
+
- - ">="
|
109
165
|
- !ruby/object:Gem::Version
|
110
|
-
version: '3.
|
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
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
111
195
|
- !ruby/object:Gem::Dependency
|
112
196
|
name: rubocop
|
113
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -138,26 +222,23 @@ dependencies:
|
|
138
222
|
version: '0.20'
|
139
223
|
description: Simple and extensible HTTP health checks server.
|
140
224
|
email:
|
141
|
-
- pochi.73@gmail.com
|
142
225
|
executables: []
|
143
226
|
extensions: []
|
144
227
|
extra_rdoc_files: []
|
145
228
|
files:
|
146
229
|
- ".bumpversion.cfg"
|
147
230
|
- ".env"
|
148
|
-
- ".github/workflows/ci.yml"
|
149
|
-
- ".gitignore"
|
150
231
|
- ".rspec"
|
151
232
|
- ".rubocop.yml"
|
152
233
|
- ".tool-versions"
|
234
|
+
- Appraisals
|
153
235
|
- CHANGELOG.md
|
236
|
+
- Dockerfile
|
154
237
|
- Gemfile
|
155
|
-
- Gemfile.lock
|
156
238
|
- LICENSE
|
157
239
|
- README.md
|
158
240
|
- Rakefile
|
159
|
-
-
|
160
|
-
- bin/setup
|
241
|
+
- dip.yml
|
161
242
|
- docker-compose.yml
|
162
243
|
- http_health_check.gemspec
|
163
244
|
- lib/http_health_check.rb
|
@@ -172,14 +253,14 @@ files:
|
|
172
253
|
- lib/http_health_check/utils.rb
|
173
254
|
- lib/http_health_check/utils/karafka.rb
|
174
255
|
- lib/http_health_check/version.rb
|
175
|
-
homepage: https://github.com/
|
256
|
+
homepage: https://github.com/Kuper-Tech/http_health_check
|
176
257
|
licenses:
|
177
258
|
- MIT
|
178
259
|
metadata:
|
179
|
-
allowed_push_host: https://rubygems.org
|
180
|
-
homepage_uri: https://github.com/
|
181
|
-
source_code_uri: https://github.com/
|
182
|
-
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
|
183
264
|
post_install_message:
|
184
265
|
rdoc_options: []
|
185
266
|
require_paths:
|
@@ -188,14 +269,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
269
|
requirements:
|
189
270
|
- - ">="
|
190
271
|
- !ruby/object:Gem::Version
|
191
|
-
version: 2.
|
272
|
+
version: 2.7.0
|
192
273
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
274
|
requirements:
|
194
275
|
- - ">="
|
195
276
|
- !ruby/object:Gem::Version
|
196
277
|
version: '0'
|
197
278
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
279
|
+
rubygems_version: 3.5.22
|
199
280
|
signing_key:
|
200
281
|
specification_version: 4
|
201
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,99 +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
|
-
connection_pool (2.4.1)
|
19
|
-
diff-lcs (1.5.0)
|
20
|
-
docile (1.4.0)
|
21
|
-
dotenv (2.7.6)
|
22
|
-
i18n (1.12.0)
|
23
|
-
concurrent-ruby (~> 1.0)
|
24
|
-
minitest (5.15.0)
|
25
|
-
parallel (1.22.1)
|
26
|
-
parser (3.1.2.0)
|
27
|
-
ast (~> 2.4.1)
|
28
|
-
rack (2.2.4)
|
29
|
-
rainbow (3.1.1)
|
30
|
-
rake (13.0.6)
|
31
|
-
redis (4.2.5)
|
32
|
-
redis-client (0.15.0)
|
33
|
-
connection_pool
|
34
|
-
regexp_parser (2.5.0)
|
35
|
-
rexml (3.2.5)
|
36
|
-
rspec (3.11.0)
|
37
|
-
rspec-core (~> 3.11.0)
|
38
|
-
rspec-expectations (~> 3.11.0)
|
39
|
-
rspec-mocks (~> 3.11.0)
|
40
|
-
rspec-core (3.11.0)
|
41
|
-
rspec-support (~> 3.11.0)
|
42
|
-
rspec-expectations (3.11.0)
|
43
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.11.0)
|
45
|
-
rspec-mocks (3.11.1)
|
46
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
-
rspec-support (~> 3.11.0)
|
48
|
-
rspec-support (3.11.0)
|
49
|
-
rspec_junit_formatter (0.5.1)
|
50
|
-
rspec-core (>= 2, < 4, != 2.12.0)
|
51
|
-
rubocop (0.93.1)
|
52
|
-
parallel (~> 1.10)
|
53
|
-
parser (>= 2.7.1.5)
|
54
|
-
rainbow (>= 2.2.2, < 4.0)
|
55
|
-
regexp_parser (>= 1.8)
|
56
|
-
rexml
|
57
|
-
rubocop-ast (>= 0.6.0)
|
58
|
-
ruby-progressbar (~> 1.7)
|
59
|
-
unicode-display_width (>= 1.4.0, < 2.0)
|
60
|
-
rubocop-ast (1.17.0)
|
61
|
-
parser (>= 3.1.1.0)
|
62
|
-
ruby-progressbar (1.11.0)
|
63
|
-
simplecov (0.21.2)
|
64
|
-
docile (~> 1.1)
|
65
|
-
simplecov-html (~> 0.11)
|
66
|
-
simplecov_json_formatter (~> 0.1)
|
67
|
-
simplecov-cobertura (2.1.0)
|
68
|
-
rexml
|
69
|
-
simplecov (~> 0.19)
|
70
|
-
simplecov-html (0.12.3)
|
71
|
-
simplecov_json_formatter (0.1.4)
|
72
|
-
thor (1.1.0)
|
73
|
-
thread_safe (0.3.6)
|
74
|
-
tzinfo (1.2.9)
|
75
|
-
thread_safe (~> 0.1)
|
76
|
-
unicode-display_width (1.8.0)
|
77
|
-
webrick (1.7.0)
|
78
|
-
|
79
|
-
PLATFORMS
|
80
|
-
ruby
|
81
|
-
x86_64-darwin-21
|
82
|
-
x86_64-linux
|
83
|
-
|
84
|
-
DEPENDENCIES
|
85
|
-
activesupport (~> 5.0)
|
86
|
-
dotenv (~> 2.7.6)
|
87
|
-
http_health_check!
|
88
|
-
rake (~> 13.0)
|
89
|
-
redis (~> 4.2.5)
|
90
|
-
redis-client (~> 0.15.0)
|
91
|
-
rspec (~> 3.2)
|
92
|
-
rspec_junit_formatter
|
93
|
-
rubocop (~> 0.81)
|
94
|
-
simplecov
|
95
|
-
simplecov-cobertura
|
96
|
-
thor (>= 0.20)
|
97
|
-
|
98
|
-
BUNDLED WITH
|
99
|
-
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__)
|