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 +4 -4
- data/lib/olive_branch/middleware.rb +6 -1
- data/lib/olive_branch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6385aaf40477e1da61f791e86f1a97c5e2207bb039384f624fcc3a02b3850a01
|
4
|
+
data.tar.gz: 05b1cc138df81ea951f34e788d2df7ba9c0e046db0311e7d3ec0dccde0cd8bb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/olive_branch/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2021-11-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|