lenjador 2.2.2 → 2.3.1

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: 26f40334235faaeecd2b8f1e960641c98d7926be963cb485d57b5db7476abd9d
4
- data.tar.gz: 9417049506b81464afd16c050a72c0c9af8e4078c5b361aededb74c2fca2c117
3
+ metadata.gz: 6e373ec00cf24731fc0611b585db6def15102d206f0072e33a1329c89f550730
4
+ data.tar.gz: c0d90890e56e77fac9f3b6314384b23b06ad4f126bd4261d5bcd6278ce69f2f4
5
5
  SHA512:
6
- metadata.gz: 1005262582ae1ec5bc03445af4346f6011a5e32c553cdd86469dbcf9d380d8114a995f53649bd398d09674e145e023821e6717b70914f04bf5f96b5ec5429b00
7
- data.tar.gz: ed3a7f3f6afc47cc7e431217c1c103bd290d3a9bd51f2e8bc0a94e5fd8fa6cf8d6de538a89a4eb1834d5c938987aa0fbe2be23530b7e48761936a6e6e60c5a85
6
+ metadata.gz: 950c7b8956bb45752d81c6f7ca6e33b5f17cfef3f9cd0446844095f554ad5063a660919fb69370187612c0b6dc27dfa0d93c92cf303141eb49b86c8a1bcfa238
7
+ data.tar.gz: c55e96e52bfe7b9b3034067c487aaa7d3db191d8aa876c3eed69410f3091dcfa733e5b87e130a8f2ba03df2f2a4f41937d92d0964a720db8ff2dd021aaafbdf0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lenjador (2.2.2)
4
+ lenjador (2.3.1)
5
5
  lru_redux
6
6
  oj (~> 3.6)
7
7
 
data/lenjador.gemspec CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |gem|
7
7
  gem.name = 'lenjador'
8
- gem.version = '2.2.2'
8
+ gem.version = '2.3.1'
9
9
  gem.authors = ['Salemove']
10
10
  gem.email = ['support@salemove.com']
11
11
  gem.description = "It's lenjadoric"
data/lib/lenjador.rb CHANGED
@@ -28,6 +28,10 @@ class Lenjador
28
28
  @preprocessors = preprocessors
29
29
  end
30
30
 
31
+ def add(severity, *args, &block)
32
+ log(severity, *args, &block)
33
+ end
34
+
31
35
  def debug(*args, &block)
32
36
  log(Severity::DEBUG, *args, &block)
33
37
  end
@@ -37,6 +37,22 @@ describe Lenjador do
37
37
  end
38
38
  end
39
39
 
40
+ describe '#add' do
41
+ let(:adapter) { double }
42
+ let(:lenjador) { described_class.new(adapter, Lenjador::Severity::INFO, []) }
43
+
44
+ it 'logs with severity' do
45
+ expect(adapter).to receive(:log).with(Logger::INFO, message: 'info-msg').ordered
46
+ expect(adapter).to receive(:log).with(Logger::WARN, message: 'warn-msg').ordered
47
+ expect(adapter).to receive(:log).with(Logger::UNKNOWN, message: 'unknown-msg').ordered
48
+
49
+ lenjador.add(Logger::DEBUG, 'debug-msg')
50
+ lenjador.add(Logger::INFO, 'info-msg')
51
+ lenjador.add(Logger::WARN, 'warn-msg')
52
+ lenjador.add(Logger::UNKNOWN, 'unknown-msg')
53
+ end
54
+ end
55
+
40
56
  context 'when preprocessor defined' do
41
57
  let(:lenjador) { described_class.new(adapter, level, [preprocessor]) }
42
58
  let(:adapter) { double }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lenjador
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Salemove
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-14 00:00:00.000000000 Z
11
+ date: 2024-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lru_redux