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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13ab3e4f54a6a88eadd469eaf26d752bd4c8cfad
4
- data.tar.gz: c3110f1d2d7fefa2996fed29fae0245b4094d5ad
3
+ metadata.gz: 5df3fa646ed7439aa7a4b63e4b720c39a4cb0bc8
4
+ data.tar.gz: a73ba3db03005fb018d5e0efcffeb658ed1309f4
5
5
  SHA512:
6
- metadata.gz: 8a713c42dbb3f64ab6c1063141c812592687f28e9620641b17a4882c1a123c1b4b5f3089371ffca5c1e8db68255d23631ce9eae788b0136ec52bb5593598c27d
7
- data.tar.gz: dac5190985f60f3049f41db637ee83802ed0fd996c7c266ed2d2affc766dcd3520cc1e594b08cf1301a02e6d1088bd0c5ecc7f818550e1aa2cf9f23dfb64cc1c
6
+ metadata.gz: ef1e6aa15212200d713d5745b71c0887ebe5a5a736304e2bb17eab4db48db42e960e1700236d46d4bfb4209ad33467f7ae78868926b0f3e2c6ca11512622cbbb
7
+ data.tar.gz: d71b0d07cb35f40c030477132338d8b24e443a852a20c21e52d77c2dfc57d345539f1ea00428d3455f37c083846a32fd8134be11fa59bff6ad94a50f27bdacf8
@@ -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
@@ -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 Errno::ENOTTY
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 Errno::ENOENT
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 Errno::ENOENT
212
+ rescue IOError, SystemCallError
214
213
  end
215
214
  module_function :size_from_stty
216
215
 
@@ -1,5 +1,5 @@
1
1
  module TTY
2
2
  module Screen
3
- VERSION = "0.6.2"
3
+ VERSION = "0.6.3"
4
4
  end # Screen
5
5
  end # TTY
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.2
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-04 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler