smooth_terminal_print 0.0.5 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smooth_terminal_print.rb +8 -4
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76ac9646a7704edd941afaf47329bbd61153ef67
4
- data.tar.gz: 5b197c0f17048924750aa6b6ebb1d3dbb72e2ad2
3
+ metadata.gz: 9e6ca0f0a931d1f8ef5841856b15bb96a31feada
4
+ data.tar.gz: 445bb812683f1cd96f7a829f115a0a130ebcb2b6
5
5
  SHA512:
6
- metadata.gz: 7d032f94c7952d4758bbdb52b4b15016f21a27d38a2032281484ae374bd608022524a468eee43c6cdf9f57276a1b56f0d04814a3cb7b0ee786fe7250f0929db0
7
- data.tar.gz: cdfbf5c50a32fff66151664f541440cf033b5c046d506d07721960e53b97d95b5e989c9945e7525592a08f160f6a1ecc4c757a40d8aaf312c75adf5adc71e968
6
+ metadata.gz: 8c7a6953cf99006aa1117e0de6d3f16edb061ea4ccaf9ab8e1ea30404f905f81b7dd4f1922bce177605fd4f62528ce2d94a9b1769ab85b85652e618a7f9734cb
7
+ data.tar.gz: a00a773e61395bc3eeedca1f03ae70db6a0417292601b3fdb6a4b4b717b86c8ddfd6a2a3b1647eb749321f873dae51b3dc7cb0ea6e9cb1253bddcbdfbfe81957
@@ -29,12 +29,16 @@ module SmoothTerminalPrint
29
29
 
30
30
  private
31
31
  def print_text(string_io)
32
- @num_lines.times do
32
+ 0.upto(@num_lines) do
33
33
  line = string_io.gets
34
- break if line.nil?
35
34
 
36
- line.strip!
37
- line = line[0..@columns]
35
+ if line.nil?
36
+ line = ''
37
+ else
38
+ line.strip!
39
+ line = line[0..@columns]
40
+ end
41
+
38
42
  line.length.upto(@columns) { line << ' ' }
39
43
  line << "\n"
40
44
  puts 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: 0.0.5
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Sykes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-17 00:00:00.000000000 Z
11
+ date: 2016-05-06 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
@@ -38,7 +38,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
38
38
  version: '0'
39
39
  requirements: []
40
40
  rubyforge_project:
41
- rubygems_version: 2.5.0
41
+ rubygems_version: 2.4.5
42
42
  signing_key:
43
43
  specification_version: 4
44
44
  summary: Smoothly print to the terminal while in a tight loop