bmc-daemon-lib 0.4.3 → 0.5.0

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: c009fddc3fe12bd4499a6897222032c8017e22aa
4
- data.tar.gz: 75e24e81cc9f9aed7a914da4fbf2ea72be1b0186
3
+ metadata.gz: 16ae424ba8d0838d48068487ec6739acda76b75d
4
+ data.tar.gz: fc5235c44fc15208b7305d3872400ba3cee78cca
5
5
  SHA512:
6
- metadata.gz: 256501ba31cab47598b1cf73d4c1a98add55644ad2c33f35258371d621a4a4c9e911464b03953f2700c3f4acaba6132c84085c4be5d26f0b2a9848b68d2b381b
7
- data.tar.gz: d8655959a71c3b8f8b5a759cd8a9467f8cef972fae3c23936d45d3cded55d3a60d4af39793f15b0ad42568a0c4f2797f3e9d55e41248eff242732dbedf278538
6
+ metadata.gz: b450c78b14f81ace23d7a06f51d62dd5b1715ab2b4d9c30777d2bac02bcaeb32a53dbe9852a2570d44bd3febd9582f6b5dae94e97c36ad3ed21a73eecdaebe92
7
+ data.tar.gz: f312782905efbecfd11c7403397913f80d0f2f38ce89ce28904d483c8b896c9c183c712e8b185d3814309315d29ba74ffb7152db3b3df922e58843e063268452
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bmc-daemon-lib (0.4.3)
4
+ bmc-daemon-lib (0.5.0)
5
5
  chamber (~> 2.9.1)
6
6
 
7
7
  GEM
@@ -17,7 +17,7 @@ GEM
17
17
  rspec-core (~> 3.5.0)
18
18
  rspec-expectations (~> 3.5.0)
19
19
  rspec-mocks (~> 3.5.0)
20
- rspec-core (3.5.3)
20
+ rspec-core (3.5.4)
21
21
  rspec-support (~> 3.5.0)
22
22
  rspec-expectations (3.5.0)
23
23
  diff-lcs (>= 1.2.0, < 2.0)
@@ -38,4 +38,4 @@ DEPENDENCIES
38
38
  rspec
39
39
 
40
40
  BUNDLED WITH
41
- 1.12.5
41
+ 1.13.5
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  # Project version
4
- spec.version = "0.4.3"
4
+ spec.version = "0.5.0"
5
5
 
6
6
  # Project description
7
7
  spec.name = "bmc-daemon-lib"
@@ -45,15 +45,29 @@ module BmcDaemonLib
45
45
  messages = []
46
46
  messages << sprintf(@format[:text], message) if message
47
47
 
48
+ # Add raw lines
49
+ if context.nil? && (details.is_a? Array)
50
+ messages = details
51
+
48
52
  # Add details from array
49
- details.each do |line|
50
- messages << sprintf(@format[:array], line)
51
- end if details.is_a? Array
53
+ elsif details.is_a? Array
54
+ details.each do |line|
55
+ messages << sprintf(@format[:array], line)
56
+ end
52
57
 
53
58
  # Add details from hash
54
- details.each do |key, value|
55
- messages << sprintf(@format[:hash], key, value)
56
- end if details.is_a? Hash
59
+ elsif details.is_a? Hash
60
+ details.each do |key, value|
61
+ messages << sprintf(@format[:hash], key, value)
62
+ end
63
+
64
+ # Add each line of "details" after split
65
+ elsif details.is_a? String
66
+ details.lines.each do |line|
67
+ messages << line unless line.empty?
68
+ end
69
+
70
+ end
57
71
 
58
72
  # Pass all that stuff to my parent
59
73
  super severity, messages, context
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bmc-daemon-lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno MEDICI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-21 00:00:00.000000000 Z
11
+ date: 2016-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.6.6
111
+ rubygems_version: 2.5.1
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: 'Shared utilities to build a daemon: logger, configuration, helpers'