airbrake 10.0.5 → 10.0.6

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
  SHA256:
3
- metadata.gz: b9cbd8ee322463da5c2a1e5204c2f43d487670e55d15800013e4160a74a15d32
4
- data.tar.gz: 9be1aa686e18c3a14cc49ad33c55ba61684d89131e2e94b8eeb8dbde3e9d0ee4
3
+ metadata.gz: a8c1a47736f8dd93e0023e7ac0ce9d8e5e852baaba52bd725203577c3881d058
4
+ data.tar.gz: d0f623664683c44ca43cf29b067fe72ed4c7b7920e9390f0346ca1cc3b8ae409
5
5
  SHA512:
6
- metadata.gz: c2ee7d1114b0f9d21a641434a75f44083a0fe47e3b39940ecad78d482763a46bc25d45cc76c9b9c678a7ac063e1449cdd9ff8e95df2c73037ece41686048732e
7
- data.tar.gz: 026c23e666b93041f466a5d5ca1648884db567878d013cea50993ee0785b92357b5ef8e82d97545ace088bf07032bf8493f5d42da6189454af78475685d2e902
6
+ metadata.gz: 22c50e2be09ff46299ec304ef79fb28f69a4017170b5c67f8abf9633a891e8b51d7a197d6d7568b1cfe2ee11a2a2b916f12f88896d0488fb3ae37c999b277a36
7
+ data.tar.gz: 59747af59ca1ec23c3cd1ba31ec3e42daa922ce85bb49e1306a4b13d3b75fc8ab41365607dd7558277f301db6aaee8865862749003ce6e65aa1598fca10914bd
@@ -11,12 +11,19 @@ module Airbrake
11
11
 
12
12
  # @param [] request
13
13
  # @return [Airbrake::Rails::App::Route, nil]
14
+ # rubocop:disable Metrics/AbcSize
14
15
  def self.recognize_route(request)
15
16
  # Duplicate `request` because `recognize` *can* strip the request's
16
17
  # `path_info`, which results in broken engine links (when the engine has
17
18
  # an isolated namespace).
18
19
  request_copy = request.dup
19
20
 
21
+ # Save original script name because `router.recognize(request)` mutates
22
+ # it. It's a Rails bug. More info in:
23
+ # * https://github.com/airbrake/airbrake/issues/1072
24
+ # * https://github.com/rails/rails/issues/31152
25
+ original_script_name = request.env['SCRIPT_NAME']
26
+
20
27
  # We must search every engine individually to find a concrete route. If
21
28
  # we rely only on the `Rails.application.routes.router`, then the
22
29
  # recognize call would return the root route, neglecting PATH_INFO
@@ -26,6 +33,10 @@ module Airbrake
26
33
  # * `Marketing::Engine` recognizes it as `marketing#/pricing` (correct)
27
34
  engines.each do |engine|
28
35
  engine.routes.router.recognize(request_copy) do |route, _params|
36
+ # Restore original script name. Remove this code when/if the Rails
37
+ # bug is fixed: https://github.com/airbrake/airbrake/issues/1072
38
+ request.env['SCRIPT_NAME'] = original_script_name
39
+
29
40
  # Skip "catch-all" routes such as:
30
41
  # get '*path => 'pages#about'
31
42
  #
@@ -56,6 +67,7 @@ module Airbrake
56
67
 
57
68
  nil
58
69
  end
70
+ # rubocop:enable Metrics/AbcSize
59
71
 
60
72
  def self.engines
61
73
  @engines ||= [*::Rails::Engine.subclasses, ::Rails.application]
@@ -3,5 +3,5 @@
3
3
  # We use Semantic Versioning v2.0.0
4
4
  # More information: http://semver.org/
5
5
  module Airbrake
6
- AIRBRAKE_VERSION = '10.0.5'.freeze
6
+ AIRBRAKE_VERSION = '10.0.6'.freeze
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airbrake
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.5
4
+ version: 10.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airbrake Technologies, Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-17 00:00:00.000000000 Z
11
+ date: 2020-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake-ruby
@@ -434,7 +434,7 @@ homepage: https://airbrake.io
434
434
  licenses:
435
435
  - MIT
436
436
  metadata: {}
437
- post_install_message:
437
+ post_install_message:
438
438
  rdoc_options: []
439
439
  require_paths:
440
440
  - lib
@@ -450,7 +450,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
450
450
  version: '0'
451
451
  requirements: []
452
452
  rubygems_version: 3.1.2
453
- signing_key:
453
+ signing_key:
454
454
  specification_version: 4
455
455
  summary: Airbrake is an online tool that provides robust exception tracking in any
456
456
  of your Ruby applications.