airbrake-ruby 2.6.1 → 2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/airbrake-ruby/truncator.rb +2 -2
- data/lib/airbrake-ruby/version.rb +1 -1
- data/spec/truncator_spec.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfb305315b4b308b5b150ef07619a83e4415293b
|
4
|
+
data.tar.gz: 5cbe55d62543c114a2b30a89bf2a6af976b829e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a0b115c51be62a588c47e14b427ca813be479628ad73112cb5a819710e699b3c24bf83eeadb1cccdd0ea019f396fafbbd27fd2799a946d94023350a447e71a2
|
7
|
+
data.tar.gz: 0b38291654d4c8b2d6e26e22a981917bb12f63b249d70970b6dcf329a99a67b9528f36db31231395f877dff860f743893bcb39bdd6b0740617dcf4d4b031c507
|
@@ -33,11 +33,11 @@ module Airbrake
|
|
33
33
|
# @param [Set] seen The cache that helps to detect recursion
|
34
34
|
# @return [Object] truncated object
|
35
35
|
def truncate(object, seen = Set.new)
|
36
|
-
if seen.include?(object)
|
36
|
+
if seen.include?(object.object_id)
|
37
37
|
return CIRCULAR if CIRCULAR_TYPES.any? { |t| object.is_a?(t) }
|
38
38
|
return object
|
39
39
|
end
|
40
|
-
truncate_object(object, seen << object)
|
40
|
+
truncate_object(object, seen << object.object_id)
|
41
41
|
end
|
42
42
|
|
43
43
|
# Reduces maximum allowed size of hashes, arrays, sets & strings by half.
|
data/spec/truncator_spec.rb
CHANGED
@@ -218,6 +218,7 @@ RSpec.describe Airbrake::Truncator do
|
|
218
218
|
let(:object) do
|
219
219
|
{
|
220
220
|
errors: [
|
221
|
+
{ file: 'a' },
|
221
222
|
{ file: 'a' },
|
222
223
|
hashie.new.merge(file: 'bcde')
|
223
224
|
]
|
@@ -227,6 +228,7 @@ RSpec.describe Airbrake::Truncator do
|
|
227
228
|
it "truncates values" do
|
228
229
|
expect(subject).to eq(
|
229
230
|
errors: [
|
231
|
+
{ file: 'a' },
|
230
232
|
{ file: 'a' },
|
231
233
|
hashie.new.merge(file: 'bcd[Truncated]')
|
232
234
|
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airbrake Technologies, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|