rain_catcher 0.2.0 → 0.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: 52687a88378b7af6e68d40a9bc38ad0d532af054960086ff119f8a1b2037d378
4
- data.tar.gz: e144ecfdec362ce3459296e42d1a6fb37662356055950ae39fe374aa554e1c8e
3
+ metadata.gz: 5487ed39ee210826f5b8c1390b003d42b62ac7d4e0e8c5990e215dcb1f20a970
4
+ data.tar.gz: d5ed100f51cc1674313c00599bd4b849a3f2f68e88687460ade5a7d84dc98f4d
5
5
  SHA512:
6
- metadata.gz: aae61ba1e351b4b3f2fe5a63a6bb80a1f353ccdf9feb66d2345e85bd3c5259f0c187fe3bf64eb610f0cd1b3a59c7dea6e21da4c00e4f6e95bd0a3f3e49a1dbb4
7
- data.tar.gz: 01a42a19c618206104546fa32ae216030bb7b1ccfbcc6f65b9cac5a2a6a3204242084833613d7d31c586f2fc6d5ab098e95965b2e382a15945e89df2135d94fc
6
+ metadata.gz: 3a440991b9ff2fcda563228896b46f0af47b9c15c662bf2f2268e35864977ce59056f0071732b64e505fa33e6629f2da5ebf0de9bf88f55171cc78cbe700cfff
7
+ data.tar.gz: 2bafe2a1742376b8ad035b0f6a4870ab31ccb8e132e6e3a45cf867c8fe46ca17a67e7af424d411db3725814d332ebe1273743770eb9802518eb83702b7c06c97
data/README.md CHANGED
@@ -7,7 +7,7 @@ _RainCatcher_ utilises the [raindrops](https://bogomips.org/raindrops/) statisti
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'rain_catcher', '~> 0.2.0'
10
+ gem 'rain_catcher', '~> 0.2.1'
11
11
  ```
12
12
 
13
13
  And rebuild your bundle:
@@ -23,9 +23,13 @@ module RainCatcher
23
23
  private
24
24
 
25
25
  def queue_data
26
+ return nil unless defined?(Unicorn)
26
27
  return nil unless Raindrops::Linux.respond_to?(:tcp_listener_stats)
27
28
 
28
- Raindrops::Linux.tcp_listener_stats.to_h.merge(
29
+ listener = Unicorn.listener_names.first
30
+ return nil if listener.nil?
31
+
32
+ Raindrops::Linux.tcp_listener_stats[listener]&.merge(
29
33
  source: 'rain_catcher',
30
34
  application: @application_name,
31
35
  environment: @environment
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RainCatcher
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rain_catcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell