tty-screen 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/tty/screen.rb +6 -7
- data/lib/tty/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: 5df3fa646ed7439aa7a4b63e4b720c39a4cb0bc8
|
4
|
+
data.tar.gz: a73ba3db03005fb018d5e0efcffeb658ed1309f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef1e6aa15212200d713d5745b71c0887ebe5a5a736304e2bb17eab4db48db42e960e1700236d46d4bfb4209ad33467f7ae78868926b0f3e2c6ca11512622cbbb
|
7
|
+
data.tar.gz: d71b0d07cb35f40c030477132338d8b24e443a852a20c21e52d77c2dfc57d345539f1ea00428d3455f37c083846a32fd8134be11fa59bff6ad94a50f27bdacf8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## [v0.6.3] - 2017-11-22
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
* Change #size_from_tput & #size_from_stty to capture generic IO and command execution errors to make the calls more robust
|
7
|
+
|
8
|
+
### Fixed
|
9
|
+
* Fix #size_from_ioctl to handle Errno errors and deal with Errno::EOPNOTSUPP
|
10
|
+
|
3
11
|
## [v0.6.2] - 2017-11-04
|
4
12
|
|
5
13
|
### Fixed
|
@@ -82,6 +90,7 @@
|
|
82
90
|
### Fixed
|
83
91
|
* Fix bug with screen detection from_io_console by @luxflux
|
84
92
|
|
93
|
+
[v0.6.3]: https://github.com/peter-murach/tty-screen/compare/v0.6.2...v0.6.3
|
85
94
|
[v0.6.2]: https://github.com/peter-murach/tty-screen/compare/v0.6.1...v0.6.2
|
86
95
|
[v0.6.1]: https://github.com/peter-murach/tty-screen/compare/v0.6.0...v0.6.1
|
87
96
|
[v0.6.0]: https://github.com/peter-murach/tty-screen/compare/v0.5.1...v0.6.0
|
data/lib/tty/screen.rb
CHANGED
@@ -166,13 +166,12 @@ module TTY
|
|
166
166
|
end
|
167
167
|
module_function :size_from_ioctl
|
168
168
|
|
169
|
+
# Check if ioctl can be called and the device is attached to terminal
|
170
|
+
#
|
171
|
+
# @api private
|
169
172
|
def ioctl?(control, buf)
|
170
173
|
@output.ioctl(control, buf) >= 0
|
171
|
-
rescue
|
172
|
-
# wrong processor architecture
|
173
|
-
false
|
174
|
-
rescue Errno::EINVAL
|
175
|
-
# ioctl failed to recognise processor type(not Intel)
|
174
|
+
rescue SystemCallError
|
176
175
|
false
|
177
176
|
end
|
178
177
|
module_function :ioctl?
|
@@ -197,7 +196,7 @@ module TTY
|
|
197
196
|
lines = run_command('tput', 'lines').to_i
|
198
197
|
cols = run_command('tput', 'cols').to_i
|
199
198
|
[lines, cols] if nonzero_column?(lines)
|
200
|
-
rescue
|
199
|
+
rescue IOError, SystemCallError
|
201
200
|
end
|
202
201
|
module_function :size_from_tput
|
203
202
|
|
@@ -210,7 +209,7 @@ module TTY
|
|
210
209
|
return unless out
|
211
210
|
size = out.split.map(&:to_i)
|
212
211
|
size if nonzero_column?(size[1])
|
213
|
-
rescue
|
212
|
+
rescue IOError, SystemCallError
|
214
213
|
end
|
215
214
|
module_function :size_from_stty
|
216
215
|
|
data/lib/tty/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tty-screen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Murach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|