simple-cli 0.2.16 → 0.2.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple/cli/logger/colored_logger.rb +18 -0
- data/lib/simple/cli/version.rb +1 -1
- 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: 43f3f722bec1b3232c215e4e4778ad9aedec5102a62aa5bc68d4babb19e5b9dc
|
4
|
+
data.tar.gz: 3b721f303eb08aa2ee4097da13cf8e13bae7ed81220a084710d1d7d085352d7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 033633a1f28f272ba3a9ef664694c6663c2485a1c7a46347673c775e4e18544fab3f2ed1cba602254e5b678a79ef3e1db772f7be46785001a1a738fa665fae41
|
7
|
+
data.tar.gz: 1d9db70a801d71012dd44d435f21e48ede7d8d59f7a4de5be49079b4553e2476fc14cc0b2e13380588bce00d420a50f833382171832a0aa4ebc99be474137792
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# rubocop:disable Metrics/AbcSize
|
2
2
|
# rubocop:disable Metrics/MethodLength
|
3
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
4
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
3
5
|
|
4
6
|
module Simple::CLI::Logger::ColoredLogger
|
5
7
|
extend self
|
@@ -58,6 +60,22 @@ module Simple::CLI::Logger::ColoredLogger
|
|
58
60
|
log :success, *args, &block
|
59
61
|
end
|
60
62
|
|
63
|
+
def debug?
|
64
|
+
level <= REQUIRED_LOG_LEVELS[:debug]
|
65
|
+
end
|
66
|
+
|
67
|
+
def info?
|
68
|
+
level <= REQUIRED_LOG_LEVELS[:info]
|
69
|
+
end
|
70
|
+
|
71
|
+
def warn?
|
72
|
+
level <= REQUIRED_LOG_LEVELS[:warn]
|
73
|
+
end
|
74
|
+
|
75
|
+
def error?
|
76
|
+
level <= REQUIRED_LOG_LEVELS[:error]
|
77
|
+
end
|
78
|
+
|
61
79
|
private
|
62
80
|
|
63
81
|
REQUIRED_LOG_LEVELS = {
|
data/lib/simple/cli/version.rb
CHANGED