puma-status 1.4 → 1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/core.rb +3 -1
  3. data/lib/stats.rb +6 -0
  4. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22bea1d3a501185590a81878994456d75a4c5375794221bdeb51b3283d65cceb
4
- data.tar.gz: a2670a54fdd6c4dae1040c59882f969ba1aff3487076d75962e2fa105da32b59
3
+ metadata.gz: 2e70794f8cca6fe403afd55f48122c046b0670e7244b0dcad9a50d860c557c69
4
+ data.tar.gz: 5cbbbc03d2744a5ac27c2ca8472d3fdaf7940c21caf74327e5fb78b239427287
5
5
  SHA512:
6
- metadata.gz: '09d1cfd981ee0c5092e9bda66009e2a4b517f3bfe3987559cfb571a9a4aa0c880e6ca45061cbd0a0c8bbc5016d2a11ba3410facc67b9924ab7643512110b2711'
7
- data.tar.gz: 023b10377d8567d59c3b75028c4cd54c2f3db12d686bcf41d5a6fcd69aabf45c6e5a89b3c956afa8e98d7ec696c5ef85801fd6a8625adf6b9d42a1aea9a584fc
6
+ metadata.gz: 59c577ff899812624b466c06b539a25b4bc4d2cf476909525efe70e5e0ef57e0f12ebb9fe4b632600dba05e8149b6a05b6fc2680fe7d4801c19faca5d81ed5b9
7
+ data.tar.gz: 61268ccb302fd12a882a9d2308702e471814fed48308ff3de109501e8bcade6b0b3d7b1c7edfec1191093f477c389f710c8416cfa9886aa00eac803e1f1a2792
data/lib/core.rb CHANGED
@@ -76,7 +76,9 @@ def hydrate_stats(stats, puma_state, state_file_path)
76
76
  end
77
77
 
78
78
  def format_stats(stats)
79
- master_line = "#{stats.pid} (#{stats.state_file_path}) Uptime: #{seconds_to_human(stats.uptime)}"
79
+ master_line = "#{stats.pid} (#{stats.state_file_path})"
80
+ master_line += " Version: #{stats.version} |" if stats.version
81
+ master_line += " Uptime: #{seconds_to_human(stats.uptime)}"
80
82
  master_line += " | Phase: #{stats.phase}" if stats.phase
81
83
 
82
84
  if stats.booting?
data/lib/stats.rb CHANGED
@@ -154,4 +154,10 @@ class Stats
154
154
  def load
155
155
  running_threads/total_threads.to_f*100
156
156
  end
157
+
158
+ def version
159
+ return nil unless @stats.key?('versions')
160
+
161
+ "#{@stats['versions']['puma']}/#{@stats['versions']['ruby']['engine']}#{@stats['versions']['ruby']['version']}p#{@stats['versions']['ruby']['patchlevel']}"
162
+ end
157
163
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma-status
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.4'
4
+ version: '1.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoann Lecuyer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2019-07-14 00:00:00.000000000 Z
@@ -94,8 +94,8 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.9'
97
- description:
98
- email:
97
+ description:
98
+ email:
99
99
  executables:
100
100
  - puma-status
101
101
  extensions: []
@@ -111,7 +111,7 @@ homepage: https://github.com/ylecuyer/puma-status
111
111
  licenses:
112
112
  - MIT
113
113
  metadata: {}
114
- post_install_message:
114
+ post_install_message:
115
115
  rdoc_options: []
116
116
  require_paths:
117
117
  - lib
@@ -119,15 +119,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - ">="
121
121
  - !ruby/object:Gem::Version
122
- version: 2.3.0
122
+ version: 2.5.0
123
123
  required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  requirements:
125
125
  - - ">="
126
126
  - !ruby/object:Gem::Version
127
127
  version: '0'
128
128
  requirements: []
129
- rubygems_version: 3.0.0
130
- signing_key:
129
+ rubygems_version: 3.4.0.dev
130
+ signing_key:
131
131
  specification_version: 4
132
132
  summary: Command-line tool for puma to display information about running request/process
133
133
  test_files: []