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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 723a69b477b7427cce788252556a5787cdfb0e3f
4
- data.tar.gz: ebcde2029d361259bc27fdbd1573b5617f550352
3
+ metadata.gz: ae9f7049d793e87a0318eb83c39ab56842dfffc0
4
+ data.tar.gz: 85e78326a5fca5307ba496f9c3cbe0acb584fc51
5
5
  SHA512:
6
- metadata.gz: c81879d7a36df9412c75292314117f0ae46b555a6fe995e52a0d4d661b4ab8d812d38a5e8f658fe512b07762171a8e64c3019b1838e9b1a19e6696e56c4d9700
7
- data.tar.gz: 81e6a8137d913c6f68007647b22178f3f1001eaffb325004ac8b1eefbb8b1e1fca47d3326c8a1498805fa9a212a0d4086f32389de9eaa8c177283743dad3e56b
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(match)
169
- {
170
- file: match[:file],
171
- line: (Integer(match[:line]) if match[:line]),
172
- function: match[:function]
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
- unless (match = match_frame(regexp, stackframe))
189
- config.logger.error(
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)
@@ -87,7 +87,7 @@ module Airbrake
87
87
  self.proxy = {}
88
88
  self.queue_size = 100
89
89
  self.workers = 1
90
- self.code_hunks = false
90
+ self.code_hunks = true
91
91
 
92
92
  self.logger = Logger.new(STDOUT)
93
93
  logger.level = Logger::WARN
@@ -4,5 +4,5 @@
4
4
  module Airbrake
5
5
  ##
6
6
  # @return [String] the library version
7
- AIRBRAKE_RUBY_VERSION = '2.5.0.rc.4'.freeze
7
+ AIRBRAKE_RUBY_VERSION = '2.5.0'.freeze
8
8
  end
@@ -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.rc.4
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-19 00:00:00.000000000 Z
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: 1.3.1
186
+ version: '0'
187
187
  requirements: []
188
188
  rubyforge_project:
189
189
  rubygems_version: 2.6.13