olive_branch 4.0.0 → 4.0.1

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: 3bec73b70112a823836210ff185bcf853dfa2d7417be60ddab5e9d2e37d59f37
4
- data.tar.gz: 8c494c373619e9543d0ccb28bbafe3664edc32d3a975a220c052a9422fce916e
3
+ metadata.gz: 6385aaf40477e1da61f791e86f1a97c5e2207bb039384f624fcc3a02b3850a01
4
+ data.tar.gz: 05b1cc138df81ea951f34e788d2df7ba9c0e046db0311e7d3ec0dccde0cd8bb7
5
5
  SHA512:
6
- metadata.gz: 2ca6f8224a09fa9113a6e6c0caa45cb928f2eba5ed2538a06e2726d931892af3a31e31c1ca7fb90cec95e7392a5a3cc9a21b8be9427f0af4b50ee3f73672bc86
7
- data.tar.gz: b949f436070efe153eb34c11b9677a0f86b8999406630753cc726de5387d5d266b856afd30c028e24df733c93669a673d4919ca922c91517cc9f9bca8f31c628
6
+ metadata.gz: 2e7f4d9ca0335cf4b1eaf98e8bcd7fe2d7c3c5651b52f65570fbacb6e2a7c497186d083feca611af4788e13783c80e315fb387136bf1131f7979ef5405cbda23
7
+ data.tar.gz: 6d958d754397f57209001e2ea3cec65e830f904e8e2ebc203dd97fef3b3469d71fa1791c591158b561d481a5bc59c0525ba8191153752f02118ffa87e2f7d5ef
@@ -90,13 +90,18 @@ module OliveBranch
90
90
  end
91
91
 
92
92
  def exclude_response?(env, headers)
93
- exclude?(env, headers["Content-Type"], @exclude_response)
93
+ exclude_rails_route?(env) ||
94
+ exclude?(env, headers['Content-Type'], @exclude_response)
94
95
  end
95
96
 
96
97
  def exclude?(env, content_type, block)
97
98
  !inflection_type(env) || !valid_content_type?(content_type) || block.call(env)
98
99
  end
99
100
 
101
+ def exclude_rails_route?(env)
102
+ env['PATH_INFO'].to_s.start_with?('/rails')
103
+ end
104
+
100
105
  def valid_content_type?(content_type)
101
106
  @content_type_check.call(content_type)
102
107
  end
@@ -1,3 +1,3 @@
1
1
  module OliveBranch
2
- VERSION = '4.0.0'
2
+ VERSION = '4.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: olive_branch
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eli Fatsi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-04-22 00:00:00.000000000 Z
12
+ date: 2021-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails