smooth_terminal_print 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smooth_terminal_print.rb +7 -0
- 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: f2e82af0c5fb3899d0759e9f8bc470fd674711e0
|
4
|
+
data.tar.gz: 7224d9ff1e2bdcbac5d84df4298c29b8cf2edad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1ce7cba79bfe5283942869efc82afc878c73c3b33657fc37557edf55ddfa4ee01d3545a29684ad9e7e0688beef6d9e6289c0dd7bec84c811a7817c557acde2f
|
7
|
+
data.tar.gz: 7fd21a9dc81afa4438c0dc6f73dd882ff9052ab75c1f40cc2457cdf863d69465be24f675b6dd01f32974fa23c4bbaa03a23c78460a19ddd658db280be347a467
|
@@ -36,6 +36,13 @@ module SmoothTerminalPrint
|
|
36
36
|
line = ''
|
37
37
|
else
|
38
38
|
line.strip!
|
39
|
+
# If the line includes ANSI escape codes then I'm not sure currently how to
|
40
|
+
# truncate them without creating a mess. So just skip them for now and suffer
|
41
|
+
# the consequences, being that, the screen will not refresh properly if there are ANSI
|
42
|
+
# escape codes in the string, AND the length of said string exceeds the total columns available.
|
43
|
+
if(!line.include?("\e["))
|
44
|
+
line = line[0..@columns]
|
45
|
+
end
|
39
46
|
end
|
40
47
|
|
41
48
|
line.length.upto(@columns) { line << ' ' }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smooth_terminal_print
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Sykes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Allows the user to smoothly print to the terminal while in a tight loop
|
14
14
|
email: brettcsykes@gmail.com
|