rack-ok 0.1.0 → 0.1.1
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/.github/release.yml +23 -0
- data/.github/workflows/bump-request.yml +26 -0
- data/.github/workflows/github-label-sync.yml +18 -0
- data/.github/workflows/release.yml +12 -0
- data/.github/workflows/test.yml +7 -8
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +2 -2
- data/Gemfile +1 -1
- data/Gemfile.lock +26 -16
- data/README.md +2 -4
- data/Rakefile +5 -1
- data/lib/rack/ok/version.rb +1 -1
- data/lib/rack/ok.rb +3 -3
- data/rack-ok.gemspec +2 -1
- metadata +9 -9
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f527f59befbc06298ae85c3f88311c11347f14c9a0c62b7d5f2cdf030f6b9bf5
|
|
4
|
+
data.tar.gz: 8d0cb69ac415b3ff35103116cffe6525ec96715b4e75313f29686eb1b71c46a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bbc5856dac73ba1127f1df19dafb06b48a203ca1deb58b0014df26c855f6df74a406ffb701fd980bda07282c9ea4a763e8c682a9328bbb110882e5209f8a246f
|
|
7
|
+
data.tar.gz: 50e061b10e3714d6838a81b92e55327f96efb81957a271ebde2aeda160253821f95003b07f9833656099feeef407a1cdc5c7e6e31a7dd2429eb5385a7c182bad
|
data/.github/release.yml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
changelog:
|
|
2
|
+
categories:
|
|
3
|
+
- title: Added
|
|
4
|
+
labels:
|
|
5
|
+
- add
|
|
6
|
+
- title: Changed
|
|
7
|
+
labels:
|
|
8
|
+
- change
|
|
9
|
+
- title: Deprecated
|
|
10
|
+
labels:
|
|
11
|
+
- deprecate
|
|
12
|
+
- title: Fixed
|
|
13
|
+
labels:
|
|
14
|
+
- fix
|
|
15
|
+
- title: Removed
|
|
16
|
+
labels:
|
|
17
|
+
- remove
|
|
18
|
+
- title: Security
|
|
19
|
+
labels:
|
|
20
|
+
- security
|
|
21
|
+
- title: Others
|
|
22
|
+
labels:
|
|
23
|
+
- "*"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: bump-request
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
description: Version to change to.
|
|
8
|
+
required: true
|
|
9
|
+
type: string
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
run:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
|
+
- name: Set up Ruby
|
|
17
|
+
uses: ruby/setup-ruby@v1
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: 3.1.2
|
|
20
|
+
bundler-cache: true
|
|
21
|
+
- uses: r7kamura/bump-request@v0
|
|
22
|
+
with:
|
|
23
|
+
command: |
|
|
24
|
+
sed -i -r 's/([0-9]+\.[0-9]+\.[0-9]+)/${{ inputs.version }}/' lib/rack/ok/version.rb
|
|
25
|
+
bundle install
|
|
26
|
+
version: ${{ inputs.version }}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: github-label-sync
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- .github/workflows/github-label-sync.yml
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: r7kamura/github-label-sync-action@v0
|
|
16
|
+
with:
|
|
17
|
+
source_path: labels-keepachangelog.yml
|
|
18
|
+
source_repository: r7kamura/github-label-presets
|
data/.github/workflows/test.yml
CHANGED
|
@@ -2,17 +2,16 @@ on:
|
|
|
2
2
|
pull_request:
|
|
3
3
|
push:
|
|
4
4
|
branches:
|
|
5
|
-
-
|
|
5
|
+
- main
|
|
6
6
|
jobs:
|
|
7
7
|
build:
|
|
8
|
-
runs-on: ubuntu-
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
9
|
steps:
|
|
10
|
-
- uses: actions/checkout@
|
|
11
|
-
- uses:
|
|
10
|
+
- uses: actions/checkout@v6
|
|
11
|
+
- uses: ruby/setup-ruby@v1
|
|
12
12
|
with:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- run: bundle exec
|
|
16
|
-
- run: bundle exec rspec --force-color
|
|
13
|
+
bundler-cache: true
|
|
14
|
+
ruby-version: ruby
|
|
15
|
+
- run: bundle exec rake
|
|
17
16
|
|
|
18
17
|
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -5,9 +5,9 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Unreleased
|
|
9
9
|
|
|
10
|
-
## 0.1.0
|
|
10
|
+
## 0.1.0 - 2020-10-29
|
|
11
11
|
|
|
12
12
|
### Added
|
|
13
13
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rack-ok (0.1.
|
|
4
|
+
rack-ok (0.1.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
9
|
ast (2.4.1)
|
|
10
10
|
diff-lcs (1.4.4)
|
|
11
|
+
json (2.18.0)
|
|
12
|
+
language_server-protocol (3.17.0.5)
|
|
13
|
+
lint_roller (1.1.0)
|
|
11
14
|
parallel (1.19.2)
|
|
12
|
-
parser (
|
|
15
|
+
parser (3.3.10.0)
|
|
13
16
|
ast (~> 2.4.1)
|
|
17
|
+
racc
|
|
18
|
+
prism (1.7.0)
|
|
19
|
+
racc (1.8.1)
|
|
14
20
|
rack (2.2.3)
|
|
15
21
|
rack-test (1.1.0)
|
|
16
22
|
rack (>= 1.0, < 3)
|
|
17
23
|
rainbow (3.0.0)
|
|
18
|
-
rake (
|
|
19
|
-
regexp_parser (
|
|
20
|
-
rexml (3.2.4)
|
|
24
|
+
rake (13.3.1)
|
|
25
|
+
regexp_parser (2.11.3)
|
|
21
26
|
rspec (3.9.0)
|
|
22
27
|
rspec-core (~> 3.9.0)
|
|
23
28
|
rspec-expectations (~> 3.9.0)
|
|
@@ -31,19 +36,24 @@ GEM
|
|
|
31
36
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
32
37
|
rspec-support (~> 3.9.0)
|
|
33
38
|
rspec-support (3.9.4)
|
|
34
|
-
rubocop (1.
|
|
39
|
+
rubocop (1.82.0)
|
|
40
|
+
json (~> 2.3)
|
|
41
|
+
language_server-protocol (~> 3.17.0.2)
|
|
42
|
+
lint_roller (~> 1.1.0)
|
|
35
43
|
parallel (~> 1.10)
|
|
36
|
-
parser (>=
|
|
44
|
+
parser (>= 3.3.0.2)
|
|
37
45
|
rainbow (>= 2.2.2, < 4.0)
|
|
38
|
-
regexp_parser (>=
|
|
39
|
-
|
|
40
|
-
rubocop-ast (>= 0.6.0)
|
|
46
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
47
|
+
rubocop-ast (>= 1.48.0, < 2.0)
|
|
41
48
|
ruby-progressbar (~> 1.7)
|
|
42
|
-
unicode-display_width (>=
|
|
43
|
-
rubocop-ast (1.
|
|
44
|
-
parser (>=
|
|
49
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
50
|
+
rubocop-ast (1.48.0)
|
|
51
|
+
parser (>= 3.3.7.2)
|
|
52
|
+
prism (~> 1.4)
|
|
45
53
|
ruby-progressbar (1.10.1)
|
|
46
|
-
unicode-display_width (
|
|
54
|
+
unicode-display_width (3.2.0)
|
|
55
|
+
unicode-emoji (~> 4.1)
|
|
56
|
+
unicode-emoji (4.2.0)
|
|
47
57
|
|
|
48
58
|
PLATFORMS
|
|
49
59
|
ruby
|
|
@@ -51,9 +61,9 @@ PLATFORMS
|
|
|
51
61
|
DEPENDENCIES
|
|
52
62
|
rack-ok!
|
|
53
63
|
rack-test
|
|
54
|
-
rake
|
|
64
|
+
rake
|
|
55
65
|
rspec (~> 3.0)
|
|
56
66
|
rubocop
|
|
57
67
|
|
|
58
68
|
BUNDLED WITH
|
|
59
|
-
2.
|
|
69
|
+
2.6.9
|
data/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Rack::Ok
|
|
2
2
|
|
|
3
|
-
[](https://github.com/r7kamura/rack-ok/actions?query=workflow%3A.github%2Fworkflows%2Ftest.yml)
|
|
4
|
-
|
|
5
3
|
Rack middleware to return OK.
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
@@ -26,14 +24,14 @@ gem install rack-ok
|
|
|
26
24
|
|
|
27
25
|
## Usage
|
|
28
26
|
|
|
29
|
-
Insert `Rack::Ok` to your rack middleware, and the app will respond to `GET /health` with 200 OK.
|
|
27
|
+
Insert `Rack::Ok` to your rack middleware stack, and the app will respond to `GET /health` with 200 OK.
|
|
30
28
|
|
|
31
29
|
### For Rails
|
|
32
30
|
|
|
33
31
|
Insert this before at least ActionDispatch::SSL (enabled by config.force_ssl) to prevent request from being redirected.
|
|
34
32
|
|
|
35
33
|
```ruby
|
|
36
|
-
# config/initializers/
|
|
34
|
+
# config/initializers/health_check.rb
|
|
37
35
|
Rails.configuration.middleware.insert(0, Rack::Ok)
|
|
38
36
|
```
|
|
39
37
|
|
data/Rakefile
CHANGED
data/lib/rack/ok/version.rb
CHANGED
data/lib/rack/ok.rb
CHANGED
|
@@ -26,10 +26,10 @@ module Rack
|
|
|
26
26
|
def call(env)
|
|
27
27
|
if env['PATH_INFO'] == @path
|
|
28
28
|
[
|
|
29
|
-
|
|
29
|
+
200,
|
|
30
30
|
{
|
|
31
|
-
'
|
|
32
|
-
'
|
|
31
|
+
'content-length' => @body.bytesize.to_s,
|
|
32
|
+
'content-type' => 'text/plain'
|
|
33
33
|
},
|
|
34
34
|
[@body]
|
|
35
35
|
]
|
data/rack-ok.gemspec
CHANGED
|
@@ -15,7 +15,8 @@ Gem::Specification.new do |spec|
|
|
|
15
15
|
|
|
16
16
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
17
17
|
spec.metadata['source_code_uri'] = spec.homepage
|
|
18
|
-
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/
|
|
18
|
+
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
|
19
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
19
20
|
|
|
20
21
|
# Specify which files should be added to the gem when it is released.
|
|
21
22
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rack-ok
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryo Nakamura
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
|
-
description:
|
|
14
12
|
email:
|
|
15
13
|
- r7kamura@gmail.com
|
|
16
14
|
executables: []
|
|
17
15
|
extensions: []
|
|
18
16
|
extra_rdoc_files: []
|
|
19
17
|
files:
|
|
18
|
+
- ".github/release.yml"
|
|
19
|
+
- ".github/workflows/bump-request.yml"
|
|
20
|
+
- ".github/workflows/github-label-sync.yml"
|
|
21
|
+
- ".github/workflows/release.yml"
|
|
20
22
|
- ".github/workflows/test.yml"
|
|
21
23
|
- ".gitignore"
|
|
22
24
|
- ".rspec"
|
|
23
25
|
- ".rubocop.yml"
|
|
24
|
-
- ".travis.yml"
|
|
25
26
|
- CHANGELOG.md
|
|
26
27
|
- Gemfile
|
|
27
28
|
- Gemfile.lock
|
|
@@ -39,8 +40,8 @@ licenses:
|
|
|
39
40
|
metadata:
|
|
40
41
|
homepage_uri: https://github.com/r7kamura/rack-ok
|
|
41
42
|
source_code_uri: https://github.com/r7kamura/rack-ok
|
|
42
|
-
changelog_uri: https://github.com/r7kamura/rack-ok/blob/
|
|
43
|
-
|
|
43
|
+
changelog_uri: https://github.com/r7kamura/rack-ok/blob/main/CHANGELOG.md
|
|
44
|
+
rubygems_mfa_required: 'true'
|
|
44
45
|
rdoc_options: []
|
|
45
46
|
require_paths:
|
|
46
47
|
- lib
|
|
@@ -55,8 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
55
56
|
- !ruby/object:Gem::Version
|
|
56
57
|
version: '0'
|
|
57
58
|
requirements: []
|
|
58
|
-
rubygems_version: 3.
|
|
59
|
-
signing_key:
|
|
59
|
+
rubygems_version: 3.6.9
|
|
60
60
|
specification_version: 4
|
|
61
61
|
summary: Rack middleware to return OK.
|
|
62
62
|
test_files: []
|