airbrake-ruby 4.8.0 → 4.11.1
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.rb +101 -25
- data/lib/airbrake-ruby/async_sender.rb +3 -3
- data/lib/airbrake-ruby/backtrace.rb +2 -2
- data/lib/airbrake-ruby/benchmark.rb +1 -1
- data/lib/airbrake-ruby/code_hunk.rb +1 -1
- data/lib/airbrake-ruby/config.rb +1 -1
- data/lib/airbrake-ruby/config/validator.rb +3 -3
- data/lib/airbrake-ruby/deploy_notifier.rb +1 -1
- data/lib/airbrake-ruby/filters/exception_attributes_filter.rb +2 -2
- data/lib/airbrake-ruby/filters/git_last_checkout_filter.rb +2 -2
- data/lib/airbrake-ruby/filters/keys_filter.rb +1 -1
- data/lib/airbrake-ruby/filters/sql_filter.rb +3 -3
- data/lib/airbrake-ruby/filters/thread_filter.rb +1 -1
- data/lib/airbrake-ruby/grouppable.rb +12 -0
- data/lib/airbrake-ruby/inspectable.rb +2 -2
- data/lib/airbrake-ruby/mergeable.rb +12 -0
- data/lib/airbrake-ruby/notice.rb +7 -7
- data/lib/airbrake-ruby/notice_notifier.rb +3 -2
- data/lib/airbrake-ruby/performance_breakdown.rb +12 -6
- data/lib/airbrake-ruby/performance_notifier.rb +69 -22
- data/lib/airbrake-ruby/query.rb +15 -11
- data/lib/airbrake-ruby/queue.rb +56 -0
- data/lib/airbrake-ruby/request.rb +14 -12
- data/lib/airbrake-ruby/stat.rb +1 -1
- data/lib/airbrake-ruby/version.rb +1 -1
- data/spec/airbrake_spec.rb +135 -45
- data/spec/async_sender_spec.rb +4 -4
- data/spec/backtrace_spec.rb +18 -18
- data/spec/code_hunk_spec.rb +9 -9
- data/spec/config/validator_spec.rb +5 -5
- data/spec/config_spec.rb +5 -9
- data/spec/deploy_notifier_spec.rb +2 -2
- data/spec/filter_chain_spec.rb +1 -1
- data/spec/filters/dependency_filter_spec.rb +1 -1
- data/spec/filters/gem_root_filter_spec.rb +5 -5
- data/spec/filters/git_last_checkout_filter_spec.rb +1 -1
- data/spec/filters/git_repository_filter.rb +1 -1
- data/spec/filters/git_revision_filter_spec.rb +10 -10
- data/spec/filters/keys_blacklist_spec.rb +22 -22
- data/spec/filters/keys_whitelist_spec.rb +21 -21
- data/spec/filters/root_directory_filter_spec.rb +5 -5
- data/spec/filters/sql_filter_spec.rb +53 -55
- data/spec/filters/system_exit_filter_spec.rb +1 -1
- data/spec/filters/thread_filter_spec.rb +28 -28
- data/spec/fixtures/project_root/code.rb +9 -9
- data/spec/notice_notifier/options_spec.rb +12 -12
- data/spec/notice_notifier_spec.rb +18 -18
- data/spec/notice_spec.rb +5 -5
- data/spec/performance_breakdown_spec.rb +11 -0
- data/spec/performance_notifier_spec.rb +243 -72
- data/spec/query_spec.rb +11 -1
- data/spec/queue_spec.rb +21 -0
- data/spec/request_spec.rb +11 -1
- data/spec/response_spec.rb +8 -8
- data/spec/spec_helper.rb +2 -2
- data/spec/stat_spec.rb +2 -2
- data/spec/sync_sender_spec.rb +12 -12
- data/spec/tdigest_spec.rb +6 -6
- data/spec/thread_pool_spec.rb +5 -5
- data/spec/timed_trace_spec.rb +1 -1
- data/spec/truncator_spec.rb +12 -12
- metadata +7 -2
data/spec/query_spec.rb
CHANGED
@@ -2,10 +2,20 @@ RSpec.describe Airbrake::Query do
|
|
2
2
|
describe "#stash" do
|
3
3
|
subject do
|
4
4
|
described_class.new(
|
5
|
-
method: 'GET', route: '/', query: '', start_time: Time.now
|
5
|
+
method: 'GET', route: '/', query: '', start_time: Time.now,
|
6
6
|
)
|
7
7
|
end
|
8
8
|
|
9
9
|
it { is_expected.to respond_to(:stash) }
|
10
10
|
end
|
11
|
+
|
12
|
+
describe "#end_time" do
|
13
|
+
it "is always equal to start_time + 1 second by default" do
|
14
|
+
time = Time.now
|
15
|
+
query = described_class.new(
|
16
|
+
method: 'GET', route: '/', query: '', start_time: time,
|
17
|
+
)
|
18
|
+
expect(query.end_time).to eq(time + 1)
|
19
|
+
end
|
20
|
+
end
|
11
21
|
end
|
data/spec/queue_spec.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
RSpec.describe Airbrake::Queue do
|
2
|
+
subject { described_class.new(queue: 'bananas', error_count: 0) }
|
3
|
+
|
4
|
+
describe "#ignore" do
|
5
|
+
it { is_expected.to respond_to(:ignore!) }
|
6
|
+
end
|
7
|
+
|
8
|
+
describe "#stash" do
|
9
|
+
it { is_expected.to respond_to(:stash) }
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "#end_time" do
|
13
|
+
it "is always equal to start_time + 1 second by default" do
|
14
|
+
time = Time.now
|
15
|
+
queue = described_class.new(
|
16
|
+
queue: 'bananas', error_count: 0, start_time: time,
|
17
|
+
)
|
18
|
+
expect(queue.end_time).to eq(time + 1)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/spec/request_spec.rb
CHANGED
@@ -2,10 +2,20 @@ RSpec.describe Airbrake::Request do
|
|
2
2
|
describe "#stash" do
|
3
3
|
subject do
|
4
4
|
described_class.new(
|
5
|
-
method: 'GET', route: '/', status_code: 200, start_time: Time.now
|
5
|
+
method: 'GET', route: '/', status_code: 200, start_time: Time.now,
|
6
6
|
)
|
7
7
|
end
|
8
8
|
|
9
9
|
it { is_expected.to respond_to(:stash) }
|
10
10
|
end
|
11
|
+
|
12
|
+
describe "#end_time" do
|
13
|
+
it "is always equal to start_time + 1 second by default" do
|
14
|
+
time = Time.now
|
15
|
+
request = described_class.new(
|
16
|
+
method: 'GET', route: '/', status_code: 200, start_time: time,
|
17
|
+
)
|
18
|
+
expect(request.end_time).to eq(time + 1)
|
19
|
+
end
|
20
|
+
end
|
11
21
|
end
|
data/spec/response_spec.rb
CHANGED
@@ -4,7 +4,7 @@ RSpec.describe Airbrake::Response do
|
|
4
4
|
context "when response code is #{code}" do
|
5
5
|
it "logs response body" do
|
6
6
|
expect(Airbrake::Loggable.instance).to receive(:debug).with(
|
7
|
-
/Airbrake::Response \(#{code}\): {}
|
7
|
+
/Airbrake::Response \(#{code}\): {}/,
|
8
8
|
)
|
9
9
|
described_class.parse(OpenStruct.new(code: code, body: '{}'))
|
10
10
|
end
|
@@ -15,10 +15,10 @@ RSpec.describe Airbrake::Response do
|
|
15
15
|
context "when response code is #{code}" do
|
16
16
|
it "logs response message" do
|
17
17
|
expect(Airbrake::Loggable.instance).to receive(:error).with(
|
18
|
-
/Airbrake: foo
|
18
|
+
/Airbrake: foo/,
|
19
19
|
)
|
20
20
|
described_class.parse(
|
21
|
-
OpenStruct.new(code: code, body: '{"message":"foo"}')
|
21
|
+
OpenStruct.new(code: code, body: '{"message":"foo"}'),
|
22
22
|
)
|
23
23
|
end
|
24
24
|
end
|
@@ -29,7 +29,7 @@ RSpec.describe Airbrake::Response do
|
|
29
29
|
|
30
30
|
it "logs response message" do
|
31
31
|
expect(Airbrake::Loggable.instance).to receive(:error).with(
|
32
|
-
/Airbrake: rate limited
|
32
|
+
/Airbrake: rate limited/,
|
33
33
|
)
|
34
34
|
described_class.parse(response)
|
35
35
|
end
|
@@ -41,7 +41,7 @@ RSpec.describe Airbrake::Response do
|
|
41
41
|
resp = described_class.parse(response)
|
42
42
|
expect(resp).to include(
|
43
43
|
'error' => '**Airbrake: rate limited',
|
44
|
-
'rate_limit_reset' => time
|
44
|
+
'rate_limit_reset' => time,
|
45
45
|
)
|
46
46
|
end
|
47
47
|
end
|
@@ -51,7 +51,7 @@ RSpec.describe Airbrake::Response do
|
|
51
51
|
|
52
52
|
it "logs response body" do
|
53
53
|
expect(Airbrake::Loggable.instance).to receive(:error).with(
|
54
|
-
/Airbrake: unexpected code \(500\)\. Body: foo
|
54
|
+
/Airbrake: unexpected code \(500\)\. Body: foo/,
|
55
55
|
)
|
56
56
|
described_class.parse(response)
|
57
57
|
end
|
@@ -73,14 +73,14 @@ RSpec.describe Airbrake::Response do
|
|
73
73
|
|
74
74
|
it "logs response body" do
|
75
75
|
expect(Airbrake::Loggable.instance).to receive(:error).with(
|
76
|
-
/Airbrake: error while parsing body \(.*unexpected token.*\)\. Body: foo
|
76
|
+
/Airbrake: error while parsing body \(.*unexpected token.*\)\. Body: foo/,
|
77
77
|
)
|
78
78
|
described_class.parse(response)
|
79
79
|
end
|
80
80
|
|
81
81
|
it "returns an error message" do
|
82
82
|
expect(described_class.parse(response)['error']).to match(
|
83
|
-
/\A#<JSON::ParserError
|
83
|
+
/\A#<JSON::ParserError.+>/,
|
84
84
|
)
|
85
85
|
end
|
86
86
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -47,7 +47,7 @@ class AirbrakeTestError < RuntimeError
|
|
47
47
|
"/home/kyrylo/.gem/ruby/2.2.2/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:88:in `run'",
|
48
48
|
"/home/kyrylo/.gem/ruby/2.2.2/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:73:in `run'",
|
49
49
|
"/home/kyrylo/.gem/ruby/2.2.2/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:41:in `invoke'",
|
50
|
-
"/home/kyrylo/.gem/ruby/2.2.2/gems/rspec-core-3.3.2/exe/rspec:4:in `<main>'"
|
50
|
+
"/home/kyrylo/.gem/ruby/2.2.2/gems/rspec-core-3.3.2/exe/rspec:4:in `<main>'",
|
51
51
|
]
|
52
52
|
# rubocop:enable Metrics/LineLength
|
53
53
|
end
|
@@ -78,7 +78,7 @@ class JavaAirbrakeTestError < AirbrakeTestError
|
|
78
78
|
"opt.rubies.jruby_minus_9_dot_0_dot_0_dot_0.bin.irb.RUBY$script(/opt/rubies/jruby-9.0.0.0/bin/irb:13)",
|
79
79
|
"org.jruby.ir.Compiler$1.load(Compiler.java:111)",
|
80
80
|
"org.jruby.Main.run(Main.java:225)",
|
81
|
-
"org.jruby.Main.main(Main.java:197)"
|
81
|
+
"org.jruby.Main.main(Main.java:197)",
|
82
82
|
]
|
83
83
|
# rubocop:enable Metrics/LineLength
|
84
84
|
end
|
data/spec/stat_spec.rb
CHANGED
@@ -5,7 +5,7 @@ RSpec.describe Airbrake::Stat do
|
|
5
5
|
'count' => 0,
|
6
6
|
'sum' => 0.0,
|
7
7
|
'sumsq' => 0.0,
|
8
|
-
'tdigest' => 'AAAAAkA0AAAAAAAAAAAAAA=='
|
8
|
+
'tdigest' => 'AAAAAkA0AAAAAAAAAAAAAA==',
|
9
9
|
)
|
10
10
|
end
|
11
11
|
end
|
@@ -34,7 +34,7 @@ RSpec.describe Airbrake::Stat do
|
|
34
34
|
describe "#inspect" do
|
35
35
|
it "provides custom inspect output" do
|
36
36
|
expect(subject.inspect).to eq(
|
37
|
-
'#<struct Airbrake::Stat count=0, sum=0.0, sumsq=0.0>'
|
37
|
+
'#<struct Airbrake::Stat count=0, sum=0.0, sumsq=0.0>',
|
38
38
|
)
|
39
39
|
end
|
40
40
|
end
|
data/spec/sync_sender_spec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
RSpec.describe Airbrake::SyncSender do
|
2
2
|
before do
|
3
3
|
Airbrake::Config.instance = Airbrake::Config.new(
|
4
|
-
project_id: 1, project_key: 'banana'
|
4
|
+
project_id: 1, project_key: 'banana',
|
5
5
|
)
|
6
6
|
end
|
7
7
|
|
@@ -17,8 +17,8 @@ RSpec.describe Airbrake::SyncSender do
|
|
17
17
|
subject.send({}, promise)
|
18
18
|
expect(
|
19
19
|
a_request(:post, endpoint).with(
|
20
|
-
headers: { 'Content-Type' => 'application/json' }
|
21
|
-
)
|
20
|
+
headers: { 'Content-Type' => 'application/json' },
|
21
|
+
),
|
22
22
|
).to have_been_made.once
|
23
23
|
end
|
24
24
|
|
@@ -27,9 +27,9 @@ RSpec.describe Airbrake::SyncSender do
|
|
27
27
|
expect(
|
28
28
|
a_request(:post, endpoint).with(
|
29
29
|
headers: {
|
30
|
-
'User-Agent' => %r{airbrake-ruby/\d+\.\d+\.\d+ Ruby/\d+\.\d+\.\d+}
|
31
|
-
}
|
32
|
-
)
|
30
|
+
'User-Agent' => %r{airbrake-ruby/\d+\.\d+\.\d+ Ruby/\d+\.\d+\.\d+},
|
31
|
+
},
|
32
|
+
),
|
33
33
|
).to have_been_made.once
|
34
34
|
end
|
35
35
|
|
@@ -37,8 +37,8 @@ RSpec.describe Airbrake::SyncSender do
|
|
37
37
|
subject.send({}, promise)
|
38
38
|
expect(
|
39
39
|
a_request(:post, endpoint).with(
|
40
|
-
headers: { 'Authorization' => 'Bearer banana' }
|
41
|
-
)
|
40
|
+
headers: { 'Authorization' => 'Bearer banana' },
|
41
|
+
),
|
42
42
|
).to have_been_made.once
|
43
43
|
end
|
44
44
|
|
@@ -47,7 +47,7 @@ RSpec.describe Airbrake::SyncSender do
|
|
47
47
|
allow(subject).to receive(:build_https).and_return(https)
|
48
48
|
allow(https).to receive(:request).and_raise(StandardError.new('foo'))
|
49
49
|
expect(Airbrake::Loggable.instance).to receive(:error).with(
|
50
|
-
/HTTP error: foo
|
50
|
+
/HTTP error: foo/,
|
51
51
|
)
|
52
52
|
expect(subject.send({}, promise)).to be_an(Airbrake::Promise)
|
53
53
|
expect(promise.value).to eq('error' => '**Airbrake: HTTP error: foo')
|
@@ -69,10 +69,10 @@ RSpec.describe Airbrake::SyncSender do
|
|
69
69
|
notice = Airbrake::Notice.new(ex)
|
70
70
|
|
71
71
|
expect(Airbrake::Loggable.instance).to receive(:error).with(
|
72
|
-
/data was not sent
|
72
|
+
/data was not sent/,
|
73
73
|
)
|
74
74
|
expect(Airbrake::Loggable.instance).to receive(:error).with(
|
75
|
-
/truncation failed
|
75
|
+
/truncation failed/,
|
76
76
|
)
|
77
77
|
expect(subject.send(notice, promise)).to be_an(Airbrake::Promise)
|
78
78
|
expect(promise.value)
|
@@ -87,7 +87,7 @@ RSpec.describe Airbrake::SyncSender do
|
|
87
87
|
stub_request(:post, endpoint).to_return(
|
88
88
|
status: 429,
|
89
89
|
body: '{"message":"IP is rate limited"}',
|
90
|
-
headers: { 'X-RateLimit-Delay' => '1' }
|
90
|
+
headers: { 'X-RateLimit-Delay' => '1' },
|
91
91
|
)
|
92
92
|
end
|
93
93
|
|
data/spec/tdigest_spec.rb
CHANGED
@@ -29,7 +29,7 @@ RSpec.describe Airbrake::TDigest do
|
|
29
29
|
new_tdigest = described_class.from_bytes(bytes)
|
30
30
|
# Expect some rounding error due to compression
|
31
31
|
expect(new_tdigest.percentile(0.9).round(5)).to eq(
|
32
|
-
subject.percentile(0.9).round(5)
|
32
|
+
subject.percentile(0.9).round(5),
|
33
33
|
)
|
34
34
|
expect(new_tdigest.as_small_bytes).to eq(bytes)
|
35
35
|
end
|
@@ -126,8 +126,8 @@ RSpec.describe Airbrake::TDigest do
|
|
126
126
|
113270270.27027026,
|
127
127
|
154459459.45945945,
|
128
128
|
123829787.23404256,
|
129
|
-
103191489.36170213
|
130
|
-
]
|
129
|
+
103191489.36170213,
|
130
|
+
],
|
131
131
|
)
|
132
132
|
end
|
133
133
|
|
@@ -166,13 +166,13 @@ RSpec.describe Airbrake::TDigest do
|
|
166
166
|
it "has the parameters of the left argument (the calling tdigest)" do
|
167
167
|
new_tdigest = subject + @other
|
168
168
|
expect(new_tdigest.instance_variable_get(:@delta)).to eq(
|
169
|
-
subject.instance_variable_get(:@delta)
|
169
|
+
subject.instance_variable_get(:@delta),
|
170
170
|
)
|
171
171
|
expect(new_tdigest.instance_variable_get(:@k)).to eq(
|
172
|
-
subject.instance_variable_get(:@k)
|
172
|
+
subject.instance_variable_get(:@k),
|
173
173
|
)
|
174
174
|
expect(new_tdigest.instance_variable_get(:@cx)).to eq(
|
175
|
-
subject.instance_variable_get(:@cx)
|
175
|
+
subject.instance_variable_get(:@cx),
|
176
176
|
)
|
177
177
|
end
|
178
178
|
|
data/spec/thread_pool_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe Airbrake::ThreadPool do
|
|
7
7
|
described_class.new(
|
8
8
|
worker_size: worker_size,
|
9
9
|
queue_size: queue_size,
|
10
|
-
block: proc { |message| tasks << message }
|
10
|
+
block: proc { |message| tasks << message },
|
11
11
|
)
|
12
12
|
end
|
13
13
|
|
@@ -35,7 +35,7 @@ RSpec.describe Airbrake::ThreadPool do
|
|
35
35
|
described_class.new(
|
36
36
|
worker_size: 1,
|
37
37
|
queue_size: 1,
|
38
|
-
block: proc { |message| tasks << message }
|
38
|
+
block: proc { |message| tasks << message },
|
39
39
|
)
|
40
40
|
end
|
41
41
|
|
@@ -98,11 +98,11 @@ RSpec.describe Airbrake::ThreadPool do
|
|
98
98
|
context "when there's some work to do" do
|
99
99
|
it "logs how many tasks are left to process" do
|
100
100
|
thread_pool = described_class.new(
|
101
|
-
worker_size: 0, queue_size: 2, block: proc {}
|
101
|
+
worker_size: 0, queue_size: 2, block: proc {},
|
102
102
|
)
|
103
103
|
|
104
104
|
expect(Airbrake::Loggable.instance).to receive(:debug).with(
|
105
|
-
/waiting to process \d+ task\(s\)
|
105
|
+
/waiting to process \d+ task\(s\)/,
|
106
106
|
)
|
107
107
|
expect(Airbrake::Loggable.instance).to receive(:debug).with(/closed/)
|
108
108
|
|
@@ -112,7 +112,7 @@ RSpec.describe Airbrake::ThreadPool do
|
|
112
112
|
|
113
113
|
it "waits until the queue gets empty" do
|
114
114
|
thread_pool = described_class.new(
|
115
|
-
worker_size: 1, queue_size: 2, block: proc {}
|
115
|
+
worker_size: 1, queue_size: 2, block: proc {},
|
116
116
|
)
|
117
117
|
|
118
118
|
10.times { subject << 1 }
|
data/spec/timed_trace_spec.rb
CHANGED
data/spec/truncator_spec.rb
CHANGED
@@ -25,7 +25,7 @@ RSpec.describe Airbrake::Truncator do
|
|
25
25
|
banana: multiply_by_2_max_len('a'),
|
26
26
|
kiwi: multiply_by_2_max_len('b'),
|
27
27
|
strawberry: 'c',
|
28
|
-
shrimp: 'd'
|
28
|
+
shrimp: 'd',
|
29
29
|
}.freeze
|
30
30
|
end
|
31
31
|
|
@@ -34,7 +34,7 @@ RSpec.describe Airbrake::Truncator do
|
|
34
34
|
expect(subject).to be_frozen
|
35
35
|
|
36
36
|
expect(subject).to eq(
|
37
|
-
banana: 'aaa[Truncated]', kiwi: 'bbb[Truncated]', strawberry: 'c'
|
37
|
+
banana: 'aaa[Truncated]', kiwi: 'bbb[Truncated]', strawberry: 'c',
|
38
38
|
)
|
39
39
|
expect(subject[:banana]).to be_frozen
|
40
40
|
expect(subject[:kiwi]).to be_frozen
|
@@ -48,7 +48,7 @@ RSpec.describe Airbrake::Truncator do
|
|
48
48
|
multiply_by_2_max_len('a'),
|
49
49
|
'b',
|
50
50
|
multiply_by_2_max_len('c'),
|
51
|
-
'd'
|
51
|
+
'd',
|
52
52
|
].freeze
|
53
53
|
end
|
54
54
|
|
@@ -69,7 +69,7 @@ RSpec.describe Airbrake::Truncator do
|
|
69
69
|
multiply_by_2_max_len('a'),
|
70
70
|
'b',
|
71
71
|
multiply_by_2_max_len('c'),
|
72
|
-
'd'
|
72
|
+
'd',
|
73
73
|
]).freeze
|
74
74
|
end
|
75
75
|
|
@@ -78,7 +78,7 @@ RSpec.describe Airbrake::Truncator do
|
|
78
78
|
expect(subject).to be_frozen
|
79
79
|
|
80
80
|
expect(subject).to eq(
|
81
|
-
Set.new(['aaa[Truncated]', 'b', 'ccc[Truncated]'])
|
81
|
+
Set.new(['aaa[Truncated]', 'b', 'ccc[Truncated]']),
|
82
82
|
)
|
83
83
|
expect(subject).to be_frozen
|
84
84
|
end
|
@@ -166,7 +166,7 @@ RSpec.describe Airbrake::Truncator do
|
|
166
166
|
|
167
167
|
it "prevents recursion" do
|
168
168
|
expect(subject).to eq(
|
169
|
-
Set.new(['[Circular]', { k: '[Circular]' }, 'aaa[Truncated]'])
|
169
|
+
Set.new(['[Circular]', { k: '[Circular]' }, 'aaa[Truncated]']),
|
170
170
|
)
|
171
171
|
expect(subject).to be_frozen
|
172
172
|
end
|
@@ -177,13 +177,13 @@ RSpec.describe Airbrake::Truncator do
|
|
177
177
|
{
|
178
178
|
a: multiply_by_2_max_len('a'),
|
179
179
|
b: multiply_by_2_max_len('b'),
|
180
|
-
c: { d: multiply_by_2_max_len('d'), e: 'e' }
|
180
|
+
c: { d: multiply_by_2_max_len('d'), e: 'e' },
|
181
181
|
}
|
182
182
|
end
|
183
183
|
|
184
184
|
it "truncates the long strings" do
|
185
185
|
expect(subject).to eq(
|
186
|
-
a: 'aaa[Truncated]', b: 'bbb[Truncated]', c: { d: 'ddd[Truncated]', e: 'e' }
|
186
|
+
a: 'aaa[Truncated]', b: 'bbb[Truncated]', c: { d: 'ddd[Truncated]', e: 'e' },
|
187
187
|
)
|
188
188
|
expect(subject).to be_frozen
|
189
189
|
end
|
@@ -218,8 +218,8 @@ RSpec.describe Airbrake::Truncator do
|
|
218
218
|
errors: [
|
219
219
|
{ file: 'a' },
|
220
220
|
{ file: 'a' },
|
221
|
-
hashie.new.merge(file: 'bcde')
|
222
|
-
]
|
221
|
+
hashie.new.merge(file: 'bcde'),
|
222
|
+
],
|
223
223
|
}
|
224
224
|
end
|
225
225
|
|
@@ -228,8 +228,8 @@ RSpec.describe Airbrake::Truncator do
|
|
228
228
|
errors: [
|
229
229
|
{ file: 'a' },
|
230
230
|
{ file: 'a' },
|
231
|
-
hashie.new.merge(file: 'bcd[Truncated]')
|
232
|
-
]
|
231
|
+
hashie.new.merge(file: 'bcd[Truncated]'),
|
232
|
+
],
|
233
233
|
)
|
234
234
|
expect(subject).to be_frozen
|
235
235
|
end
|
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: 4.
|
4
|
+
version: 4.11.1
|
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: 2019-
|
11
|
+
date: 2019-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbtree3
|
@@ -62,10 +62,12 @@ files:
|
|
62
62
|
- lib/airbrake-ruby/filters/sql_filter.rb
|
63
63
|
- lib/airbrake-ruby/filters/system_exit_filter.rb
|
64
64
|
- lib/airbrake-ruby/filters/thread_filter.rb
|
65
|
+
- lib/airbrake-ruby/grouppable.rb
|
65
66
|
- lib/airbrake-ruby/hash_keyable.rb
|
66
67
|
- lib/airbrake-ruby/ignorable.rb
|
67
68
|
- lib/airbrake-ruby/inspectable.rb
|
68
69
|
- lib/airbrake-ruby/loggable.rb
|
70
|
+
- lib/airbrake-ruby/mergeable.rb
|
69
71
|
- lib/airbrake-ruby/monotonic_time.rb
|
70
72
|
- lib/airbrake-ruby/nested_exception.rb
|
71
73
|
- lib/airbrake-ruby/notice.rb
|
@@ -74,6 +76,7 @@ files:
|
|
74
76
|
- lib/airbrake-ruby/performance_notifier.rb
|
75
77
|
- lib/airbrake-ruby/promise.rb
|
76
78
|
- lib/airbrake-ruby/query.rb
|
79
|
+
- lib/airbrake-ruby/queue.rb
|
77
80
|
- lib/airbrake-ruby/request.rb
|
78
81
|
- lib/airbrake-ruby/response.rb
|
79
82
|
- lib/airbrake-ruby/stashable.rb
|
@@ -126,6 +129,7 @@ files:
|
|
126
129
|
- spec/performance_notifier_spec.rb
|
127
130
|
- spec/promise_spec.rb
|
128
131
|
- spec/query_spec.rb
|
132
|
+
- spec/queue_spec.rb
|
129
133
|
- spec/request_spec.rb
|
130
134
|
- spec/response_spec.rb
|
131
135
|
- spec/spec_helper.rb
|
@@ -203,6 +207,7 @@ test_files:
|
|
203
207
|
- spec/notice_notifier/options_spec.rb
|
204
208
|
- spec/filter_chain_spec.rb
|
205
209
|
- spec/response_spec.rb
|
210
|
+
- spec/queue_spec.rb
|
206
211
|
- spec/code_hunk_spec.rb
|
207
212
|
- spec/fixtures/notroot.txt
|
208
213
|
- spec/fixtures/project_root/long_line.txt
|