lamian 0.3.2 → 0.3.3

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
  SHA1:
3
- metadata.gz: 0310a9b4d028541db4e7cc99c4ecd98016f30c65
4
- data.tar.gz: 130abbf6ff6ef16c40b793f0be5abe69bf82fb77
3
+ metadata.gz: 6d930fc16394a1bd7581075c1954e1d88856e8ae
4
+ data.tar.gz: 0e8748b7f588666c1b691f367ff8420a723c3108
5
5
  SHA512:
6
- metadata.gz: efef0ea0d53a6221bd24ccd96f20795d79e5b333a38d5b6b864ac1b0bae36c16e41c4905fb049caf290b90953b543ae4b21827eadf5f7a5b29dd2d6fca7dcb72
7
- data.tar.gz: 4252b2ea0f6d99bd441714de3d48952702164176d69a4e6bbace90849777085e94aa3f07cc21cd7a7fb4bee0cc93fae35ee704f299905a6add843c9d34342a84
6
+ metadata.gz: 6986d58f6a9e1c3b4d99fbf879ddbb0995b93af1212e4ac8c6a20068cba411754cb40ef4c277cb50a84b0acd239c8a7c05dc077ba5f32e0c69cd9b698088b1fa
7
+ data.tar.gz: 44a3f5301eb75d07010548ec272ddca4ac155bcca5ab1d1c4f64ee59d3acb0cc5571f7067293c6c47ff12cbf260271ad609ff84be0b2ed0f29668312811a9342
data/lib/lamian/logger.rb CHANGED
@@ -26,17 +26,19 @@ module Lamian
26
26
  end
27
27
 
28
28
  def dump(format: nil)
29
- result = logdevs[-1].string.dup
30
- format ? apply_format(format, result) : result
29
+ result = logdevs[-1]&.string&.dup
30
+ apply_format!(format, result)
31
+ result
31
32
  end
32
33
 
33
34
  private
34
35
 
35
36
  attr_accessor :level, :logdevs, :formatter
36
37
 
37
- def apply_format(_format, result)
38
+ def apply_format!(format, result)
39
+ return unless format
40
+ return unless result
38
41
  result.gsub!(/\[\d{1,2}m/, '')
39
- result
40
42
  end
41
43
 
42
44
  def push_logdev(logdev)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Lamian
3
- VERSION = '0.3.2'
3
+ VERSION = '0.3.3'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lamian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - JelF
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-02 00:00:00.000000000 Z
11
+ date: 2016-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.41'
89
+ version: '0.45'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.41'
96
+ version: '0.45'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: pry
99
99
  requirement: !ruby/object:Gem::Requirement