airbrake-ruby 2.7.0 → 2.7.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/backtrace.rb +1 -1
- data/lib/airbrake-ruby/version.rb +1 -1
- data/spec/airbrake_spec.rb +1 -1
- data/spec/backtrace_spec.rb +30 -0
- data/spec/notice_spec.rb +1 -1
- data/spec/promise_spec.rb +4 -4
- 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: 72df910469517a95b5188333116cacfd8e131210
|
4
|
+
data.tar.gz: b31e5d88736c6d810104ac4f4ca62f4771473ebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24393ff4bd5881d41ecfed282110a43f0b394539990f95fbd8d0663e1bf8658aa6871bfd5fac38bb46e9580002b0af96c9ca13185f4737887837c50398ef4643
|
7
|
+
data.tar.gz: 6a305e5efdd77cc5adebf73b55dac88ea33a6914e0871bd35c53b4d62888db85670aa3302674b8f36f38c21d39923eb33903f85b93e9415101e0f190bc31ed1a
|
@@ -194,7 +194,7 @@ module Airbrake
|
|
194
194
|
|
195
195
|
exception.backtrace.map.with_index do |stackframe, i|
|
196
196
|
frame = stack_frame(config, regexp, stackframe)
|
197
|
-
next(frame) if config.code_hunks
|
197
|
+
next(frame) if !config.code_hunks || frame[:file].nil?
|
198
198
|
|
199
199
|
if !root_directory.empty?
|
200
200
|
populate_code(config, frame) if frame[:file].start_with?(root_directory)
|
data/spec/airbrake_spec.rb
CHANGED
data/spec/backtrace_spec.rb
CHANGED
@@ -420,5 +420,35 @@ RSpec.describe Airbrake::Backtrace do
|
|
420
420
|
end
|
421
421
|
end
|
422
422
|
end
|
423
|
+
|
424
|
+
context "when code hunks are disabled" do
|
425
|
+
let(:config) do
|
426
|
+
config = Airbrake::Config.new
|
427
|
+
config.logger = Logger.new('/dev/null')
|
428
|
+
config.code_hunks = false
|
429
|
+
config
|
430
|
+
end
|
431
|
+
|
432
|
+
context "and when root_directory is configured" do
|
433
|
+
before { config.root_directory = project_root_path('') }
|
434
|
+
|
435
|
+
let(:parsed_backtrace) do
|
436
|
+
[
|
437
|
+
{
|
438
|
+
file: project_root_path('code.rb'),
|
439
|
+
line: 94,
|
440
|
+
function: 'to_json'
|
441
|
+
}
|
442
|
+
]
|
443
|
+
end
|
444
|
+
|
445
|
+
it "doesn't attach code to frames" do
|
446
|
+
ex = RuntimeError.new
|
447
|
+
backtrace = [project_root_path('code.rb') + ":94:in `to_json'"]
|
448
|
+
ex.set_backtrace(backtrace)
|
449
|
+
expect(described_class.parse(config, ex)).to eq(parsed_backtrace)
|
450
|
+
end
|
451
|
+
end
|
452
|
+
end
|
423
453
|
end
|
424
454
|
end
|
data/spec/notice_spec.rb
CHANGED
@@ -156,7 +156,7 @@ RSpec.describe Airbrake::Notice do
|
|
156
156
|
end
|
157
157
|
|
158
158
|
describe "object replacement with its string version" do
|
159
|
-
let(:klass) { Class.new{} }
|
159
|
+
let(:klass) { Class.new {} }
|
160
160
|
let(:ex) { AirbrakeTestError.new }
|
161
161
|
let(:params) { { bingo: [Object.new, klass.new] } }
|
162
162
|
let(:notice) { described_class.new(Airbrake::Config.new, ex, params) }
|
data/spec/promise_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe Airbrake::Promise do
|
|
7
7
|
|
8
8
|
context "when it is not resolved" do
|
9
9
|
it "returns self" do
|
10
|
-
expect(subject.then{}).to eq(subject)
|
10
|
+
expect(subject.then {}).to eq(subject)
|
11
11
|
end
|
12
12
|
|
13
13
|
it "doesn't call the resolve callbacks yet" do
|
@@ -19,7 +19,7 @@ RSpec.describe Airbrake::Promise do
|
|
19
19
|
context "when it is resolved" do
|
20
20
|
shared_examples "then specs" do
|
21
21
|
it "returns self" do
|
22
|
-
expect(subject.then{}).to eq(subject)
|
22
|
+
expect(subject.then {}).to eq(subject)
|
23
23
|
end
|
24
24
|
|
25
25
|
it "yields the resolved value" do
|
@@ -74,7 +74,7 @@ RSpec.describe Airbrake::Promise do
|
|
74
74
|
|
75
75
|
context "when it is not rejected" do
|
76
76
|
it "returns self" do
|
77
|
-
expect(subject.then{}).to eq(subject)
|
77
|
+
expect(subject.then {}).to eq(subject)
|
78
78
|
end
|
79
79
|
|
80
80
|
it "doesn't call the reject callbacks yet" do
|
@@ -86,7 +86,7 @@ RSpec.describe Airbrake::Promise do
|
|
86
86
|
context "when it is rejected" do
|
87
87
|
shared_examples "rescue specs" do
|
88
88
|
it "returns self" do
|
89
|
-
expect(subject.rescue{}).to eq(subject)
|
89
|
+
expect(subject.rescue {}).to eq(subject)
|
90
90
|
end
|
91
91
|
|
92
92
|
it "yields the rejected value" do
|
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.7.
|
4
|
+
version: 2.7.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:
|
11
|
+
date: 2018-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|