xray-rails 0.1.19 → 0.1.20
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 +9 -3
- 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: 8bd2c53be7dbfa2095d15f7eff4707a360168c35
|
4
|
+
data.tar.gz: f90560698866e8604c6ff42253387967e0e82869
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e26c779029b13d02412a54d390c7adbbf97df30d3aa7c9c0922a0bbaf155aecc6217bc148f12805a504a8f9748e1b8d43649b96aeed18006253feb254d86d980
|
7
|
+
data.tar.gz: 0ca8e5bf17949a26165de3b481e3ad534b6226ce11bf6ed2e23e99a02e6e72caa6ef475dbe1ac07d79006bb78a1a5e92f30a23c6b7b3179f4a6cf8613dfa72b7
|
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
|
62
|
+
response.header['Content-Length'] = content_length unless response.try(:committed?)
|
63
63
|
response.to_a
|
64
64
|
else
|
65
65
|
headers['Content-Length'] = content_length
|
@@ -78,8 +78,14 @@ module Xray
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def render_xray_bar
|
81
|
-
|
82
|
-
|
81
|
+
if ApplicationController.respond_to?(:render)
|
82
|
+
# Rails 5
|
83
|
+
ApplicationController.render(:partial => "/xray_bar").html_safe
|
84
|
+
else
|
85
|
+
# Rails <= 4.2
|
86
|
+
ac = ActionController::Base.new
|
87
|
+
ac.render_to_string(:partial => '/xray_bar').html_safe
|
88
|
+
end
|
83
89
|
end
|
84
90
|
|
85
91
|
# Matches:
|
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.20
|
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-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|