tty-progressbar 0.15.0 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +27 -21
- data/lib/tty/progressbar.rb +6 -4
- data/lib/tty/progressbar/version.rb +1 -1
- data/spec/unit/hide_cursor_spec.rb +2 -2
- data/tty-progressbar.gemspec +0 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 940663302a6775a3d728f4f10d15baf71da3506de9f3d38c41afd1cb9e62c9fd
|
4
|
+
data.tar.gz: 60d9a661744ebf03811bb9c68a3254003c1f28882998fe21083b0226beab720e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f195b2df5a8c46be31ab2464a4b0413357e2a1ed89136a8e11ffc509b59e243a8a5719d1caa616f0e5b1e0608936ce271992e06ed2d7db4dbfb4a6aabf05396
|
7
|
+
data.tar.gz: 4223f51b08087157277d8bc660b06751962b2884401484e4962250e6031fa24c6fc524f21f90bb5709adc76f023eacf063ca652a792088292a44ef0c1af1a7ec
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## [v0.15.1] - 2018-07-19
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
* Fix to always restore hidden cursor by Eric Hodel(@drbrain)
|
7
|
+
|
3
8
|
## [v0.15.0] - 2018-06-24
|
4
9
|
|
5
10
|
### Added
|
@@ -179,24 +184,25 @@
|
|
179
184
|
|
180
185
|
* Initial implementation and release
|
181
186
|
|
182
|
-
[v0.15.
|
183
|
-
[v0.
|
184
|
-
[v0.
|
185
|
-
[v0.
|
186
|
-
[v0.12.
|
187
|
-
[v0.12.
|
188
|
-
[v0.
|
189
|
-
[v0.
|
190
|
-
[v0.10.
|
191
|
-
[v0.
|
192
|
-
[v0.
|
193
|
-
[v0.8.
|
194
|
-
[v0.8.
|
195
|
-
[v0.
|
196
|
-
[v0.
|
197
|
-
[v0.
|
198
|
-
[v0.5.
|
199
|
-
[v0.
|
200
|
-
[v0.
|
201
|
-
[v0.
|
202
|
-
[v0.
|
187
|
+
[v0.15.1]: https://github.com/piotrmurach/tty-progressbar/compare/v0.15.0...v0.15.1
|
188
|
+
[v0.15.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.14.0...v0.15.0
|
189
|
+
[v0.14.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.13.0...v0.14.0
|
190
|
+
[v0.13.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.12.2...v0.13.0
|
191
|
+
[v0.12.2]: https://github.com/piotrmurach/tty-progressbar/compare/v0.12.1...v0.12.2
|
192
|
+
[v0.12.1]: https://github.com/piotrmurach/tty-progressbar/compare/v0.12.0...v0.12.1
|
193
|
+
[v0.12.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.11.0...v0.12.0
|
194
|
+
[v0.11.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.10.1...v0.11.0
|
195
|
+
[v0.10.1]: https://github.com/piotrmurach/tty-progressbar/compare/v0.10.0...v0.10.1
|
196
|
+
[v0.10.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.9.0...v0.10.0
|
197
|
+
[v0.9.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.8.2...v0.9.0
|
198
|
+
[v0.8.2]: https://github.com/piotrmurach/tty-progressbar/compare/v0.8.1...v0.8.2
|
199
|
+
[v0.8.1]: https://github.com/piotrmurach/tty-progressbar/compare/v0.8.0...v0.8.1
|
200
|
+
[v0.8.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.7.0...v0.8.0
|
201
|
+
[v0.7.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.6.0...v0.7.0
|
202
|
+
[v0.6.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.5.1...v0.6.0
|
203
|
+
[v0.5.1]: https://github.com/piotrmurach/tty-progressbar/compare/v0.5.0...v0.5.1
|
204
|
+
[v0.5.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.4.0...v0.5.0
|
205
|
+
[v0.4.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.3.0...v0.4.0
|
206
|
+
[v0.3.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.2.0...v0.3.0
|
207
|
+
[v0.2.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.1.0...v0.2.0
|
208
|
+
[v0.1.0]: https://github.com/piotrmurach/tty-progressbar/compare/v0.1.0
|
data/lib/tty/progressbar.rb
CHANGED
@@ -354,10 +354,6 @@ module TTY
|
|
354
354
|
#
|
355
355
|
# @api public
|
356
356
|
def finish
|
357
|
-
# reenable cursor if it is turned off
|
358
|
-
if hide_cursor && @last_render_width != 0
|
359
|
-
write(TTY::Cursor.show, false)
|
360
|
-
end
|
361
357
|
return if done?
|
362
358
|
@current = total unless no_width
|
363
359
|
render
|
@@ -365,6 +361,12 @@ module TTY
|
|
365
361
|
ensure
|
366
362
|
@meter.clear
|
367
363
|
@done = true
|
364
|
+
|
365
|
+
# reenable cursor if it is turned off
|
366
|
+
if hide_cursor && @last_render_width != 0
|
367
|
+
write(TTY::Cursor.show, false)
|
368
|
+
end
|
369
|
+
|
368
370
|
emit(:done)
|
369
371
|
end
|
370
372
|
|
@@ -11,7 +11,7 @@ RSpec.describe TTY::ProgressBar, '#hide_cursor' do
|
|
11
11
|
"\e[1G[== ]",
|
12
12
|
"\e[1G[=== ]",
|
13
13
|
"\e[1G[==== ]",
|
14
|
-
"\e[
|
14
|
+
"\e[1G[=====]\n\e[?25h"
|
15
15
|
].join)
|
16
16
|
end
|
17
17
|
|
@@ -22,6 +22,6 @@ RSpec.describe TTY::ProgressBar, '#hide_cursor' do
|
|
22
22
|
progress.advance(6)
|
23
23
|
expect(progress.complete?).to eq(true)
|
24
24
|
output.rewind
|
25
|
-
expect(output.read).to eq("\e[1G[=====]\n")
|
25
|
+
expect(output.read).to eq("\e[1G[=====]\n\e[?25h")
|
26
26
|
end
|
27
27
|
end
|
data/tty-progressbar.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tty-progressbar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Murach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-cursor
|
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
239
|
version: '0'
|
240
240
|
requirements: []
|
241
241
|
rubyforge_project:
|
242
|
-
rubygems_version: 2.
|
242
|
+
rubygems_version: 2.7.3
|
243
243
|
signing_key:
|
244
244
|
specification_version: 4
|
245
245
|
summary: A flexible progress bars drawing in terminal emulators.
|