puma-plugin-statsd 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/puma/plugin/statsd.rb +9 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 155fc63d4aeb44adff94d1aecceee4458c4829d68ad0da1a7db10566e9c8d646
|
4
|
+
data.tar.gz: fdea125242151b6abf868cd74f163f84560d10d8825356f8ce718d7d5582967c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8b63db9c3d6b63fa40c0709712e1cd4c1aa028d662976428089eefee6c48c597a1e84d602dce442e0899c6796cec21e2c179d1eec1331b4b3012b7c4036dbdc
|
7
|
+
data.tar.gz: cab4e1f32c8db8a434beeac2a0e83c66d385ebd2e85d1dde1cdfeb7ee93392d51791d41bc790f9df84c36f041c1879e74607122c0d9d2a1072dfa1cf80596ee3
|
data/CHANGELOG.md
CHANGED
data/lib/puma/plugin/statsd.rb
CHANGED
@@ -86,11 +86,6 @@ class PumaStats
|
|
86
86
|
end
|
87
87
|
|
88
88
|
Puma::Plugin.create do
|
89
|
-
# Puma creates the plugin when encountering `plugin` in the config.
|
90
|
-
def initialize(loader)
|
91
|
-
@loader = loader
|
92
|
-
end
|
93
|
-
|
94
89
|
# We can start doing something when we have a launcher:
|
95
90
|
def start(launcher)
|
96
91
|
@launcher = launcher
|
@@ -117,8 +112,15 @@ Puma::Plugin.create do
|
|
117
112
|
in_background(&method(:stats_loop))
|
118
113
|
end
|
119
114
|
|
120
|
-
|
121
|
-
|
115
|
+
if Puma.respond_to?(:stats_hash)
|
116
|
+
def fetch_stats
|
117
|
+
Puma.stats_hash
|
118
|
+
end
|
119
|
+
else
|
120
|
+
def fetch_stats
|
121
|
+
stats = Puma.stats
|
122
|
+
JSON.parse(stats, symbolize_names: true)
|
123
|
+
end
|
122
124
|
end
|
123
125
|
|
124
126
|
def tags
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puma-plugin-statsd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Healy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puma
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3.12'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3.12'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: json
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|