simple-cli 0.2.14 → 0.2.15
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 +12 -11
- data/lib/simple/cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4aa61e6d488a8ec33a3ce2ee4764b05c3d292089577ba47d0fbcbdf180874324
|
4
|
+
data.tar.gz: 6a1d3daf6b0252963644461546f1eb93b27a512615e906c6388df5c22f4cc1ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa92752bdec70685448a9ee89c3097c21ab5df97e995cea1acfad34264433c2a298d448ba3e4986213a49abdd17c13956fa4e26c3f6f36b53cd4b3de8b12d0bb
|
7
|
+
data.tar.gz: 6c0add7b14c893c4c757fe39febdf3bb83ec15ede5a1f40d62f74b8c2ab347a4fde950e378a0af6d050b760af9f303cb14d5a45af6e16931b8593036831b487a
|
@@ -38,24 +38,24 @@ module Simple::CLI::Logger::ColoredLogger
|
|
38
38
|
success: :green,
|
39
39
|
}
|
40
40
|
|
41
|
-
def debug(
|
42
|
-
log :debug,
|
41
|
+
def debug(*args, &block)
|
42
|
+
log :debug, *args, &block
|
43
43
|
end
|
44
44
|
|
45
|
-
def info(
|
46
|
-
log :info,
|
45
|
+
def info(*args, &block)
|
46
|
+
log :info, *args, &block
|
47
47
|
end
|
48
48
|
|
49
|
-
def warn(
|
50
|
-
log :warn,
|
49
|
+
def warn(*args, &block)
|
50
|
+
log :warn, *args, &block
|
51
51
|
end
|
52
52
|
|
53
|
-
def error(
|
54
|
-
log :error,
|
53
|
+
def error(*args, &block)
|
54
|
+
log :error, *args, &block
|
55
55
|
end
|
56
56
|
|
57
|
-
def success(
|
58
|
-
log :success,
|
57
|
+
def success(*args, &block)
|
58
|
+
log :success, *args, &block
|
59
59
|
end
|
60
60
|
|
61
61
|
private
|
@@ -68,11 +68,12 @@ module Simple::CLI::Logger::ColoredLogger
|
|
68
68
|
success: ::Logger::INFO
|
69
69
|
}
|
70
70
|
|
71
|
-
def log(sym,
|
71
|
+
def log(sym, *args, &block)
|
72
72
|
log_level = level
|
73
73
|
required_log_level = REQUIRED_LOG_LEVELS.fetch(sym)
|
74
74
|
return if required_log_level < log_level
|
75
75
|
|
76
|
+
msg = args.shift
|
76
77
|
if msg.nil? && args.empty? && block
|
77
78
|
msg = yield
|
78
79
|
return if msg.nil?
|
data/lib/simple/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- radiospiel
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-12-
|
12
|
+
date: 2018-12-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|