paul_bunyan 1.5.1 → 1.5.2

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: 89333ed7f827d0e70565f0dc66d41e2e4b484d67
4
- data.tar.gz: cc170fc31eedb9a87fe0d45554dce618fc17e09a
3
+ metadata.gz: 171388d288887542610c069c558db27316b5126e
4
+ data.tar.gz: fe2ec569d2228aa11a55e2b16bdbcaacd5075a92
5
5
  SHA512:
6
- metadata.gz: a9f164490867d6f21bcb8ec03a35aa589fcf49899c67ab4759b4b3d6d6c83049524d798f107fc8fb42731f5dcfaeedb8d6893e757974d8f763c359f49b4474c5
7
- data.tar.gz: 57e98f587b4d7ad9132ffc939fe536d10b6003502e3285b0feb59251b6f81325a8b6b344254428cacf219f6e4c2d574c3b7bc0bffda07e18c06c54787c431d81
6
+ metadata.gz: 28d191b3a06b5d193e1bcf530a8e60ae0de981909695009d7610d256db62fb8ad459c1ec50b6efe43aa7af9c543cf34d516a52f91fc589a7f62801832d46f146
7
+ data.tar.gz: 960b65912617acd94f0eec1a67020586a2eb04243f770523e5861f24c1fee4e080c296058e76308e8e8fa0adaee4234ff8d023cc604cbd0dc6902630cdbb38fa
@@ -8,6 +8,18 @@ module PaulBunyan
8
8
  formatter.with_metadata(metadata) { yield self }
9
9
  end
10
10
 
11
+ def add_metadata(metadata)
12
+ formatter.add_metadata(metadata)
13
+ end
14
+
15
+ def remove_metadata(metadata)
16
+ formatter.remove_metadata(metadata)
17
+ end
18
+
19
+ def current_metadata
20
+ formatter.current_metadata
21
+ end
22
+
11
23
  def flush
12
24
  clear_metadata!
13
25
  super if defined?(super)
@@ -1,3 +1,3 @@
1
1
  module PaulBunyan
2
- VERSION = '1.5.1'
2
+ VERSION = '1.5.2'
3
3
  end
@@ -21,6 +21,21 @@ describe PaulBunyan::MetadataLogging do
21
21
  end
22
22
  end
23
23
 
24
+ it 'must delegate add_metadata to the formatter' do
25
+ expect(formatter).to receive(:add_metadata).with(foo: 'bar')
26
+ subject.add_metadata(foo: 'bar')
27
+ end
28
+
29
+ it 'must delegate current_metadata to the formatter' do
30
+ expect(formatter).to receive(:current_metadata).and_return({})
31
+ subject.current_metadata
32
+ end
33
+
34
+ it 'must delegate remove_metadata to the formatter' do
35
+ expect(formatter).to receive(:remove_metadata).with(foo: 'bar')
36
+ subject.remove_metadata(foo: 'bar')
37
+ end
38
+
24
39
  context '#flush' do
25
40
  it 'clears metadata on the formatter' do
26
41
  expect(formatter).to receive(:clear_metadata!)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paul_bunyan
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Duane Johnson