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 +4 -4
- data/lib/colsole.rb +7 -5
- data/lib/colsole/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '00694d9bec1b80556675a0dbe04e6bb9c9d1a1e5'
|
4
|
+
data.tar.gz: b50d82a7c8537333507fa84327ff3011dec23d3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c640bdb30b01f3cfd50895b82ae3ab2ce91a22bf959631020fd81abadc27114923af60d0952dea1fac6ece896f26742df15a7bb16ee6a64135632e311d40d35b
|
7
|
+
data.tar.gz: de3884fd270d251887643eedd18c578fec7bd06517e19a3c3ad7216f66b75d43631a82523f0fd0f1955ad6439eac77c91ce226bb203cedecf4922150bcfb00c0
|
data/lib/colsole.rb
CHANGED
@@ -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,
|
47
|
-
# green (:txtgrn)
|
48
|
-
|
49
|
-
|
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
|
90
|
+
# Returns terminal width
|
89
91
|
def terminal_width
|
90
92
|
detect_terminal_size[0]
|
91
93
|
end
|
data/lib/colsole/version.rb
CHANGED
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.
|
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-
|
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.
|
98
|
+
rubygems_version: 2.6.13
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: Colorful Console Applications
|