lightrdf 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.2.3 2011-03-14
2
+
3
+ * Added all_triples method that returns triples recursively referenced by a node
4
+
1
5
  === 0.2.2 2011-03-10
2
6
 
3
7
  * Removed dependency open3 for Windows compatibility
data/lib/lightrdf/node.rb CHANGED
@@ -66,6 +66,14 @@ module RDF
66
66
  triples
67
67
  end
68
68
 
69
+ def all_triples done=[]
70
+ return [] if done.include?(self)
71
+ done << self
72
+ triples = self.triples
73
+ triples.map { |s,p,o| [s,o] }.flatten.uniq.each { |node| triples += graph[node].all_triples(done) }
74
+ triples
75
+ end
76
+
69
77
  def merge node
70
78
  new_node = clone
71
79
  (self.keys + node.keys).uniq.each do |k|
data/lib/lightrdf.rb CHANGED
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module RDF
5
- VERSION = '0.2.2'
5
+ VERSION = '0.2.3'
6
6
  end
7
7
 
8
8
  require 'rubygems'
data/lightrdf.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{lightrdf}
5
- s.version = "0.2.2"
5
+ s.version = "0.2.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jose Ignacio"]
9
- s.date = %q{2011-03-10}
9
+ s.date = %q{2011-03-14}
10
10
  s.default_executable = %q{yarfp}
11
11
  s.description = %q{RDF library}
12
12
  s.email = %q{joseignacio.fernandez@gmail.com}
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jose Ignacio
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-03-10 00:00:00 +01:00
17
+ date: 2011-03-14 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency