ldp 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/ldp/response.rb +11 -1
- data/lib/ldp/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 882fd676e2cd2aac5923a8f7a4b308228569607b
|
4
|
+
data.tar.gz: b94c819301cb2ab968085aa6ca371b4eec682e94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4efcff3ae303486a051bc22477ce087e89ee197d2eba531aee9d8c9bbf9767d06f6949f0be830627539377c78828c4d542e08d7a81daaaec9714892e6831cdd
|
7
|
+
data.tar.gz: b3a69169e198f975e8cdb1b5be96e9d9aedbda161eda6c9deac37393ed4615949edb8a970d531c3b8faa7889eb53d62c254366643cb33d207c2da5b9895e72a8
|
data/lib/ldp/response.rb
CHANGED
@@ -127,7 +127,7 @@ module Ldp
|
|
127
127
|
graph = RDF::Graph.new
|
128
128
|
|
129
129
|
if resource?
|
130
|
-
RDF::Reader.for(:ttl).new(
|
130
|
+
RDF::Reader.for(:ttl).new(response_body, base_uri: page_subject) do |reader|
|
131
131
|
reader.each_statement do |s|
|
132
132
|
graph << s
|
133
133
|
end
|
@@ -175,5 +175,15 @@ module Ldp
|
|
175
175
|
def minimal?
|
176
176
|
preferences[RETURN][:value] == "minimal"
|
177
177
|
end
|
178
|
+
|
179
|
+
private
|
180
|
+
|
181
|
+
# Get the body and ensure it's UTF-8 encoded. Since Fedora 9.3 isn't
|
182
|
+
# returning a charset, then Net::HTTP is just returning ASCII-8BIT
|
183
|
+
# See https://github.com/ruby-rdf/rdf-turtle/issues/13
|
184
|
+
# See https://jira.duraspace.org/browse/FCREPO-1750
|
185
|
+
def response_body
|
186
|
+
body.force_encoding('utf-8')
|
187
|
+
end
|
178
188
|
end
|
179
189
|
end
|
data/lib/ldp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ldp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -183,3 +183,4 @@ test_files:
|
|
183
183
|
- spec/lib/ldp/resource_spec.rb
|
184
184
|
- spec/lib/ldp/response_spec.rb
|
185
185
|
- spec/spec_helper.rb
|
186
|
+
has_rdoc:
|