puma-stats 1.0.0 → 1.0.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
  SHA1:
3
- metadata.gz: 5f396129e8be9e85b76570d975528664a442288b
4
- data.tar.gz: 9d9bd1a156559b8e13d59936c22b51928f42eb67
3
+ metadata.gz: ee7f0f011d907dc00f011228d6d032c4d41583ed
4
+ data.tar.gz: 169666bccca9fa99a691412fa8beaf7327e340a4
5
5
  SHA512:
6
- metadata.gz: 7a234756a43d6b54f8edc3f547f837cef073c3ebd33590ef50d2cf8bb2c5ba9373a84de5872aac7256438ee915c1c0d67d6676627aba6bf50f47216870e075c5
7
- data.tar.gz: 482236a96b8589e23404aa0367f4dcd58f89ad76e76a065f98d4bb4d3ca1bad18ceb3995b3fec57ecb1d0befa65d480cf379145ca4ba38af97c87497eadd825c
6
+ metadata.gz: d473dec215fd7e4cde705383c305d5c81cdb6da06610d94d8abf870bed42ce8aedd00f4dccfb0a3a6602c24432c34c45b17a1da33c8afbca66ccf4574602b073
7
+ data.tar.gz: e33b6e2c536341080dd558ceb14d8978b549cfd48ca1b4237290d28b8a085db7c72c25cfe35ec1e08d3753de81d7d4ae786891b90e4b6611d64e618abcb1fe74
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.1
4
+
5
+ Copy the `MiniSSL::ContextBuilder` class from [PR #2046](https://github.com/puma/puma/pull/2046) to support Puma < 4.3.0.
6
+
3
7
  ## 1.0.0
4
8
 
5
9
  Initial release of the `puma-stats` gem.
@@ -8,6 +8,8 @@ Puma::Plugin.create do
8
8
  str = launcher.options[:stats_url] || 'tcp://0.0.0.0:51209'
9
9
 
10
10
  require 'puma/stats/app'
11
+ require 'puma/minissl/context_builder'
12
+ require 'puma/util'
11
13
 
12
14
  app = Puma::Stats::App.new launcher
13
15
  uri = URI.parse str
@@ -17,8 +19,14 @@ Puma::Plugin.create do
17
19
  stats.max_threads = 1
18
20
 
19
21
  case uri.scheme
22
+ when 'ssl'
23
+ optional_token = launcher.options[:stats_token] ? "with auth token: #{launcher.options[:stats_token]}" : ''
24
+ launcher.events.log "* Starting stats server on URI: #{str} #{optional_token}"
25
+ params = Puma::Util.parse_query uri.query
26
+ ctx = Puma::MiniSSL::ContextBuilder.new(params, launcher.events).context
27
+ stats.add_ssl_listener uri.host, uri.port, ctx
20
28
  when 'tcp'
21
- optional_token = launcher.options[:stats_token] ? "with auth token: #{launcher.options[:stats_token]}" : ''
29
+ optional_token = launcher.options[:stats_token] ? "with auth token: #{launcher.options[:stats_token]}" : ''
22
30
  launcher.events.log "* Starting stats server on URI: #{str} #{optional_token}"
23
31
  stats.add_tcp_listener uri.host, uri.port
24
32
  else
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Puma
4
4
  module Stats
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma-stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Kishel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-27 00:00:00.000000000 Z
11
+ date: 2019-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puma
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 0.49.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 0.49.0
83
83
  description: A puma plugin to expose Puma's internal statistics
84
84
  email: tom.kishel@puppet.com
85
85
  executables: []