zooming-proxy 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zooming-proxy/middleware.rb +2 -2
- data/lib/zooming-proxy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: faee7cb1cc1a19635d8925d6ae015df254917a44
|
4
|
+
data.tar.gz: 022a96de63bc542d3aebd777d6991ce0eefb0e02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3958b2764763d987e050f3821b2c322d387aa7ebb8057b3fb55740a6d5f23879f7e326f03780185665d1bc6b57b078211f7562bc4ab9a4f492b6b46a132146c4
|
7
|
+
data.tar.gz: 8ed7682569e9a5a76556b2fe6606bea06e261b8471a15d59f6b669223f7d6559299161f6b234fab64638d7c33828355e0b56168abaa3ee3e8abe66d21f802b64
|
@@ -136,7 +136,7 @@ class ZoomingProxy
|
|
136
136
|
def zoomable?(headers, body, depth)
|
137
137
|
zoomable = depth <= MAX_DEPTH
|
138
138
|
zoomable &= headers.include?('x-hal-zoom')
|
139
|
-
zoomable &= headers['content-type'].include?('json')
|
139
|
+
zoomable &= headers['content-type'].to_s.include?('json')
|
140
140
|
|
141
141
|
zoomable && !body.nil?
|
142
142
|
end
|
@@ -144,7 +144,7 @@ class ZoomingProxy
|
|
144
144
|
def requested_links(body, headers)
|
145
145
|
body['_links']
|
146
146
|
.to_h
|
147
|
-
.select { |k, _| headers['x-hal-zoom'].split(/\s+/).include?(k) }
|
147
|
+
.select { |k, _| headers['x-hal-zoom'].to_s.split(/\s+/).include?(k) }
|
148
148
|
.each_with_object({}) do |(k, v), urls|
|
149
149
|
array = v.respond_to?(:to_ary)
|
150
150
|
|