timber 2.5.0 → 2.5.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a87f39b30172987e5484e2cc7a7b8141df304872
|
4
|
+
data.tar.gz: cbc461a99678fd533074bf6b8e9fdf91d4003bab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5af9920a09c610cc4fcdfb22c38db8b99e25f1b4232ed3c70350ec63965facef2ccd3f580e4b72cb08a8c795bcf8038a5ddc3ce22ea1c26968dc54f2453fe20
|
7
|
+
data.tar.gz: 693d57eba475629b40c9bbbf639ebc6f87af2298eea376b9cc881a76ea224eeb75b0b9d08377a3ebde2d05854ce1d1c006c32679072cd5a721b7c80fc41e1848
|
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.5.1] - 2017-10-27
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Ensure the new `content_length` field for HTTP request and response events are an integer.
|
15
|
+
|
10
16
|
## [2.5.0] - 2017-10-27
|
11
17
|
|
12
18
|
### Changed
|
@@ -97,7 +103,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
97
103
|
instead of applying back pressure.
|
98
104
|
|
99
105
|
|
100
|
-
[Unreleased]: https://github.com/timberio/timber-ruby/compare/v2.5.
|
106
|
+
[Unreleased]: https://github.com/timberio/timber-ruby/compare/v2.5.1...HEAD
|
107
|
+
[2.5.1]: https://github.com/timberio/timber-ruby/compare/v2.5.0...v2.5.1
|
101
108
|
[2.5.0]: https://github.com/timberio/timber-ruby/compare/v2.4.0...v2.5.0
|
102
109
|
[2.4.0]: https://github.com/timberio/timber-ruby/compare/v2.3.4...v2.4.0
|
103
110
|
[2.3.4]: https://github.com/timberio/timber-ruby/compare/v2.3.3...v2.3.4
|
@@ -14,7 +14,7 @@ module Timber
|
|
14
14
|
|
15
15
|
def initialize(attributes)
|
16
16
|
@body = attributes[:body] && Util::HTTPEvent.normalize_body(attributes[:body])
|
17
|
-
@content_length = attributes[:content_length]
|
17
|
+
@content_length = Timber::Util::Object.try(attributes[:content_length], :to_i)
|
18
18
|
@headers = Util::HTTPEvent.normalize_headers(attributes[:headers])
|
19
19
|
@host = attributes[:host]
|
20
20
|
@method = Util::HTTPEvent.normalize_method(attributes[:method]) || raise(ArgumentError.new(":method is required"))
|
@@ -13,7 +13,7 @@ module Timber
|
|
13
13
|
|
14
14
|
def initialize(attributes)
|
15
15
|
@body = attributes[:body] && Util::HTTPEvent.normalize_body(attributes[:body])
|
16
|
-
@content_length = attributes[:content_length]
|
16
|
+
@content_length = Timber::Util::Object.try(attributes[:content_length], :to_i)
|
17
17
|
@headers = Util::HTTPEvent.normalize_headers(attributes[:headers])
|
18
18
|
@http_context = attributes[:http_context]
|
19
19
|
@request_id = attributes[:request_id]
|
data/lib/timber/version.rb
CHANGED
@@ -4,6 +4,11 @@ require "spec_helper"
|
|
4
4
|
|
5
5
|
describe Timber::Events::HTTPRequest, :rails_23 => true do
|
6
6
|
describe ".initialize" do
|
7
|
+
it "should coerce content_length into an integer" do
|
8
|
+
event = described_class.new(:method => 'GET', :content_length => "123")
|
9
|
+
expect(event.content_length).to eq(123)
|
10
|
+
end
|
11
|
+
|
7
12
|
context "with a header filters" do
|
8
13
|
around(:each) do |example|
|
9
14
|
old_http_header_filters = Timber::Config.instance.http_header_filters
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
require "spec_helper"
|
4
|
+
|
5
|
+
describe Timber::Events::HTTPResponse, :rails_23 => true do
|
6
|
+
describe ".initialize" do
|
7
|
+
it "should coerce content_length into an integer" do
|
8
|
+
event = described_class.new(:content_length => "123", :status => 200, :time_ms => 1)
|
9
|
+
expect(event.content_length).to eq(123)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timber Technologies, Inc.
|
@@ -278,6 +278,7 @@ files:
|
|
278
278
|
- spec/timber/events/custom_spec.rb
|
279
279
|
- spec/timber/events/error_spec.rb
|
280
280
|
- spec/timber/events/http_request_spec.rb
|
281
|
+
- spec/timber/events/http_response_spec.rb
|
281
282
|
- spec/timber/events_spec.rb
|
282
283
|
- spec/timber/integrations/action_controller/log_subscriber_spec.rb
|
283
284
|
- spec/timber/integrations/action_dispatch/debug_exceptions_spec.rb
|
@@ -347,6 +348,7 @@ test_files:
|
|
347
348
|
- spec/timber/events/custom_spec.rb
|
348
349
|
- spec/timber/events/error_spec.rb
|
349
350
|
- spec/timber/events/http_request_spec.rb
|
351
|
+
- spec/timber/events/http_response_spec.rb
|
350
352
|
- spec/timber/events_spec.rb
|
351
353
|
- spec/timber/integrations/action_controller/log_subscriber_spec.rb
|
352
354
|
- spec/timber/integrations/action_dispatch/debug_exceptions_spec.rb
|