colsole 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/colsole/compat.rb +4 -0
- data/lib/colsole/version.rb +1 -1
- data/lib/colsole.rb +7 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e651768cb78375a765cc5913f545c5e133fb95ad7515bfdc95fffb14de74038e
|
4
|
+
data.tar.gz: 3406291b87c5ca7797f1f65729a37d7e371034ba39be79f831d811eb39003508
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60fa6abaa7b8565c39d53d8a706af951b19968c283250aeee53768f382c1b8aead7e0fb0a1f2c6d9a3190f941606dd99e9214de176bbcfe786d0d9f85c5b1ff0
|
7
|
+
data.tar.gz: 64cc7706ef686d49b77b5eb9b2e303db7550c9466d409149075588b3aeee932415967f6040a156ef81d463129a186b51aaa7da010408e712ddd79291f11eb463
|
data/README.md
CHANGED
@@ -20,7 +20,7 @@ Utility functions for colorful console applications.
|
|
20
20
|
Add to your Gemfile:
|
21
21
|
|
22
22
|
```
|
23
|
-
$ gem 'colsole', '>= 0.
|
23
|
+
$ gem 'colsole', '>= 0.8.1', '< 2.0'
|
24
24
|
```
|
25
25
|
|
26
26
|
## Examples
|
@@ -154,8 +154,8 @@ Follow these steps to upgrade:
|
|
154
154
|
# => Require a more flexible version
|
155
155
|
# change this
|
156
156
|
gem 'colsole'
|
157
|
-
# to this
|
158
|
-
gem 'colsole', '>= 0.
|
157
|
+
# to this
|
158
|
+
gem 'colsole', '>= 0.8.1', '< 2.0'
|
159
159
|
|
160
160
|
# => Remove 'say_status'
|
161
161
|
# It will no longer be supported in 1.0.0
|
data/lib/colsole/compat.rb
CHANGED
data/lib/colsole/version.rb
CHANGED
data/lib/colsole.rb
CHANGED
@@ -143,8 +143,12 @@ private
|
|
143
143
|
end
|
144
144
|
|
145
145
|
def safe_get_tty_size(default = [80, 30])
|
146
|
-
|
147
|
-
|
148
|
-
|
146
|
+
return default unless IO.console
|
147
|
+
|
148
|
+
begin
|
149
|
+
IO.console.winsize.reverse
|
150
|
+
rescue Errno::ENOTTY
|
151
|
+
default
|
152
|
+
end
|
149
153
|
end
|
150
154
|
end
|