parliament-utils 0.3.1 → 0.3.2

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: 0cb432daa9677919ecd34cd9775baa536dff7e18
4
- data.tar.gz: d34c734e9ec1af9840100f1abac03d55b5a54fcd
3
+ metadata.gz: 8bfd58f4e43c7457d71d7d033aac8db3c32ca1b1
4
+ data.tar.gz: 3fcd31d03ccc53d0436f9a309dd9bac4131dcac0
5
5
  SHA512:
6
- metadata.gz: c441f4bca5f06c89e9a79cf47cda7f08860fd15386637a637a5a8231d1827d825edcdef9562ef1c2dba6aab5a3d9415c89dcc04b88a49e5f7a10b9187cd40e05
7
- data.tar.gz: 4843f4ba860cd812f84eafa6a71dc9099598b727bd5b112014c83fa415209f70383885acaeab299e3af605b6e77b49c3a4f656c7e1bdf0f2f7315555aa9d898d
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
- response.headers['Accept'] = request.formats.first
27
- # Get the file extension for a given type
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
 
@@ -1,5 +1,5 @@
1
1
  module Parliament
2
2
  module Utils
3
- VERSION = '0.3.1'.freeze
3
+ VERSION = '0.3.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parliament-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rebecca Appleyard