timber 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/lib/timber/current_context.rb +7 -1
- data/lib/timber/log_devices/http.rb +1 -0
- data/lib/timber/version.rb +1 -1
- data/spec/timber/current_context_spec.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 695d1eb93a0e891ecc1a3eb47ee4888d0d30fdbc
|
4
|
+
data.tar.gz: d1075432948895089dec419679a8fb12194a7631
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6318864253dec537d4e604161e5877873407744d57d738519fc24091a72126dbe3429cf4be85d106f09f28ab41d4513218407094d27aa296575429e22b30f8b9
|
7
|
+
data.tar.gz: 90cb2e402a913de26c656bb9b5bef4f49ebeff58e3b06c56b9c335888dd07f434d63f6da473cb993da1f9e537ccead50fabf36877bd7cd6652d98d105fa6a38d
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [2.6.1] - 2017-11-28
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Fixes an issue where a reference to the current custom context map was being capture during log line creation and then later self-modifying to make the context invalid.
|
15
|
+
|
10
16
|
## [2.6.0] - 2017-11-28
|
11
17
|
|
12
18
|
### Fixed
|
@@ -112,7 +118,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
112
118
|
instead of applying back pressure.
|
113
119
|
|
114
120
|
|
115
|
-
[Unreleased]: https://github.com/timberio/timber-ruby/compare/v2.6.
|
121
|
+
[Unreleased]: https://github.com/timberio/timber-ruby/compare/v2.6.1...HEAD
|
122
|
+
[2.6.1]: https://github.com/timberio/timber-ruby/compare/v2.6.0...v2.6.1
|
116
123
|
[2.6.0]: https://github.com/timberio/timber-ruby/compare/v2.5.1...v2.6.0
|
117
124
|
[2.5.1]: https://github.com/timberio/timber-ruby/compare/v2.5.0...v2.5.1
|
118
125
|
[2.5.0]: https://github.com/timberio/timber-ruby/compare/v2.4.0...v2.5.0
|
@@ -120,7 +120,13 @@ module Timber
|
|
120
120
|
# since the context can change as execution proceeds. Note that individual contexts
|
121
121
|
# should be immutable, and we implement snapshot caching as a result of this assumption.
|
122
122
|
def snapshot
|
123
|
-
@snapshot ||=
|
123
|
+
@snapshot ||= begin
|
124
|
+
snapshot = hash.clone
|
125
|
+
if snapshot.key?(:custom)
|
126
|
+
snapshot[:custom] = hash[:custom].clone
|
127
|
+
end
|
128
|
+
snapshot
|
129
|
+
end
|
124
130
|
end
|
125
131
|
|
126
132
|
private
|
data/lib/timber/version.rb
CHANGED
@@ -98,6 +98,18 @@ describe Timber::CurrentContext, :rails_23 => true do
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
+
describe ".snapshot" do
|
102
|
+
it "shoud properly snapshot custom contexts" do
|
103
|
+
snapshot = nil
|
104
|
+
|
105
|
+
described_class.with({build: {version: "1.0.0"}}) do
|
106
|
+
snapshot = described_class.instance.snapshot
|
107
|
+
end
|
108
|
+
|
109
|
+
expect(snapshot[:custom]).to eq({:build=>{:version=>"1.0.0"}})
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
101
113
|
describe ".with" do
|
102
114
|
it "should merge the context and cleanup on block exit" do
|
103
115
|
expect(described_class.instance.send(:hash)[:custom]).to be_nil
|