carioca 2.0.5 → 2.0.6

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: 8c9296f0a424070e2bd252fe15432b820cfb6a3e9bd52f45e9fd2a0430d06174
4
- data.tar.gz: 5815c387bafb81c50cb19e659d5440ab8db1654e873be742eaac9857433ad7fd
3
+ metadata.gz: 13022502526464ca7b3d4a3a7e0978da16561ba5ff5d122ecfe342490e4cf9e6
4
+ data.tar.gz: cf459b788caaab93897fa016979ff71330327ee6298924630d4bfd65810f1a0e
5
5
  SHA512:
6
- metadata.gz: 34a33f5e613a1530930cf0e6e53f8c1179a66d8eda41a440766ffeaf6d9060c44efa945ed40af22679e6e7ac90e1c3537222cf82473caaa315561b241b47814a
7
- data.tar.gz: ab2fa5e329b95df2e04f87501ac8ab74a8450e16dbeff5cc61aa374455b4b7bc0c5c8365e198907fb2955e0c786fe3a8011292a33253545653e14ac3be1f9e5c
6
+ metadata.gz: af1f9349fcbde3d58278681fe4a2d8ac103f6cd1f9a6b16604cc456bf958c6f9f3a69c2c4eaef031a37cbd5a85061e6a8015ff4ba8f6fd9c9abe9c73d9fbd6dc
7
+ data.tar.gz: 8bb31c85ce579f72588fc54376e33701baf8e683929627e5edd07aed47bb9a1d9dfeeb5039eab8aa9f22bef8462812a6ebbe5a59c3138245ef2e77fac948af9d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.5
1
+ 2.0.6
@@ -41,7 +41,8 @@ module Carioca
41
41
  ok: { value: "\u{1F44D}", alt: '[+]', text: '(OK)' },
42
42
  success: { value: "\u{1F4AA}", alt: '[+]', text: '(SUCCESS)' },
43
43
  debug: { value: "\u{1F41B}", alt: '[D]', text: '(DEBUG)' },
44
- flat: { value: '', alt: '' }
44
+ flat: { value: '', alt: '' },
45
+ skip: { value: 'U{23E9}', alt: '[I]', text: '(SKIPPED)'}
45
46
  }.freeze
46
47
  LEVELS = %i[debug info warn error fatal unknown].freeze
47
48
  ALIAS = {
@@ -55,7 +56,8 @@ module Carioca
55
56
  sending: :info,
56
57
  calling: :info,
57
58
  receive: :info,
58
- success: :info
59
+ success: :info,
60
+ skipped: :info
59
61
 
60
62
  }.freeze
61
63
  end
@@ -69,15 +71,15 @@ module Carioca
69
71
  @@colors = COLORS.dup
70
72
  @@emoji = EMOJI.dup
71
73
 
72
- MODE = %i[mono dual].freeze
74
+ MODE = %i[mono dual log].freeze
73
75
 
74
76
  LEVELS.each do |method|
75
- define_method(method) do |message, session = '', source = 'Carioca->Output'|
77
+ define_method(method) do |message, session = nil, source = 'Carioca->Output'|
76
78
  display(level: method, message: message, session: session, source: source)
77
79
  end
78
80
  end
79
81
  @@alias.each_key do |method|
80
- define_method(method) do |message, session = '', source = 'Carioca->Output'|
82
+ define_method(method) do |message, session = nil, source = 'Carioca->Output'|
81
83
  display(level: method, message: message, session: session, source: source)
82
84
  end
83
85
  end
@@ -100,7 +102,7 @@ module Carioca
100
102
  raise 'Alias must be a Symbol' unless newalias.instance_of?(Symbol)
101
103
  raise "Bad Level : #{level}" unless LEVELS.include? level
102
104
 
103
- self.class.define_method(newalias) do |message, session = ''|
105
+ self.class.define_method(newalias) do |message, session = nil|
104
106
  display({ level: newalias, message: message, session: session })
105
107
  end
106
108
  end
@@ -160,7 +162,7 @@ module Carioca
160
162
  # @option params [String] :message text
161
163
  # @option params [String] :session an id/timestamp of session
162
164
  def display(level:, message:, session:, source:)
163
- message << "(#{session})" if session
165
+ message << " (#{session})" if session
164
166
  save = message.dup
165
167
  target_level = @@alias.keys.include?(level) ? @@alias[level] : level
166
168
  if @active_levels.include? target_level
@@ -178,7 +180,7 @@ module Carioca
178
180
  block = proc { save }
179
181
  @logger.send target_level, source, &block
180
182
  end
181
- puts message
183
+ puts message if @mode == :mono or @mode == :dual
182
184
  end
183
185
  end
184
186
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carioca
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Romain GEORGES
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-26 00:00:00.000000000 Z
11
+ date: 2022-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge
@@ -252,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
252
  - !ruby/object:Gem::Version
253
253
  version: '0'
254
254
  requirements: []
255
- rubygems_version: 3.3.5
255
+ rubygems_version: 3.1.2
256
256
  signing_key:
257
257
  specification_version: 4
258
258
  summary: 'Carioca : Container And Registry with Inversion Of Control for your Applications'