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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d714d999f8069077ef849bff674186ce9193c87eefe58ff16353e3bf4954d4b
4
- data.tar.gz: 15a25e1c5a82904ca2a0dbf745ab5bf52e236e5994129a061f4c643048da7fc7
3
+ metadata.gz: 4aa61e6d488a8ec33a3ce2ee4764b05c3d292089577ba47d0fbcbdf180874324
4
+ data.tar.gz: 6a1d3daf6b0252963644461546f1eb93b27a512615e906c6388df5c22f4cc1ed
5
5
  SHA512:
6
- metadata.gz: a872e36574bd2f953a9f52454c7819f83def3423e73a9a4275b1dd86b79494cd78e4daf4ef1a18b45788bddb0e438a192c1afc7ae333f6f4454d0733488916a7
7
- data.tar.gz: 4df8a912dd4006b0151ccef5d38151823007f567f34b546e2ccbb87226845803a5a657196d6705c2b0cce7f6070e7a30d983cd68161bd8c18997fa3ae2fc66e3
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(msg = nil, *args, &block)
42
- log :debug, msg, *args, &block
41
+ def debug(*args, &block)
42
+ log :debug, *args, &block
43
43
  end
44
44
 
45
- def info(msg, *args, &block)
46
- log :info, msg, *args, &block
45
+ def info(*args, &block)
46
+ log :info, *args, &block
47
47
  end
48
48
 
49
- def warn(msg, *args, &block)
50
- log :warn, msg, *args, &block
49
+ def warn(*args, &block)
50
+ log :warn, *args, &block
51
51
  end
52
52
 
53
- def error(msg, *args, &block)
54
- log :error, msg, *args, &block
53
+ def error(*args, &block)
54
+ log :error, *args, &block
55
55
  end
56
56
 
57
- def success(msg, *args, &block)
58
- log :success, msg, *args, &block
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, msg, *args, &block)
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?
@@ -1,5 +1,5 @@
1
1
  module Simple
2
2
  module CLI
3
- VERSION = "0.2.14"
3
+ VERSION = "0.2.15"
4
4
  end
5
5
  end
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.14
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-23 00:00:00.000000000 Z
12
+ date: 2018-12-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake