xray-rails 0.1.20 → 0.1.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xray/middleware.rb +5 -1
- data/lib/xray/version.rb +1 -1
- 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: f149a5a9fc13928e5000548a04914d62a4b65401
|
4
|
+
data.tar.gz: 63a8b1b1d992cd31a6edb95ee31e831bb59bd4c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4f872523204ac2e0ca6f950ceffe4cb364d7b17c5f354acee4492857b553466472eacab058a56d45befb849b42138071eb631bb24a1c6515bf47257672407b4
|
7
|
+
data.tar.gz: 4ed3f238f0bab14a3ec9b22075ee0594cc2f985e55713489110689d56db4a7c86c523657a01f52d41d4871354ed3e9ed33fae96e95807da4ae983ed477dfe804
|
data/lib/xray/middleware.rb
CHANGED
@@ -59,7 +59,7 @@ module Xray
|
|
59
59
|
# Modifying the original response obj maintains compatibility with other middlewares
|
60
60
|
if ActionDispatch::Response === response
|
61
61
|
response.body = [body]
|
62
|
-
response.header['Content-Length'] = content_length unless
|
62
|
+
response.header['Content-Length'] = content_length unless committed?(response)
|
63
63
|
response.to_a
|
64
64
|
else
|
65
65
|
headers['Content-Length'] = content_length
|
@@ -73,6 +73,10 @@ module Xray
|
|
73
73
|
|
74
74
|
private
|
75
75
|
|
76
|
+
def committed?(response)
|
77
|
+
response.respond_to?(:committed?) && response.committed?
|
78
|
+
end
|
79
|
+
|
76
80
|
def inject_xray_bar!(html)
|
77
81
|
html.sub!(/<body[^>]*>/) { "#{$~}\n#{render_xray_bar}" }
|
78
82
|
end
|
data/lib/xray/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xray-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brent Dillingham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|