scout_apm 2.1.21 → 2.1.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 36b64e82960822e331059ed940c8e357255c3883
4
+ data.tar.gz: 6f04ee57e89946210a1cce690fda0178da06ed00
5
+ SHA512:
6
+ metadata.gz: 8bbe4fd93b2767b05096d13a68d530393c8a61399b43105ae0b26ffde043ac41f7b9825eb352510d6a81d4d22f44f9b484e268632c76d39532089a5ba9e763e3
7
+ data.tar.gz: 10af6806c69c598167a619b0bbe4e5cc0170502b51a5b70e8cfa0e702d1fc9ded6e761702704421d37e3019ae07f03b0f8539a7fb3eb6b14d98a1c549089dc37
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.1.22
2
+
3
+ * Add DevTrace support for newest 4.2.x and 5.x versions of Rails
4
+
1
5
  # 2.1.21
2
6
 
3
7
  * Fix edge case, causing DevTrace to fail
@@ -53,7 +53,8 @@ module ScoutApm
53
53
  rack_response = @app.call(env)
54
54
  begin
55
55
  DevTraceResponseManipulator.new(env, rack_response).call
56
- rescue => e
56
+ rescue Exception => e
57
+ # If anything went wrong at all, just bail out and return the unmodified response.
57
58
  ScoutApm::Agent.instance.logger.debug("DevTrace: Raised an exception: #{e.message}, #{e.backtrace}")
58
59
  rack_response
59
60
  end
@@ -132,27 +133,41 @@ module ScoutApm
132
133
 
133
134
  def adjust_html_response
134
135
  case true
135
- when rails_response? then adjust_rails_response
136
+ when older_rails_response? then adjust_older_rails_response
137
+ when newer_rails_response? then adjust_newer_rails_response
136
138
  when rack_proxy_response? then adjust_rack_proxy_response
137
139
  else
138
140
  # No action taken, we only adjust if we know exactly what we have.
139
141
  end
140
142
  end
141
143
 
142
- def rails_response?
143
- rack_body.is_a?(ActionDispatch::Response)
144
+ def older_rails_response?
145
+ if defined?(ActionDispatch::Response)
146
+ return true if rack_body.is_a?(ActionDispatch::Response)
147
+ end
148
+ end
149
+
150
+ def newer_rails_response?
151
+ if defined?(ActionDispatch::Response::RackBody)
152
+ return true if rack_body.is_a?(ActionDispatch::Response::RackBody)
153
+ end
144
154
  end
145
155
 
146
156
  def rack_proxy_response?
147
157
  rack_body.is_a?(Rack::BodyProxy)
148
158
  end
149
159
 
150
- # Preserve the ActionDispatch::Response object we're working with
151
- def adjust_rails_response
152
- logger.debug("DevTrace: in middleware, dev_trace is active, and response has a body. This appears to be an HTML page and an ActionDispatch::Response. Path=#{path}; ContentType=#{content_type}")
160
+ def adjust_older_rails_response
161
+ logger.debug("DevTrace: in middleware, dev_trace is active, and response has a (older) body. This appears to be an HTML page and an ActionDispatch::Response. Path=#{path}; ContentType=#{content_type}")
153
162
  rack_body.body = [ html_manipulator.res ]
154
163
  end
155
164
 
165
+ # Preserve the ActionDispatch::Response object we're working with
166
+ def adjust_newer_rails_response
167
+ logger.debug("DevTrace: in middleware, dev_trace is active, and response has a (newer) body. This appears to be an HTML page and an ActionDispatch::Response. Path=#{path}; ContentType=#{content_type}")
168
+ @rack_body = [ html_manipulator.res ]
169
+ end
170
+
156
171
  def adjust_rack_proxy_response
157
172
  logger.debug("DevTrace: in middleware, dev_trace is active, and response has a body. This appears to be an HTML page and an Rack::BodyProxy. Path=#{path}; ContentType=#{content_type}")
158
173
  @rack_body = [ html_manipulator.res ]
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "2.1.21"
2
+ VERSION = "2.1.22"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.21
5
- prerelease:
4
+ version: 2.1.22
6
5
  platform: ruby
7
6
  authors:
8
7
  - Derek Haynes
@@ -10,118 +9,104 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2017-01-24 00:00:00.000000000 Z
12
+ date: 2017-01-30 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: minitest
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - ">="
21
19
  - !ruby/object:Gem::Version
22
20
  version: '0'
23
21
  type: :development
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - ">="
29
26
  - !ruby/object:Gem::Version
30
27
  version: '0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: mocha
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - ">="
37
33
  - !ruby/object:Gem::Version
38
34
  version: '0'
39
35
  type: :development
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - ">="
45
40
  - !ruby/object:Gem::Version
46
41
  version: '0'
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: pry
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - ">="
53
47
  - !ruby/object:Gem::Version
54
48
  version: '0'
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - ">="
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: m
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ! '>='
60
+ - - ">="
69
61
  - !ruby/object:Gem::Version
70
62
  version: '0'
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ! '>='
67
+ - - ">="
77
68
  - !ruby/object:Gem::Version
78
69
  version: '0'
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: simplecov
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ! '>='
74
+ - - ">="
85
75
  - !ruby/object:Gem::Version
86
76
  version: '0'
87
77
  type: :development
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ! '>='
81
+ - - ">="
93
82
  - !ruby/object:Gem::Version
94
83
  version: '0'
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: rake-compiler
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ! '>='
88
+ - - ">="
101
89
  - !ruby/object:Gem::Version
102
90
  version: '0'
103
91
  type: :development
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ! '>='
95
+ - - ">="
109
96
  - !ruby/object:Gem::Version
110
97
  version: '0'
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: addressable
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
- - - ! '>='
102
+ - - ">="
117
103
  - !ruby/object:Gem::Version
118
104
  version: '0'
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
108
  requirements:
124
- - - ! '>='
109
+ - - ">="
125
110
  - !ruby/object:Gem::Version
126
111
  version: '0'
127
112
  description: Monitors Ruby apps and reports detailed metrics on performance to Scout.
@@ -133,8 +118,8 @@ extensions:
133
118
  - ext/rusage/extconf.rb
134
119
  extra_rdoc_files: []
135
120
  files:
136
- - .gitignore
137
- - .rubocop.yml
121
+ - ".gitignore"
122
+ - ".rubocop.yml"
138
123
  - CHANGELOG.markdown
139
124
  - Gemfile
140
125
  - LICENSE.md
@@ -283,28 +268,27 @@ files:
283
268
  homepage: https://github.com/scoutapp/scout_apm_ruby
284
269
  licenses:
285
270
  - Proprietary (See LICENSE.md)
271
+ metadata: {}
286
272
  post_install_message:
287
273
  rdoc_options: []
288
274
  require_paths:
289
275
  - lib
290
276
  - data
291
277
  required_ruby_version: !ruby/object:Gem::Requirement
292
- none: false
293
278
  requirements:
294
- - - ! '>='
279
+ - - ">="
295
280
  - !ruby/object:Gem::Version
296
281
  version: '0'
297
282
  required_rubygems_version: !ruby/object:Gem::Requirement
298
- none: false
299
283
  requirements:
300
- - - ! '>='
284
+ - - ">="
301
285
  - !ruby/object:Gem::Version
302
286
  version: '0'
303
287
  requirements: []
304
288
  rubyforge_project: scout_apm
305
- rubygems_version: 1.8.23.2
289
+ rubygems_version: 2.4.8
306
290
  signing_key:
307
- specification_version: 3
291
+ specification_version: 4
308
292
  summary: Ruby application performance monitoring
309
293
  test_files:
310
294
  - test/data/config_test_1.yml