colsole 0.5.1 → 0.5.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da9288ab5b5b91d0f58a78ca3c85ae0617167915
4
- data.tar.gz: 570a9957763abe9fde96dfabf7c279bc8c0d536e
3
+ metadata.gz: '00694d9bec1b80556675a0dbe04e6bb9c9d1a1e5'
4
+ data.tar.gz: b50d82a7c8537333507fa84327ff3011dec23d3f
5
5
  SHA512:
6
- metadata.gz: a3c78981248b7459c228b79cc2f4c1fe1909c59ec52186641da1ba97b6f2070bcf80f3a4719bdc3e7efdfa6e00d80201b110078293c97b6866fee5fb4cbc29f3
7
- data.tar.gz: 074a6f6caf7d952fefdc8bff2e6fe5d7e8de57430ac03e6f789206af60986aa22d2331e0e857f59bd40e2bf82cc1894b61ec4d339fac685b5f294b298e525a27
6
+ metadata.gz: c640bdb30b01f3cfd50895b82ae3ab2ce91a22bf959631020fd81abadc27114923af60d0952dea1fac6ece896f26742df15a7bb16ee6a64135632e311d40d35b
7
+ data.tar.gz: de3884fd270d251887643eedd18c578fec7bd06517e19a3c3ad7216f66b75d43631a82523f0fd0f1955ad6439eac77c91ce226bb203cedecf4922150bcfb00c0
@@ -43,10 +43,12 @@ module Colsole
43
43
  end
44
44
 
45
45
  # Prints a line with a colored status and message.
46
- # Status can be a symbol or a string. Color is optional, defaulted to
47
- # green (:txtgrn).
48
- def say_status(status, message, color=:txtgrn)
49
- say "!#{color}!#{status.to_s.rjust 12} !txtrst! #{message}"
46
+ # Status can be a symbol or a string. Color is optional, defaults to
47
+ # green (:txtgrn) when there is a message, and to blue (:txtblu) when
48
+ # there is only a status
49
+ def say_status(status, message=nil, color=nil)
50
+ color ||= (message ? :txtgrn : :txtblu)
51
+ say "!#{color}!#{status.to_s.rjust 12} !txtrst! #{message}".strip
50
52
  end
51
53
 
52
54
  # Returns true if stdout/stderr is interactive terminal
@@ -85,7 +87,7 @@ module Colsole
85
87
  result
86
88
  end
87
89
 
88
- # Returns terminal width with re-asking
90
+ # Returns terminal width
89
91
  def terminal_width
90
92
  detect_terminal_size[0]
91
93
  end
@@ -1,3 +1,3 @@
1
1
  module Colsole
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
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.5.1
4
+ version: 0.5.2
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: 2017-08-08 00:00:00.000000000 Z
11
+ date: 2017-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: runfile
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  requirements: []
97
97
  rubyforge_project:
98
- rubygems_version: 2.5.1
98
+ rubygems_version: 2.6.13
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: Colorful Console Applications