puma-metrics 1.2.3 → 1.2.4

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: 6fb1638f837f58cc7271c53a1e90edbd39fbf377ea91ef82998f022b17e2131c
4
- data.tar.gz: 79ebbb921b0f216a2e6109bc528970fc75a7d96e30e168558c19f3c99f4f28c9
3
+ metadata.gz: ca04f9fbdb4d46c6d48039194b6df316412399347e295baa0b7ffa6d58fbf70e
4
+ data.tar.gz: 169662435570a490c711292deff5f9ae6d475a5a9cb6fd90945949e47ace16b9
5
5
  SHA512:
6
- metadata.gz: cd3859499c8aa7e330dd709c23c44c94d64e72cb6d757a41400158f1762c510e023538b891572748129a495bacf84934e98c565ac5a4ad216485f42e06451168
7
- data.tar.gz: b1bf8d06cbb8b0d2770e49694b2c9e03d875c43b3040a3a7f8dd5788def3bca0759313d59f24836b9ab0acd4534dc33c4c468d3eefc1e9b57eedd6af7ae5d263
6
+ metadata.gz: e1f361d5271ae1906dcf4c9235522b2059716ccce8317bece35de23c7ca41aa68eac9cfeb1af2c0148a386d09e8841b02a0b3f93a9837138cea6d77b62404b38
7
+ data.tar.gz: 0ee3cce82e4482b9ab79cef06ecec083314e50456138949afb7faa464735a68968943f281d45c38a585f7cbda3ff9612aa10c31e0f1b4e3dc434f4eefecc86fe
@@ -6,7 +6,7 @@ jobs:
6
6
  runs-on: ubuntu-latest
7
7
  steps:
8
8
  - uses: actions/checkout@master
9
- - uses: actions/setup-ruby@master
9
+ - uses: ruby/setup-ruby@master
10
10
  with:
11
11
  ruby-version: ${{ matrix.ruby }}
12
12
  - run: gem install bundler
@@ -19,7 +19,7 @@ jobs:
19
19
  run: bundle exec overcommit --run
20
20
  strategy:
21
21
  matrix:
22
- ruby: ['2.6', '2.7', '3.0']
22
+ ruby: ['2.6', '2.7', '3.0', '3.1']
23
23
  deploy:
24
24
  if: github.ref == 'refs/heads/master'
25
25
  name: to rubygems
@@ -27,9 +27,9 @@ jobs:
27
27
  runs-on: ubuntu-latest
28
28
  steps:
29
29
  - uses: actions/checkout@master
30
- - uses: actions/setup-ruby@master
30
+ - uses: ruby/setup-ruby@master
31
31
  with:
32
- ruby-version: 3.0
32
+ ruby-version: 3.1
33
33
  - env:
34
34
  RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
35
35
  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,16 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.2.4
6
+
7
+ Changes:
8
+ - Shut down metrics server in `on_stopped` so it only stops when main puma process stops and ignores when workers are
9
+ stopped. This allows us to maintain a running metrics server when workers restart or crash.
10
+
11
+ Housekeeping:
12
+ - Update dependencies
13
+ - Test on ruby 3.1
14
+
5
15
  ## 1.2.3
6
16
 
7
17
  Housekeeping:
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.3)
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.4)
15
- nio4r (2.5.7)
16
- overcommit (0.57.0)
14
+ minitest (5.15.0)
15
+ nio4r (2.5.8)
16
+ overcommit (0.58.0)
17
17
  childprocess (>= 0.6.3, < 5)
18
18
  iniparse (~> 1.4)
19
- parallel (1.20.1)
20
- parser (3.0.1.1)
19
+ rexml (~> 3.2)
20
+ parallel (1.21.0)
21
+ parser (3.1.1.0)
21
22
  ast (~> 2.4.1)
22
- prometheus-client (2.1.0)
23
- puma (5.3.1)
23
+ prometheus-client (3.0.0)
24
+ puma (5.6.2)
24
25
  nio4r (~> 2.0)
25
- rainbow (3.0.0)
26
- rake (13.0.3)
27
- regexp_parser (2.1.1)
26
+ rainbow (3.1.1)
27
+ rake (13.0.6)
28
+ regexp_parser (2.2.1)
28
29
  rexml (3.2.5)
29
- rubocop (1.15.0)
30
+ rubocop (1.25.1)
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
35
  rexml
35
- rubocop-ast (>= 1.5.0, < 2.0)
36
+ rubocop-ast (>= 1.15.1, < 2.0)
36
37
  ruby-progressbar (~> 1.7)
37
38
  unicode-display_width (>= 1.4.0, < 3.0)
38
- rubocop-ast (1.5.0)
39
- parser (>= 3.0.1.1)
39
+ rubocop-ast (1.16.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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Puma
4
4
  module Metrics
5
- VERSION = '1.2.3'
5
+ VERSION = '1.2.4'
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,6 +17,8 @@ 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'
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.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harm-Jan Blok
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-20 00:00:00.000000000 Z
11
+ date: 2022-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prometheus-client
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: Puma plugin to export puma stats as prometheus metrics
112
- email:
112
+ email:
113
113
  executables: []
114
114
  extensions: []
115
115
  extra_rdoc_files: []
@@ -133,8 +133,9 @@ files:
133
133
  homepage: https://github.com/harmjanblok/puma-metrics
134
134
  licenses:
135
135
  - MIT
136
- metadata: {}
137
- post_install_message:
136
+ metadata:
137
+ rubygems_mfa_required: 'false'
138
+ post_install_message:
138
139
  rdoc_options: []
139
140
  require_paths:
140
141
  - lib
@@ -149,8 +150,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
150
  - !ruby/object:Gem::Version
150
151
  version: '0'
151
152
  requirements: []
152
- rubygems_version: 3.2.15
153
- signing_key:
153
+ rubygems_version: 3.3.3
154
+ signing_key:
154
155
  specification_version: 4
155
156
  summary: Puma plugin to export puma stats as prometheus metrics
156
157
  test_files: []