parliament-utils 0.6.1 → 0.7.0

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: a8009d07745565de8be2d3dea64f6ba60f2d5557
4
- data.tar.gz: 846a0a299041590b78215ba359f8abad59a31428
3
+ metadata.gz: 64ce1d55fb093dc97a517a40072fb71ba279c4bb
4
+ data.tar.gz: c629dabd75388bc880432c2d361f64097460ffff
5
5
  SHA512:
6
- metadata.gz: 290e2bee9db0c12837ba870f3dec6540a1f17b1dd6948461124e42de6cc6707d7903d1393d72db7950a4e4056dd2ea20970e59ea158b1f57b287b848b2f85270
7
- data.tar.gz: 2a5a096baccfda339427f28a28787e80c5f3a604d0e81684e44977e45c8fdf589ff32030b9c768fbbf93b4886c9cd5f18967a4a194c8069b833a866805113b42
6
+ metadata.gz: ead9e70107217a9d1adeec2228335369ea410337edcd699c77fcc90add5e7e592765b21f4e11e044884d62639a7789855698713fc2f438d39b019910cc1a87a7
7
+ data.tar.gz: 531a3c67da969c45518b89b3c004daaa79229282af8381bfe267f19c5ab18af2e1264888394e07cbdf0cc8a25ea91bad55af8ac65841acff8c12e6ea2e379e27
@@ -3,5 +3,12 @@
3
3
  # Add new mime types for use in respond_to blocks:
4
4
  # Mime::Type.register "text/richtext", :rtf
5
5
 
6
+ Mime::Type.register 'application/n-triples', :nt
6
7
  Mime::Type.register 'text/turtle', :ttl
7
- Mime::Type.register 'application/rdf+json', :rdfjson
8
+ Mime::Type.register 'application/sparql-results+xml', :srx
9
+ Mime::Type.register 'application/sparql-results+json', :srj
10
+ Mime::Type.register 'text/tab-separated-values', :tsv
11
+ Mime::Type.register 'text/vnd.graphviz', :gv, [], [:dot]
12
+ Mime::Type.register 'application/rdf+xml', :rdf, [], [:rdfxml]
13
+ Mime::Type.register 'application/rdf+ld', :jsonld
14
+
@@ -28,6 +28,11 @@ module Parliament
28
28
 
29
29
  # Set redirect_url as URI object
30
30
  redirect_url = URI(@data_url.call(params).query_url)
31
+
32
+ # Get the request url as a URI object
33
+ request_extension = File.extname(URI.parse(request.url).path)
34
+ redirect_url.path = redirect_url.path + request_extension if request_extension != ''
35
+
31
36
  return redirect_to(redirect_url.to_s)
32
37
  end
33
38
 
@@ -5,17 +5,15 @@ module Parliament
5
5
  DATA_FORMATS = %w(
6
6
  application/n-triples
7
7
  text/turtle
8
- text/n3
9
- application/n-quads
10
- application/x-trig
11
- application/trix
12
8
  application/sparql-results+xml
13
9
  application/sparql-results+json
14
- application/rdf+xml
15
- application/json
16
10
  text/csv
17
11
  text/tab-separated-values
18
12
  text/vnd.graphviz
13
+ application/rdf+xml
14
+ application/xml
15
+ application/json+ld
16
+ application/json
19
17
  ).freeze
20
18
  end
21
19
  end
@@ -1,5 +1,5 @@
1
1
  module Parliament
2
2
  module Utils
3
- VERSION = '0.6.1'.freeze
3
+ VERSION = '0.7.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parliament-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rebecca Appleyard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-20 00:00:00.000000000 Z
11
+ date: 2018-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parliament-ruby