ldp 0.3.0 → 0.3.1
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 +4 -4
- data/lib/ldp/container.rb +2 -2
- data/lib/ldp/orm.rb +1 -1
- data/lib/ldp/resource/rdf_source.rb +2 -2
- data/lib/ldp/version.rb +1 -1
- data/spec/lib/ldp/resource/rdf_source_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 99bebef6b32281c8905d392e0f0fa8d721e68261
|
|
4
|
+
data.tar.gz: 5433d136b94341c604498c9ba2e48beeb0e7339c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bb175075b93c4d285900ce7699e905e191711cede50853e55b633c79f001e1f40a468eefcedf49ce02c4e4cc207d548f5802574d0d781718cf348df6bcdb2552
|
|
7
|
+
data.tar.gz: b3ffc95e6771ba09ebfeb679da4a4351bbb1de5cfbfb382919c16780da40712f41dfcef8f0ae2a73f546961f515b7dcbaf79779a49494a0f7ffeb345a7e4ff07
|
data/lib/ldp/container.rb
CHANGED
|
@@ -27,7 +27,7 @@ module Ldp
|
|
|
27
27
|
|
|
28
28
|
when (args.length == 2)
|
|
29
29
|
slug, graph_or_content = args
|
|
30
|
-
when (args.first.is_a? RDF::
|
|
30
|
+
when (args.first.is_a? RDF::Enumerable)
|
|
31
31
|
slug = nil
|
|
32
32
|
graph_or_content = args.first
|
|
33
33
|
else
|
|
@@ -35,7 +35,7 @@ module Ldp
|
|
|
35
35
|
graph_or_content = RDF::Graph.new
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
resp = client.post subject, (graph_or_content.is_a?(RDF::
|
|
38
|
+
resp = client.post subject, (graph_or_content.is_a?(RDF::Enumerable) ? graph_or_content.dump(:ttl) : graph_or_content) do |req|
|
|
39
39
|
req.headers['Slug'] = slug
|
|
40
40
|
end
|
|
41
41
|
|
data/lib/ldp/orm.rb
CHANGED
|
@@ -7,13 +7,13 @@ module Ldp
|
|
|
7
7
|
super
|
|
8
8
|
|
|
9
9
|
case graph_or_response
|
|
10
|
-
when RDF::
|
|
10
|
+
when RDF::Enumerable
|
|
11
11
|
@graph = graph_or_response
|
|
12
12
|
when Ldp::Response
|
|
13
13
|
when NilClass
|
|
14
14
|
#nop
|
|
15
15
|
else
|
|
16
|
-
raise ArgumentError, "Third argument to #{self.class}.new should be a RDF::
|
|
16
|
+
raise ArgumentError, "Third argument to #{self.class}.new should be a RDF::Enumerable or a Ldp::Response. You provided #{graph_or_response.class}"
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
data/lib/ldp/version.rb
CHANGED
|
@@ -52,7 +52,7 @@ describe Ldp::Resource::RdfSource do
|
|
|
52
52
|
context "with bad attributes" do
|
|
53
53
|
it "should raise an error" do
|
|
54
54
|
expect{ Ldp::Resource::RdfSource.new mock_client, nil, "derp" }.to raise_error(ArgumentError,
|
|
55
|
-
"Third argument to Ldp::Resource::RdfSource.new should be a RDF::
|
|
55
|
+
"Third argument to Ldp::Resource::RdfSource.new should be a RDF::Enumerable or a Ldp::Response. You provided String")
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
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.3.
|
|
4
|
+
version: 0.3.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-
|
|
11
|
+
date: 2015-05-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|