puma-metrics 1.2.2 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 228a88de3862f938b3dc0c4e0c63ee42d88ab61a2fee230c5071824750a830a6
4
- data.tar.gz: e35f415d1e4117f9258d185b112262dbf804da50f0b5f889aa754a2440e032c8
3
+ metadata.gz: 2d94599f1e1f6122a9c32299fbd2de2fd78ae83a8c18dbb829dad0d7f218accc
4
+ data.tar.gz: 52225951970b80e56d434618aa2485271c8338647e6365406b0997a0f7af8f28
5
5
  SHA512:
6
- metadata.gz: 7d6391b87304cd0c7983e6b4dacbd9b7e6360e2781435aaa7b81bf5af64349400c2f5b653da2b655f77c8e4184943b44e72293ebf3abbdb81a0f39d21f237fdf
7
- data.tar.gz: 91553b2e9c235ffce3931f0bd633a07ed7e825d340e28c0413db099147868ab558d57676c49cf8d26c5ba17858ee6cdeb35bb87880499e9902113196787dce3d
6
+ metadata.gz: 9988478439070835936df32285974dcbc220f3ae66ef6806e19a225e4a768612c89064386db463ac054b592f16362055737cd5cf6c9ec4a1620120064fbf0b55
7
+ data.tar.gz: a20b275c9eea062d0a4a06b22fc0569c23a9a32ce5c6a754873d8d611e79839d9cbc41a73b11e22e0dd493c33660b0201440dd6676083952476725fab1dd018c
@@ -1,12 +1,16 @@
1
1
  name: steps
2
- on: [push]
2
+ on:
3
+ push:
4
+ branches: [main, master]
5
+ pull_request:
6
+ branches: [main, master]
3
7
  jobs:
4
8
  test:
5
9
  name: test on ruby ${{ matrix.ruby }}
6
10
  runs-on: ubuntu-latest
7
11
  steps:
8
12
  - uses: actions/checkout@master
9
- - uses: actions/setup-ruby@master
13
+ - uses: ruby/setup-ruby@master
10
14
  with:
11
15
  ruby-version: ${{ matrix.ruby }}
12
16
  - run: gem install bundler
@@ -19,17 +23,17 @@ jobs:
19
23
  run: bundle exec overcommit --run
20
24
  strategy:
21
25
  matrix:
22
- ruby: ['2.6', '2.7', '3.0']
26
+ ruby: ['2.6', '2.7', '3.0', '3.1']
23
27
  deploy:
24
- if: github.ref == 'refs/heads/master'
28
+ if: github.ref == 'refs/heads/main'
25
29
  name: to rubygems
26
30
  needs: test
27
31
  runs-on: ubuntu-latest
28
32
  steps:
29
33
  - uses: actions/checkout@master
30
- - uses: actions/setup-ruby@master
34
+ - uses: ruby/setup-ruby@master
31
35
  with:
32
- ruby-version: 3.0
36
+ ruby-version: 3.1
33
37
  - env:
34
38
  RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
35
39
  run: |
data/.rubocop.yml CHANGED
@@ -2,6 +2,9 @@ AllCops:
2
2
  NewCops: enable
3
3
  TargetRubyVersion: 2.6
4
4
 
5
+ Gemspec/RequireMFA:
6
+ Enabled: false
7
+
5
8
  Naming/FileName:
6
9
  Exclude:
7
10
  - puma-metrics.gemspec
data/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.2.5
6
+
7
+ Changes:
8
+ - Require puma 5.0 or newer as older versions don't support the `on_stopped` introduced in version puma-metrics 1.2.4.
9
+
10
+ Housekeeping:
11
+ - Update dependencies
12
+
13
+ ## 1.2.4
14
+
15
+ Changes:
16
+ - Shut down metrics server in `on_stopped` so it only stops when main puma process stops and ignores when workers are
17
+ stopped. This allows us to maintain a running metrics server when workers restart or crash.
18
+
19
+ Housekeeping:
20
+ - Update dependencies
21
+ - Test on ruby 3.1
22
+
23
+ ## 1.2.3
24
+
25
+ Housekeeping:
26
+ - Update dependencies
27
+
5
28
  ## 1.2.2
6
29
 
7
30
  Changes:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- puma-metrics (1.2.2)
4
+ puma-metrics (1.2.5)
5
5
  prometheus-client (>= 0.10)
6
6
  puma (>= 3.0)
7
7
 
@@ -9,36 +9,37 @@ GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  ast (2.4.2)
12
- childprocess (4.0.0)
12
+ childprocess (4.1.0)
13
13
  iniparse (1.5.0)
14
- minitest (5.14.3)
15
- nio4r (2.5.5)
16
- overcommit (0.57.0)
14
+ minitest (5.15.0)
15
+ nio4r (2.5.8)
16
+ overcommit (0.59.1)
17
17
  childprocess (>= 0.6.3, < 5)
18
18
  iniparse (~> 1.4)
19
- parallel (1.20.1)
20
- parser (3.0.0.0)
19
+ rexml (~> 3.2)
20
+ parallel (1.22.1)
21
+ parser (3.1.2.0)
21
22
  ast (~> 2.4.1)
22
- prometheus-client (2.1.0)
23
- puma (5.2.1)
23
+ prometheus-client (4.0.0)
24
+ puma (5.6.4)
24
25
  nio4r (~> 2.0)
25
- rainbow (3.0.0)
26
- rake (13.0.3)
27
- regexp_parser (2.0.3)
28
- rexml (3.2.4)
29
- rubocop (1.10.0)
26
+ rainbow (3.1.1)
27
+ rake (13.0.6)
28
+ regexp_parser (2.5.0)
29
+ rexml (3.2.5)
30
+ rubocop (1.30.0)
30
31
  parallel (~> 1.10)
31
- parser (>= 3.0.0.0)
32
+ parser (>= 3.1.0.0)
32
33
  rainbow (>= 2.2.2, < 4.0)
33
34
  regexp_parser (>= 1.8, < 3.0)
34
- rexml
35
- rubocop-ast (>= 1.2.0, < 2.0)
35
+ rexml (>= 3.2.5, < 4.0)
36
+ rubocop-ast (>= 1.18.0, < 2.0)
36
37
  ruby-progressbar (~> 1.7)
37
38
  unicode-display_width (>= 1.4.0, < 3.0)
38
- rubocop-ast (1.4.1)
39
- parser (>= 2.7.1.5)
39
+ rubocop-ast (1.18.0)
40
+ parser (>= 3.1.1.0)
40
41
  ruby-progressbar (1.11.0)
41
- unicode-display_width (2.0.0)
42
+ unicode-display_width (2.1.0)
42
43
 
43
44
  PLATFORMS
44
45
  ruby
@@ -52,4 +53,4 @@ DEPENDENCIES
52
53
  rubocop
53
54
 
54
55
  BUNDLED WITH
55
- 2.2.3
56
+ 2.2.15
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Puma
4
4
  module Metrics
5
- VERSION = '1.2.2'
5
+ VERSION = '1.2.5'
6
6
  end
7
7
  end
@@ -24,12 +24,8 @@ Puma::Plugin.create do
24
24
  launcher.events.error "Invalid control URI: #{str}"
25
25
  end
26
26
 
27
- launcher.events.register(:state) do |state|
28
- if %i[halt restart stop].include?(state)
29
- # rubocop:disable Style/SoleNestedConditional
30
- metrics.stop(true) unless metrics.shutting_down?
31
- # rubocop:enable Style/SoleNestedConditional
32
- end
27
+ launcher.events.on_stopped do
28
+ metrics.stop(true) unless metrics.shutting_down?
33
29
  end
34
30
 
35
31
  metrics.run
data/puma-metrics.gemspec CHANGED
@@ -17,10 +17,12 @@ Gem::Specification.new do |spec|
17
17
 
18
18
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
19
 
20
+ spec.metadata['rubygems_mfa_required'] = 'false'
21
+
20
22
  spec.required_ruby_version = '>= 2.6'
21
23
 
22
24
  spec.add_runtime_dependency 'prometheus-client', '>= 0.10'
23
- spec.add_runtime_dependency 'puma', '>= 3.0'
25
+ spec.add_runtime_dependency 'puma', '>= 5.0'
24
26
 
25
27
  spec.add_development_dependency 'bundler'
26
28
  spec.add_development_dependency 'minitest'
data/renovate.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": [
3
+ "config:base"
4
+ ]
5
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harm-Jan Blok
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-17 00:00:00.000000000 Z
11
+ date: 2022-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prometheus-client
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '5.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: '5.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -130,10 +130,12 @@ files:
130
130
  - lib/puma/metrics/version.rb
131
131
  - lib/puma/plugin/metrics.rb
132
132
  - puma-metrics.gemspec
133
+ - renovate.json
133
134
  homepage: https://github.com/harmjanblok/puma-metrics
134
135
  licenses:
135
136
  - MIT
136
- metadata: {}
137
+ metadata:
138
+ rubygems_mfa_required: 'false'
137
139
  post_install_message:
138
140
  rdoc_options: []
139
141
  require_paths:
@@ -149,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
151
  - !ruby/object:Gem::Version
150
152
  version: '0'
151
153
  requirements: []
152
- rubygems_version: 3.2.3
154
+ rubygems_version: 3.3.7
153
155
  signing_key:
154
156
  specification_version: 4
155
157
  summary: Puma plugin to export puma stats as prometheus metrics