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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lit_cli.rb +8 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d016a1786059f76f691d0dd55ab4a8d2e408f4b2ee5bca3d8e42ea29012d379
4
- data.tar.gz: 5f0756f25977560051e7b07b86ae795584e954fa14eeb4533f56505c60d9cdfd
3
+ metadata.gz: 839f03037b67dd56c7b7d4c38ba26138082594823cc32dbc7217c78363d34088
4
+ data.tar.gz: 3ab13437fcb2e6884ccd9465d85c72c0f3f7623b2e4076cd21ea22ba369a160b
5
5
  SHA512:
6
- metadata.gz: b902f2d26e1b868be3026783a2f99e10a34ca1be0851cd73b5c16c2a4ef23fad146b5f9f51ddaca41975b249833c6f382cd47468f21ef6c2ecfa1638a9a2382e
7
- data.tar.gz: 01c08ebe1937ed4d31240aed5bcda06c4d5f85b9d6c28c23ca21b939e547e6267fc7e6248d7f3d14972bd5e9b1ea27dc74df5c38fd3d39f2aaa0a09e5340fef2
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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lit-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maedi Prichard