colsole 0.6.0 → 0.7.0

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
  SHA256:
3
- metadata.gz: 3d44483773786ce9ec10d0363f0009ecc489de77ab9613179625280d33cb0617
4
- data.tar.gz: c0bf8da4ef5e3b3dfd68baf7581fee1cfe5d2e3ac4230c3492eca05543d18468
3
+ metadata.gz: 5ed8305ec71b0b0263a635bf4424ddb8aeff919deea40ea6d18b2a11eb1eae01
4
+ data.tar.gz: 34bd4bd5b4288c9e204baa4aa2035f20bde43d5ccf11c9d741c6bbf6cf8b31c6
5
5
  SHA512:
6
- metadata.gz: 71c9cfa69cffea67948f8f499c026f414968e49e8956f91b2848475b580601c5de1d15045cd512ce61f98e7e2db9145a7389bb0db0c3e64b8e6b7f7325fe2aab
7
- data.tar.gz: e16cc3133c91494885b0f277f186c62a5aeca3c2086d0306045827895d09ebdb317afe72dd860c5e9073702be32e775181d062251bffaa796949cfb7b102f065
6
+ metadata.gz: 467cc227ae7fb5c074734918ebc24196a295ab077e4af69774795b64f194355ea77e862dbe010039d0f01a645007ac86a99d1d615ac19e23fa873b38d34eb011
7
+ data.tar.gz: d987f693eee608610451ab135e896556000a364d17c87164aaeebe5aee2335b25d9e41742e5ca4a28c96d37ec3d6e32f77c2c51673d5007c5283717663243a0f
@@ -23,10 +23,10 @@ module Colsole
23
23
  # Space terminated strings will leave the cursor at the same line.
24
24
  def say(text, force_color=false)
25
25
  last = text[-1, 1]
26
- if last == ' ' or last == '\t'
26
+ if terminal? and (last == ' ' or last == '\t')
27
27
  print colorize(text, force_color)
28
28
  else
29
- print colorize("#{text}\n", force_color)
29
+ print colorize("#{text.rstrip}\n", force_color)
30
30
  end
31
31
  end
32
32
 
@@ -39,7 +39,7 @@ module Colsole
39
39
  # Erase the current output line, and say a new string.
40
40
  # This should be used after a space terminated say().
41
41
  def resay(text, force_color=false)
42
- terminal? and text = "\033[2K\r#{text}"
42
+ text = "\033[2K\r#{text}" if terminal?
43
43
  say text, force_color
44
44
  end
45
45
 
@@ -1,3 +1,3 @@
1
1
  module Colsole
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colsole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-16 00:00:00.000000000 Z
11
+ date: 2019-12-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Utility functions for making colorful console applications
14
14
  email: db@dannyben.com
@@ -38,7 +38,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  requirements: []
41
- rubygems_version: 3.0.4
41
+ rubygems_version: 3.0.3
42
42
  signing_key:
43
43
  specification_version: 4
44
44
  summary: Colorful Console Applications