puma-metrics 1.2.0 → 1.2.1

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: e6bfb3829a8b3f020867676ad2d06696602f9b3e9cdba9677c9d0cd96516d952
4
- data.tar.gz: 9b22b853444c9f8eb9945582e6debd9676c0ac83487178fe056840c8cb438b96
3
+ metadata.gz: 7c27f15c1dd3aff32b53bfa540b7ba9b8f8f2d019e3142caf1eac4e80c451f69
4
+ data.tar.gz: 5cd3ea68ac8bf3c641c7d235a75425b9fa7c701c4b65f6b39a68a5a4dc71c293
5
5
  SHA512:
6
- metadata.gz: 79d9e90b3dc95a9508622a6142a044dd682b072dcfd3971a2bfa06b5651ba414b2dd1667be0896779ae9a08be677d9607db2e0f6e3ba2f7417581c59e4be0b37
7
- data.tar.gz: 38a134598cb7f50faded591f745832423aedcc9b4c7589a796ff25a67479104348675bc2e6dea82e2f08b440ba54616fc1d81951038aa6a6195cd922d84313e7
6
+ metadata.gz: b413c77b97c65017fe216e5b55d73671c13b8fa5b8d94a11e9d7514d0828b0d3f61c489f7d185d225e44048d1001ed0cf58f0e108b86bef7f3ff5c0ec0064a62
7
+ data.tar.gz: 2c496212669c58fbcdc90688e8c852dba1375bd89a956466ca8c882addffaaa1613fadc3632dd2e42b3cf7ce9240a6147366482774fe8a7a1fdfda41b10844c2
@@ -19,7 +19,7 @@ jobs:
19
19
  run: bundle exec overcommit --run
20
20
  strategy:
21
21
  matrix:
22
- ruby: ['2.5', '2.5', '2.7']
22
+ ruby: ['2.6', '2.7', '3.0']
23
23
  deploy:
24
24
  if: github.ref == 'refs/heads/master'
25
25
  name: to rubygems
@@ -29,7 +29,7 @@ jobs:
29
29
  - uses: actions/checkout@master
30
30
  - uses: actions/setup-ruby@master
31
31
  with:
32
- ruby-version: 2.7
32
+ ruby-version: 3.0
33
33
  - env:
34
34
  RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
35
35
  run: |
data/.rubocop.yml CHANGED
@@ -5,16 +5,17 @@ Naming/FileName:
5
5
  Exclude:
6
6
  - puma-metrics.gemspec
7
7
 
8
- Metrics/LineLength:
8
+ Layout/LineLength:
9
9
  Max: 120
10
10
 
11
+ Lint/MissingSuper:
12
+ Exclude:
13
+ - lib/puma/metrics/parser.rb
14
+
11
15
  Style/Documentation:
12
16
  Enabled: false
13
17
  Style/NumericPredicate:
14
18
  Enabled: false
15
- Style/MethodMissingSuper:
16
- Exclude:
17
- - lib/puma/metrics/parser.rb
18
19
  Style/MissingRespondToMissing:
19
20
  Exclude:
20
21
  - lib/puma/metrics/parser.rb
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.2.1
6
+
7
+ Changes:
8
+ - Drop support for ruby 2.5
9
+
10
+ Housekeeping:
11
+ - Update dependencies
12
+ - Updates for Puma 5
13
+
5
14
  ## 1.2.0
6
15
 
7
16
  Changes:
data/Gemfile.lock CHANGED
@@ -8,37 +8,37 @@ PATH
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- ast (2.4.1)
12
- childprocess (3.0.0)
11
+ ast (2.4.2)
12
+ childprocess (4.0.0)
13
13
  iniparse (1.5.0)
14
- minitest (5.14.1)
15
- nio4r (2.5.2)
16
- overcommit (0.53.0)
17
- childprocess (>= 0.6.3, < 4)
14
+ minitest (5.14.3)
15
+ nio4r (2.5.5)
16
+ overcommit (0.57.0)
17
+ childprocess (>= 0.6.3, < 5)
18
18
  iniparse (~> 1.4)
19
- parallel (1.19.1)
20
- parser (2.7.1.3)
21
- ast (~> 2.4.0)
22
- prometheus-client (2.0.0)
23
- puma (4.3.5)
19
+ parallel (1.20.1)
20
+ parser (3.0.0.0)
21
+ ast (~> 2.4.1)
22
+ prometheus-client (2.1.0)
23
+ puma (5.2.1)
24
24
  nio4r (~> 2.0)
25
25
  rainbow (3.0.0)
26
- rake (13.0.1)
27
- regexp_parser (1.7.1)
26
+ rake (13.0.3)
27
+ regexp_parser (2.0.3)
28
28
  rexml (3.2.4)
29
- rubocop (0.85.1)
29
+ rubocop (1.10.0)
30
30
  parallel (~> 1.10)
31
- parser (>= 2.7.0.1)
31
+ parser (>= 3.0.0.0)
32
32
  rainbow (>= 2.2.2, < 4.0)
33
- regexp_parser (>= 1.7)
33
+ regexp_parser (>= 1.8, < 3.0)
34
34
  rexml
35
- rubocop-ast (>= 0.0.3)
35
+ rubocop-ast (>= 1.2.0, < 2.0)
36
36
  ruby-progressbar (~> 1.7)
37
- unicode-display_width (>= 1.4.0, < 2.0)
38
- rubocop-ast (0.0.3)
39
- parser (>= 2.7.0.1)
40
- ruby-progressbar (1.10.1)
41
- unicode-display_width (1.7.0)
37
+ unicode-display_width (>= 1.4.0, < 3.0)
38
+ rubocop-ast (1.4.1)
39
+ parser (>= 2.7.1.5)
40
+ ruby-progressbar (1.11.0)
41
+ unicode-display_width (2.0.0)
42
42
 
43
43
  PLATFORMS
44
44
  ruby
@@ -52,4 +52,4 @@ DEPENDENCIES
52
52
  rubocop
53
53
 
54
54
  BUNDLED WITH
55
- 2.1.2
55
+ 2.2.3
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ task :server do
13
13
  require 'puma'
14
14
  require 'puma/configuration'
15
15
  require 'puma/events'
16
- require 'puma/plugin/metrics.rb'
16
+ require 'puma/plugin/metrics'
17
17
 
18
18
  configuration = Puma::Configuration.new do |config|
19
19
  config.bind 'tcp://127.0.0.1:0'
@@ -25,7 +25,7 @@ task :server do
25
25
  end
26
26
  end
27
27
 
28
- events = Puma::Events.new STDOUT, STDERR
28
+ events = Puma::Events.new $stdout, $stderr
29
29
  launcher = Puma::Launcher.new(configuration, events: events)
30
30
  launcher.run
31
31
  end
@@ -10,7 +10,7 @@ module Puma
10
10
  def initialize(launcher)
11
11
  @launcher = launcher
12
12
  clustered = (@launcher.options[:workers] || 0) > 0
13
- @parser = Parser.new clustered
13
+ @parser = Parser.new(clustered: clustered)
14
14
  end
15
15
 
16
16
  def call(_env)
@@ -5,7 +5,7 @@ require 'prometheus/client'
5
5
  module Puma
6
6
  module Metrics
7
7
  class Parser
8
- def initialize(clustered = false)
8
+ def initialize(clustered: false)
9
9
  register_default_metrics
10
10
  register_clustered_metrics if clustered
11
11
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Puma
4
4
  module Metrics
5
- VERSION = '1.2.0'
5
+ VERSION = '1.2.1'
6
6
  end
7
7
  end
@@ -26,7 +26,9 @@ Puma::Plugin.create do
26
26
 
27
27
  launcher.events.register(:state) do |state|
28
28
  if %i[halt restart stop].include?(state)
29
+ # rubocop:disable Style/SoleNestedConditional
29
30
  metrics.stop(true) unless metrics.shutting_down?
31
+ # rubocop:enable Style/SoleNestedConditional
30
32
  end
31
33
  end
32
34
 
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.required_ruby_version = '>= 2.6'
21
+
20
22
  spec.add_runtime_dependency 'prometheus-client', '>= 0.10'
21
23
  spec.add_runtime_dependency 'puma', '>= 3.0'
22
24
 
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.0
4
+ version: 1.2.1
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: 2020-06-15 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prometheus-client
@@ -142,14 +142,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: '2.6'
146
146
  required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  requirements:
148
148
  - - ">="
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  requirements: []
152
- rubygems_version: 3.1.2
152
+ rubygems_version: 3.2.3
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Puma plugin to export puma stats as prometheus metrics