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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 53b76804d5ae9a00e6d4801434481e5054b451ce
4
- data.tar.gz: c63c931afd361d37207d88b336daf8c23e5db197
3
+ metadata.gz: 882fd676e2cd2aac5923a8f7a4b308228569607b
4
+ data.tar.gz: b94c819301cb2ab968085aa6ca371b4eec682e94
5
5
  SHA512:
6
- metadata.gz: 724f8bda3e97e7fc24dcea133072b6d754ccfb40112edae54973b39f35878619e2973f920308cfa52ae87795ae7a6ffd125a68199a224cd8b625f9f574dd6b62
7
- data.tar.gz: 0309e7ff339a512828c5c065bd6ff26bed7a283e2b457f3e9ca8e4d57504f73ce6efc6ed76df21433aeb527cb049022e7efddacb3e07f4264edd8e019f9a0d7a
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(StringIO.new(body), :base_uri => page_subject) do |reader|
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
@@ -1,3 +1,3 @@
1
1
  module Ldp
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
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.0
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-18 00:00:00.000000000 Z
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: