rack-ok 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 186f17bd5884836db3154ad685eb15daeb1ba76c2ffc79b387c99ca6b98a6883
4
- data.tar.gz: 5b5cde7d8f1017d14eab7d1fea9c122929bf6c8bfdb14b4eba03e28e53f768fe
3
+ metadata.gz: e834bd2ccd6b32ec1c37811e2287f62bfba0557390c82fa559bd9a87905fb84e
4
+ data.tar.gz: ac3d134939500bdbe7d042f7a8f2d801853a4754f7fed744db867e30d4c1bf51
5
5
  SHA512:
6
- metadata.gz: 25073bc85b845eced7291a4964c79029659737650f7aa1a6eb84c63cd6d2076e2487e3ec9cba7ba6b3d2310a7f8b146aa5e5df9dc04fd44b8ead99ba3e26be86
7
- data.tar.gz: 240bdfd4ae10450fa4d4ae131637e760f55ac3f7ece37daeeea0e22938a5fbc87c8a35cd07aec198fa10641a9e8c8ef73c12b4a9db7bc7f313308198f0c7af3f
6
+ metadata.gz: a9214d2d16031bd055e27e66260cf6476e525b95c7d4481f0c248b3a647a298fc312136eec41c07665e31b4d7ed79bdd736adcdd353f2773c1acd3f377754c8d
7
+ data.tar.gz: aa19349a6c32d75c4962c6e336b1e220d7faeab47b36a5f2c9a22f0f81c794031836e2483387d8734b35aad24eff2abbb81510b8d2888a18e09acddd754bbba9
@@ -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,57 @@
1
+ # This file is machine-generated by `gh actions-lock`.
2
+ # Do not edit by hand; run `gh actions-lock` to update.
3
+ # Docs: https://gh.io/actions-lockfile
4
+ version: 'v0.0.3'
5
+ workflows:
6
+ '.github/workflows/bump-request.yml':
7
+ - 'actions/checkout@v7.0.1'
8
+ - 'r7kamura/bump-request@v0.7.1'
9
+ - 'ruby/setup-ruby@v1.336.0'
10
+ '.github/workflows/github-label-sync.yml':
11
+ - 'r7kamura/github-label-sync-action@v0.1.0'
12
+ '.github/workflows/release.yml': []
13
+ '.github/workflows/test.yml':
14
+ - 'actions/checkout@v7.0.1'
15
+ - 'ruby/setup-ruby@v1.336.0'
16
+ dependencies:
17
+ 'actions/checkout@v3':
18
+ ref: 'v3'
19
+ commit: 'sha1-a37ce9120846195fa4ece8f58b268e6043cb2f26'
20
+ owner_id: 44036562
21
+ repo_id: 197814629
22
+ 'actions/checkout@v7.0.1':
23
+ ref: 'v7.0.1'
24
+ commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
25
+ owner_id: 44036562
26
+ repo_id: 197814629
27
+ 'actions/setup-node@v3':
28
+ ref: 'v3'
29
+ commit: 'sha1-3235b876344d2a9aa001b8d1453c930bba69e610'
30
+ owner_id: 44036562
31
+ repo_id: 189476904
32
+ 'actions/setup-node@v7.1.0':
33
+ ref: 'v7.1.0'
34
+ commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1'
35
+ owner_id: 44036562
36
+ repo_id: 189476904
37
+ 'r7kamura/bump-request@v0.7.1':
38
+ ref: 'v0.7.1'
39
+ commit: 'sha1-b27937188d404bc0c2fd442403e6de1d20f9b349'
40
+ owner_id: 111689
41
+ repo_id: 533135195
42
+ uses:
43
+ - 'actions/checkout@v7.0.1'
44
+ - 'actions/setup-node@v7.1.0'
45
+ 'r7kamura/github-label-sync-action@v0.1.0':
46
+ ref: 'v0.1.0'
47
+ commit: 'sha1-061649dd3b80eb5bafad0316466f72962e62c300'
48
+ owner_id: 111689
49
+ repo_id: 514711932
50
+ uses:
51
+ - 'actions/checkout@v3'
52
+ - 'actions/setup-node@v3'
53
+ 'ruby/setup-ruby@v1.336.0':
54
+ ref: 'v1.336.0'
55
+ commit: 'sha1-de492cf36cbab201753d720ce4f4e336cd688c94'
56
+ owner_id: 210414
57
+ repo_id: 231208785
@@ -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@v7.0.1
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1.336.0
18
+ with:
19
+ ruby-version: 3.3
20
+ bundler-cache: true
21
+ - uses: r7kamura/bump-request@v0.7.1
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.1.0
16
+ with:
17
+ source_path: labels-keepachangelog.yml
18
+ source_repository: r7kamura/github-label-presets
@@ -0,0 +1,11 @@
1
+ name: release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ release:
10
+ uses: r7kamura/workflows/.github/workflows/gem-release.yml@main
11
+ if: github.repository_owner == 'r7kamura'
@@ -1,18 +1,23 @@
1
+ name: test
2
+
1
3
  on:
2
- pull_request:
3
4
  push:
4
5
  branches:
5
- - master
6
+ - main
7
+ pull_request:
8
+
6
9
  jobs:
7
10
  build:
8
- runs-on: ubuntu-18.04
11
+ runs-on: ubuntu-latest
12
+ name: Ruby ${{ matrix.ruby }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ ruby: ['3.3', '3.4', '4.0']
9
17
  steps:
10
- - uses: actions/checkout@v2
11
- - uses: actions/setup-ruby@v1
18
+ - uses: actions/checkout@v7.0.1
19
+ - uses: ruby/setup-ruby@v1.336.0
12
20
  with:
13
- ruby-version: '2.7.2'
14
- - run: bundle install --jobs=$(($(nproc) - 1)) --retry=3
15
- - run: bundle exec rubocop --color --parallel
16
- - run: bundle exec rspec --force-color
17
-
18
-
21
+ bundler-cache: true
22
+ ruby-version: ${{ matrix.ruby }}
23
+ - run: bundle exec rake
data/.rubocop.yml CHANGED
@@ -1,3 +1,6 @@
1
+ AllCops:
2
+ NewCops: enable
3
+
1
4
  Metrics:
2
5
  Enabled: false
3
6
 
data/Gemfile CHANGED
@@ -6,6 +6,6 @@ source 'https://rubygems.org'
6
6
  gemspec
7
7
 
8
8
  gem 'rack-test'
9
- gem 'rake', '~> 12.0'
9
+ gem 'rake'
10
10
  gem 'rspec', '~> 3.0'
11
11
  gem 'rubocop'
data/Gemfile.lock CHANGED
@@ -1,23 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-ok (0.1.0)
4
+ rack-ok (0.2.0)
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 (2.7.2.0)
15
+ parser (3.3.10.0)
13
16
  ast (~> 2.4.1)
14
- rack (2.2.3)
15
- rack-test (1.1.0)
16
- rack (>= 1.0, < 3)
17
+ racc
18
+ prism (1.7.0)
19
+ racc (1.8.1)
20
+ rack (3.2.8)
21
+ rack-test (2.3.0)
22
+ rack (>= 1.3)
17
23
  rainbow (3.0.0)
18
- rake (12.3.3)
19
- regexp_parser (1.8.2)
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.0.0)
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 (>= 2.7.1.5)
44
+ parser (>= 3.3.0.2)
37
45
  rainbow (>= 2.2.2, < 4.0)
38
- regexp_parser (>= 1.8)
39
- rexml
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 (>= 1.4.0, < 2.0)
43
- rubocop-ast (1.1.0)
44
- parser (>= 2.7.1.5)
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 (1.7.0)
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 (~> 12.0)
64
+ rake
55
65
  rspec (~> 3.0)
56
66
  rubocop
57
67
 
58
68
  BUNDLED WITH
59
- 2.1.4
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/workflows/.github/workflows/test.yml/badge.svg)](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/ok.rb
34
+ # config/initializers/health_check.rb
37
35
  Rails.configuration.middleware.insert(0, Rack::Ok)
38
36
  ```
39
37
 
data/Rakefile CHANGED
@@ -5,4 +5,8 @@ require 'rspec/core/rake_task'
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
- task default: :spec
8
+ require 'rubocop/rake_task'
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rack
4
4
  class Ok
5
- VERSION = '0.1.0'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
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
- '200',
29
+ 200,
30
30
  {
31
- 'Content-Length' => @body.bytesize.to_s,
32
- 'Content-Type' => 'text/plain'
31
+ 'content-length' => @body.bytesize.to_s,
32
+ 'content-type' => 'text/plain'
33
33
  },
34
34
  [@body]
35
35
  ]
data/rack-ok.gemspec CHANGED
@@ -11,11 +11,12 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = 'Rack middleware to return OK.'
12
12
  spec.homepage = 'https://github.com/r7kamura/rack-ok'
13
13
  spec.license = 'MIT'
14
- spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
14
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.3')
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/master/CHANGELOG.md"
18
+ spec.metadata['changelog_uri'] = "#{spec.homepage}/releases"
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,28 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-ok
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2020-10-29 00:00:00.000000000 Z
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/actions.lock"
20
+ - ".github/workflows/bump-request.yml"
21
+ - ".github/workflows/github-label-sync.yml"
22
+ - ".github/workflows/release.yml"
20
23
  - ".github/workflows/test.yml"
21
24
  - ".gitignore"
22
25
  - ".rspec"
23
26
  - ".rubocop.yml"
24
- - ".travis.yml"
25
- - CHANGELOG.md
26
27
  - Gemfile
27
28
  - Gemfile.lock
28
29
  - LICENSE.txt
@@ -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/master/CHANGELOG.md
43
- post_install_message:
43
+ changelog_uri: https://github.com/r7kamura/rack-ok/releases
44
+ rubygems_mfa_required: 'true'
44
45
  rdoc_options: []
45
46
  require_paths:
46
47
  - lib
@@ -48,15 +49,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
48
49
  requirements:
49
50
  - - ">="
50
51
  - !ruby/object:Gem::Version
51
- version: 2.4.0
52
+ version: '3.3'
52
53
  required_rubygems_version: !ruby/object:Gem::Requirement
53
54
  requirements:
54
55
  - - ">="
55
56
  - !ruby/object:Gem::Version
56
57
  version: '0'
57
58
  requirements: []
58
- rubygems_version: 3.1.2
59
- signing_key:
59
+ rubygems_version: 4.0.20
60
60
  specification_version: 4
61
61
  summary: Rack middleware to return OK.
62
62
  test_files: []
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.7.1
6
- before_install: gem install bundler -v 2.1.4
data/CHANGELOG.md DELETED
@@ -1,14 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [Unreleased]
9
-
10
- ## 0.1.0
11
-
12
- ### Added
13
-
14
- - Add Rack::Ok.