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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c327637905c572e3ed22e9936b440597f77d032abe2b155e73776bd845c9588c
4
- data.tar.gz: 5e57068f3dfaa9a5f9334825ff5bf7493a8286a2b46feb6da5b9fca36e605a92
3
+ metadata.gz: 155fc63d4aeb44adff94d1aecceee4458c4829d68ad0da1a7db10566e9c8d646
4
+ data.tar.gz: fdea125242151b6abf868cd74f163f84560d10d8825356f8ce718d7d5582967c
5
5
  SHA512:
6
- metadata.gz: 7b5cd14ef13b733fe0488cb61dd63a74811566a467d45ec7f9a661515a61cd7b7a0cde4e4ff1e4f71f64d5f52e7c76a5a52e4addbc7085ec7159c90e88e62231
7
- data.tar.gz: 91c439d68efdf850d777bc380ee9ef3ca3c1233d04bb8891c1a204bbd038ff75f436c7bf3fb09caf8fa4576fed37385979aa94cd39f9288125c7d2eeccd7f1c2
6
+ metadata.gz: c8b63db9c3d6b63fa40c0709712e1cd4c1aa028d662976428089eefee6c48c597a1e84d602dce442e0899c6796cec21e2c179d1eec1331b4b3012b7c4036dbdc
7
+ data.tar.gz: cab4e1f32c8db8a434beeac2a0e83c66d385ebd2e85d1dde1cdfeb7ee93392d51791d41bc790f9df84c36f041c1879e74607122c0d9d2a1072dfa1cf80596ee3
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.3.0 2020-09-24
4
+
5
+ * Support puma 5.x
6
+
3
7
  ## 0.2.0 2020-02-29
4
8
 
5
9
  * Added option to prefix stats metric (via STATSD_METRIC_PREFIX env var)
@@ -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
- def fetch_stats
121
- JSON.parse(Puma.stats, symbolize_names: true)
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.2.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-02-29 00:00:00.000000000 Z
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: '5'
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: '5'
32
+ version: '6'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: json
35
35
  requirement: !ruby/object:Gem::Requirement