redis-stat 0.4.11 → 0.4.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redis-stat.rb +12 -2
- data/lib/redis-stat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 620b88df3da7dcfd956b3145547b9fc45dd71063
|
4
|
+
data.tar.gz: e63968613471cd7cbeb6bead4fc394393f625a26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16693f8340f90aff4f055be91472e54dd430db0e180106f24a46526e1a58ac73c66e4c7a8b8fdc17427138135147ee8bb8689e50e3c06805db89feb762759bed
|
7
|
+
data.tar.gz: eb7769fd2ab7768ecd54ddab4c6242c51ed0a7ea9ff004e95c8de1e42566bf362a6fceae62f639bc99e2da40579fb75cb88fb51b1c9d64628f602684085746e5
|
data/lib/redis-stat.rb
CHANGED
@@ -258,8 +258,18 @@ private
|
|
258
258
|
end
|
259
259
|
end
|
260
260
|
|
261
|
-
@term_width
|
262
|
-
|
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
|
data/lib/redis-stat/version.rb
CHANGED
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.
|
4
|
+
version: 0.4.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Junegunn Choi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02
|
11
|
+
date: 2015-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ansi256
|