parliament-utils 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bfd58f4e43c7457d71d7d033aac8db3c32ca1b1
|
4
|
+
data.tar.gz: 3fcd31d03ccc53d0436f9a309dd9bac4131dcac0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f932ab505c62375e0abf1d73b46564e22ae99b349fd28f9c04d6c75f1468a3bad7f73946002d592ac690e8475951c3f31b009025417801ed3f3f4f733c60e955
|
7
|
+
data.tar.gz: 07ecfb06baa85a9ddb41c1bed39fc098b76c0d3c7244d29195f9f296a94920c49d369c3b01f3185671bb770df4fa2886e68932e479acd7cdf9200f04edf0f23d
|
@@ -23,13 +23,11 @@ module Parliament
|
|
23
23
|
# Catch potential nil values
|
24
24
|
raise StandardError, 'Data URL does not exist' if @data_url.nil?
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
format_type = Parliament::Utils::Helpers::FormatHelper::DATA_FORMATS[request.formats.first]
|
26
|
+
# Get the requested type
|
27
|
+
response.headers['Accept'] = request.formats.first.to_s
|
29
28
|
|
30
29
|
# Set redirect_url as URI object
|
31
30
|
redirect_url = URI(@data_url.call(params).query_url)
|
32
|
-
redirect_url.path += ".#{format_type}"
|
33
31
|
return redirect_to(redirect_url.to_s)
|
34
32
|
end
|
35
33
|
|