airbrake-ruby 2.5.0.rc.4 → 2.5.0
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 +16 -16
- data/lib/airbrake-ruby/config.rb +1 -1
- data/lib/airbrake-ruby/version.rb +1 -1
- data/spec/airbrake_spec.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae9f7049d793e87a0318eb83c39ab56842dfffc0
|
4
|
+
data.tar.gz: 85e78326a5fca5307ba496f9c3cbe0acb584fc51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42090f81e92e38d63cf555fe0c989d34ea02c6ff9d78453756e08f3523274d644f169f05315d81eb896d3393a9b7a4bbd005d482dfe9d59ea664554f75a30c73
|
7
|
+
data.tar.gz: e5680cae91bf311eda5ec420a0946675b94f9d8eef01d8dd47002902bdf11d3fa971abed4e01f9728493f643329f15933cfd6dc6398c1bd4e7a87b20b0af8559
|
@@ -165,12 +165,20 @@ module Airbrake
|
|
165
165
|
end
|
166
166
|
# rubocop:enable Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
|
167
167
|
|
168
|
-
def stack_frame(
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
168
|
+
def stack_frame(config, regexp, stackframe)
|
169
|
+
if (match = match_frame(regexp, stackframe))
|
170
|
+
return {
|
171
|
+
file: match[:file],
|
172
|
+
line: (Integer(match[:line]) if match[:line]),
|
173
|
+
function: match[:function]
|
174
|
+
}
|
175
|
+
end
|
176
|
+
|
177
|
+
config.logger.error(
|
178
|
+
"can't parse '#{stackframe}' (please file an issue so we can fix " \
|
179
|
+
"it: https://github.com/airbrake/airbrake-ruby/issues/new)"
|
180
|
+
)
|
181
|
+
{ file: nil, line: nil, function: stackframe }
|
174
182
|
end
|
175
183
|
|
176
184
|
def match_frame(regexp, stackframe)
|
@@ -185,16 +193,8 @@ module Airbrake
|
|
185
193
|
root_directory = config.root_directory.to_s
|
186
194
|
|
187
195
|
exception.backtrace.map.with_index do |stackframe, i|
|
188
|
-
|
189
|
-
|
190
|
-
"can't parse '#{stackframe}' (please file an issue so we can fix " \
|
191
|
-
"it: https://github.com/airbrake/airbrake-ruby/issues/new)"
|
192
|
-
)
|
193
|
-
match = { file: nil, line: nil, function: stackframe }
|
194
|
-
end
|
195
|
-
|
196
|
-
frame = stack_frame(match)
|
197
|
-
next(frame) unless config.code_hunks
|
196
|
+
frame = stack_frame(config, regexp, stackframe)
|
197
|
+
next(frame) if config.code_hunks.nil? || frame[:file].nil?
|
198
198
|
|
199
199
|
if !root_directory.empty?
|
200
200
|
if frame[:file].start_with?(root_directory)
|
data/lib/airbrake-ruby/config.rb
CHANGED
data/spec/airbrake_spec.rb
CHANGED
@@ -83,8 +83,8 @@ RSpec.describe Airbrake do
|
|
83
83
|
# rubocop:disable Metrics/LineLength
|
84
84
|
expected_body = %r|
|
85
85
|
{"errors":\[{"type":"RuntimeError","message":"bingo","backtrace":\[
|
86
|
-
{"file":"\[PROJECT_ROOT\]/spec/airbrake_spec.rb","line":\d+,"function":"[\w/\s\(\)<>]+"},
|
87
|
-
{"file":"\[GEM_ROOT\]/gems/rspec-core-.+/.+","line":\d+,"function":"[\w/\s\(\)<>]+"
|
86
|
+
{"file":"\[PROJECT_ROOT\]/spec/airbrake_spec.rb","line":\d+,"function":"[\w/\s\(\)<>]+","code".+},
|
87
|
+
{"file":"\[GEM_ROOT\]/gems/rspec-core-.+/.+","line":\d+,"function":"[\w/\s\(\)<>]+".+
|
88
88
|
|x
|
89
89
|
# rubocop:enable Metrics/LineLength
|
90
90
|
|
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.5.0
|
4
|
+
version: 2.5.0
|
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-10-
|
11
|
+
date: 2017-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -181,9 +181,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '2.0'
|
182
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
|
-
- - "
|
184
|
+
- - ">="
|
185
185
|
- !ruby/object:Gem::Version
|
186
|
-
version:
|
186
|
+
version: '0'
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
189
|
rubygems_version: 2.6.13
|