rdf-ldp 0.5.0 → 0.5.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: 4eb2d5a31b16d4ec608a5e86604f0e6aa62b74a7
4
- data.tar.gz: 364e5044ef73ed29309ecfeed26264b873422692
3
+ metadata.gz: d1fb8fbd183ec6b222e4a1d8f70c95a530111e09
4
+ data.tar.gz: fe49505fd5a0b6442af69f691ffc4450e7a301a2
5
5
  SHA512:
6
- metadata.gz: 8d2ca4e335869bc99aec018195ad7d42b89395eaed9166bd0313d6de850bbbe8dd91161626ca0552e92102bb5122edc1afb27bc6c810d3703e6ddc3f608ccf09
7
- data.tar.gz: b9c3fb8d7ebd10297d55f8c90a5c1ada5ba09bc1d5f9dbd158ed8ad8d8c8e692c7a98a71162f4ad0be8e075365a651dc6bdac0c21d601e4f22ec3520f39b76d0
6
+ metadata.gz: 35cefba9e0d2cd219d63cca897bf423950f5baa9de5eed003c47d6e4166688beb328e00f07e56541c6e871f2dcad1bdc5cf1af31e8d9af0cfe3c6c8aa16c53a8
7
+ data.tar.gz: 9dfb9d04d821a4058b087ea1ebc5559ec03d26186e8356ec698cf5576b8afe06ef478fcc17f1b48f27b1988e0e92b9ccecdae83cea642df14a184c5fb19d487d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ 0.5.1
2
+ -----
3
+ - Fixes inserted content relation interpretations.
4
+ - Uses RDF::Graph#query for better perfomance on Direct & Indirect
5
+ Containers
6
+
1
7
  0.5.0
2
8
  -----
3
9
  - Fixes error that caused resources to be misidentified when trailing
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -133,8 +133,8 @@ module RDF::LDP
133
133
  end
134
134
 
135
135
  def member_relation_statements
136
- graph.statements.select do |st|
137
- st.subject == subject_uri && RELATION_TERMS.include?(st.predicate)
136
+ graph.query([subject_uri, nil, nil]).select do |st|
137
+ RELATION_TERMS.include?(st.predicate)
138
138
  end
139
139
  end
140
140
 
@@ -45,7 +45,7 @@ module RDF::LDP
45
45
  case statements.count
46
46
  when 0
47
47
  graph << RDF::Statement(subject_uri,
48
- RDF::Vocab::LDP.indirectContentRelation,
48
+ RDF::Vocab::LDP.insertedContentRelation,
49
49
  RDF::Vocab::LDP.MemberSubject)
50
50
  RDF::Vocab::LDP.MemberSubject
51
51
  when 1
@@ -60,10 +60,8 @@ module RDF::LDP
60
60
  private
61
61
 
62
62
  def inserted_content_statements
63
- graph.statements.select do |st|
64
- st.subject == subject_uri &&
65
- st.predicate == RDF::Vocab::LDP.indirectContentRelation
66
- end
63
+ graph.query([subject_uri, RDF::Vocab::LDP.insertedContentRelation, nil])
64
+ .statements
67
65
  end
68
66
 
69
67
  def process_membership_resource(resource, &block)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-ldp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Johnson