redis-stat 0.4.11-java → 0.4.12-java

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
  SHA1:
3
- metadata.gz: 2f1650347eaabe84fcfbf4b35d07151262845fc8
4
- data.tar.gz: 31dc5527c1897f4df2b0d95c5ef15f5ca1b04ee9
3
+ metadata.gz: bc7545407011634c90945f45fd977c572710bdfe
4
+ data.tar.gz: 9e534a8f2c7edc984f0bd0b17bbf007965cba047
5
5
  SHA512:
6
- metadata.gz: 8f54391e723b0a6d168c122b2d7a63e6778d9b90e2a78673cc62f99baa1542b38d04526553d254a4d0234044325005d395d2614cc1ffa8ddf88070f1633eec34
7
- data.tar.gz: 1fdf2028a4ab17903a567954697391454cb04545646812a8b715d6dbbb91eecffad3da22c093a89d45dc8dfc71745c701902864fcf6df9cafddea9190e4bb205
6
+ metadata.gz: 3f6e0c566495cbb70e1cbadef94f2d1f3c0da68ea134df3c7f13c395c4b9f64a4c666f8c90bd9309cade19163178c10f9cb394643c39d519a6988c4718af2772
7
+ data.tar.gz: b1b0a9a5ce59caf9b62c0feccff1bdec560cecf4e171b0b16aa24ec446351e433646dd6e4482997ca38918a76af16550b5432ab426b791ed630f0b7a59c920a8
@@ -258,8 +258,18 @@ private
258
258
  end
259
259
  end
260
260
 
261
- @term_width = (`tput cols` rescue DEFAULT_TERM_WIDTH).to_i
262
- @term_height = (`tput lines` rescue DEFAULT_TERM_HEIGHT).to_i - 4
261
+ @term_width, @term_height = tput_term_size
262
+ end
263
+
264
+ def tput_term_size
265
+ return [DEFAULT_TERM_WIDTH, DEFAULT_TERM_HEIGHT - 4] if @term_fixed
266
+
267
+ dim = %w[cols lines].map { |attr| (`tput #{attr}` || nil).to_i }
268
+ if dim.index(0)
269
+ @term_fixed = true
270
+ return tput_term_size
271
+ end
272
+ [dim.first, dim.last - 4]
263
273
  end
264
274
 
265
275
  def move! lines
@@ -1,3 +1,3 @@
1
1
  class RedisStat
2
- VERSION = '0.4.11'
2
+ VERSION = '0.4.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-stat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.11
4
+ version: 0.4.12
5
5
  platform: java
6
6
  authors:
7
7
  - Junegunn Choi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-18 00:00:00.000000000 Z
11
+ date: 2015-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ansi256
@@ -226,10 +226,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  version: '0'
227
227
  requirements: []
228
228
  rubyforge_project:
229
- rubygems_version: 2.2.2
229
+ rubygems_version: 2.4.5
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: A real-time Redis monitoring tool written in Ruby
233
233
  test_files:
234
234
  - test/bin_helper.rb
235
235
  - test/test_redis-stat.rb
236
+ has_rdoc: