lit-cli 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lit_cli.rb +8 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 839f03037b67dd56c7b7d4c38ba26138082594823cc32dbc7217c78363d34088
|
4
|
+
data.tar.gz: 3ab13437fcb2e6884ccd9465d85c72c0f3f7623b2e4076cd21ea22ba369a160b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97d737397a07cfd123166f9c233757e0db4606072c75f22235c85d421474bc05bf94ef2ec8e216420b3c1cca9aecd1615c9ad20ade4b76ee6dde3770d36ba89f
|
7
|
+
data.tar.gz: 7e832c959dd947b99609f2e0ff8e30bb45a8f117b13a617a4671bb4236ee6a1a455f595b8eb35d9d682bc06abe9411e336b2f82553e328cd574215481b565770
|
data/lib/lit_cli.rb
CHANGED
@@ -8,18 +8,18 @@ module LitCLI
|
|
8
8
|
@@config = Config.new
|
9
9
|
@@is_prying = false
|
10
10
|
|
11
|
-
def lit(message, status = :info, type = nil)
|
11
|
+
def lit(message, status = :info, type = nil, context = nil)
|
12
12
|
if @@config.enabled
|
13
13
|
return if LitCLI.filter_status? status
|
14
14
|
return if LitCLI.filter_type? type
|
15
|
-
LitCLI.render(message, status, type)
|
15
|
+
LitCLI.render(message, status, type, context)
|
16
16
|
LitCLI.step()
|
17
17
|
LitCLI.delay()
|
18
18
|
end
|
19
19
|
end
|
20
20
|
alias 🔥 lit
|
21
21
|
|
22
|
-
def self.render(message, status, type)
|
22
|
+
def self.render(message, status, type, context)
|
23
23
|
text = "🔥"
|
24
24
|
|
25
25
|
# Time.
|
@@ -40,6 +40,9 @@ module LitCLI
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
+
# Context.
|
44
|
+
text << LitCLI.format(" #{context}", styles: [:bold, :dim])
|
45
|
+
|
43
46
|
# Message.
|
44
47
|
text << " #{message}"
|
45
48
|
|
@@ -91,6 +94,8 @@ module LitCLI
|
|
91
94
|
text = text.upcase
|
92
95
|
when :downcase
|
93
96
|
text = text.downcase
|
97
|
+
when :capitalize
|
98
|
+
text = text.capitalize
|
94
99
|
end
|
95
100
|
end
|
96
101
|
# Then apply styling.
|