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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 186f17bd5884836db3154ad685eb15daeb1ba76c2ffc79b387c99ca6b98a6883
4
- data.tar.gz: 5b5cde7d8f1017d14eab7d1fea9c122929bf6c8bfdb14b4eba03e28e53f768fe
3
+ metadata.gz: f527f59befbc06298ae85c3f88311c11347f14c9a0c62b7d5f2cdf030f6b9bf5
4
+ data.tar.gz: 8d0cb69ac415b3ff35103116cffe6525ec96715b4e75313f29686eb1b71c46a1
5
5
  SHA512:
6
- metadata.gz: 25073bc85b845eced7291a4964c79029659737650f7aa1a6eb84c63cd6d2076e2487e3ec9cba7ba6b3d2310a7f8b146aa5e5df9dc04fd44b8ead99ba3e26be86
7
- data.tar.gz: 240bdfd4ae10450fa4d4ae131637e760f55ac3f7ece37daeeea0e22938a5fbc87c8a35cd07aec198fa10641a9e8c8ef73c12b4a9db7bc7f313308198f0c7af3f
6
+ metadata.gz: bbc5856dac73ba1127f1df19dafb06b48a203ca1deb58b0014df26c855f6df74a406ffb701fd980bda07282c9ea4a763e8c682a9328bbb110882e5209f8a246f
7
+ data.tar.gz: 50e061b10e3714d6838a81b92e55327f96efb81957a271ebde2aeda160253821f95003b07f9833656099feeef407a1cdc5c7e6e31a7dd2429eb5385a7c182bad
@@ -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
@@ -0,0 +1,12 @@
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
+ secrets:
12
+ rubygems-org-api-key: ${{ secrets.RUBYGEMS_ORG_API_KEY }}
@@ -2,17 +2,16 @@ on:
2
2
  pull_request:
3
3
  push:
4
4
  branches:
5
- - master
5
+ - main
6
6
  jobs:
7
7
  build:
8
- runs-on: ubuntu-18.04
8
+ runs-on: ubuntu-latest
9
9
  steps:
10
- - uses: actions/checkout@v2
11
- - uses: actions/setup-ruby@v1
10
+ - uses: actions/checkout@v6
11
+ - uses: ruby/setup-ruby@v1
12
12
  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
13
+ bundler-cache: true
14
+ ruby-version: ruby
15
+ - run: bundle exec rake
17
16
 
18
17
 
data/.rubocop.yml CHANGED
@@ -1,3 +1,6 @@
1
+ AllCops:
2
+ NewCops: enable
3
+
1
4
  Metrics:
2
5
  Enabled: false
3
6
 
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
- ## [Unreleased]
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
@@ -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.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 (2.7.2.0)
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 (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.1.1'
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
@@ -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/master/CHANGELOG.md"
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.0
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: 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/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/master/CHANGELOG.md
43
- post_install_message:
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.1.2
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: []
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