ldp 0.3.0 → 0.3.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: 4d377a827832fb58b1a8a62f81bd434dd75c30a4
4
- data.tar.gz: 707fd5fcd162dadb2eef16f0b726427f9de51811
3
+ metadata.gz: 99bebef6b32281c8905d392e0f0fa8d721e68261
4
+ data.tar.gz: 5433d136b94341c604498c9ba2e48beeb0e7339c
5
5
  SHA512:
6
- metadata.gz: 2c7eba449185e70f93692dea2a991efecbb3900a69e2384b5692a761d74eab62fd5233753bc850298b2645c1788efa4519011769fe6f66d3d97fd80b3f4a49f9
7
- data.tar.gz: ed5c4424c1aca7a8b745b0571812258b4b5f552b2b009007c1fa7dade50127ee5707d8d534fbc79cefcc862401ee469219deade75be19fc21b699b6db298fa41
6
+ metadata.gz: bb175075b93c4d285900ce7699e905e191711cede50853e55b633c79f001e1f40a468eefcedf49ce02c4e4cc207d548f5802574d0d781718cf348df6bcdb2552
7
+ data.tar.gz: b3ffc95e6771ba09ebfeb679da4a4351bbb1de5cfbfb382919c16780da40712f41dfcef8f0ae2a73f546961f515b7dcbaf79779a49494a0f7ffeb345a7e4ff07
@@ -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::Graph)
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::Graph) ? graph_or_content.dump(:ttl) : graph_or_content) do |req|
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
 
@@ -66,7 +66,7 @@ module Ldp
66
66
  def save!
67
67
  result = save
68
68
 
69
- if result.is_a? RDF::Graph
69
+ if result.is_a? RDF::Enumerable
70
70
  raise GraphDifferenceException.new "", result
71
71
  elsif !result
72
72
  raise @last_response
@@ -7,13 +7,13 @@ module Ldp
7
7
  super
8
8
 
9
9
  case graph_or_response
10
- when RDF::Graph
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::Graph or a Ldp::Response. You provided #{graph_or_response.class}"
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
 
@@ -1,3 +1,3 @@
1
1
  module Ldp
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -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::Graph or a Ldp::Response. You provided String")
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.0
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-04-03 00:00:00.000000000 Z
11
+ date: 2015-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday