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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82bf8620be78047ccbedd006820b6efd90387878
4
- data.tar.gz: b09eb526701a745532fca231d03d9562cd03385a
3
+ metadata.gz: 8bd2c53be7dbfa2095d15f7eff4707a360168c35
4
+ data.tar.gz: f90560698866e8604c6ff42253387967e0e82869
5
5
  SHA512:
6
- metadata.gz: 0ed81836e912e626f0469e3ec76f921769bed5ea973264f4484622852c5127a1a7408e3b2ba7a8a904c08853d57b75269154a22f7f6d74a42db1c020f1dcfeff
7
- data.tar.gz: 2749949bff55c8a81bfcf84356048ac0032973385207ae69cbe641eaad9c9decc48c156e7e5c332a887d5dcae81390eabb4344ef574aead8e2062c61805a647e
6
+ metadata.gz: e26c779029b13d02412a54d390c7adbbf97df30d3aa7c9c0922a0bbaf155aecc6217bc148f12805a504a8f9748e1b8d43649b96aeed18006253feb254d86d980
7
+ data.tar.gz: 0ca8e5bf17949a26165de3b481e3ad534b6226ce11bf6ed2e23e99a02e6e72caa6ef475dbe1ac07d79006bb78a1a5e92f30a23c6b7b3179f4a6cf8613dfa72b7
@@ -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
- ac = ActionController::Base.new
82
- ac.render_to_string(:partial => '/xray_bar').html_safe
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
@@ -1,3 +1,3 @@
1
1
  module Xray
2
- VERSION = "0.1.19".freeze
2
+ VERSION = "0.1.20".freeze
3
3
  end
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.19
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-06 00:00:00.000000000 Z
11
+ date: 2016-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails