lightrdf 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/{Manifest.txt → Manifest} +1 -1
- data/Rakefile +16 -16
- data/lib/lightrdf/node.rb +4 -2
- data/lib/lightrdf/parser.rb +2 -2
- data/lib/lightrdf.rb +1 -1
- data/lightrdf.gemspec +37 -0
- metadata +24 -41
data/History.txt
CHANGED
data/{Manifest.txt → Manifest}
RENAMED
data/Rakefile
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
|
3
|
-
require '
|
4
|
-
require 'fileutils'
|
2
|
+
require 'rake'
|
3
|
+
require 'echoe'
|
5
4
|
require './lib/lightrdf'
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
Echoe.new('lightrdf', RDF::VERSION) do |p|
|
7
|
+
p.description = "RDF library"
|
8
|
+
p.summary = "Light and easy library for managing RDF data and graphs"
|
9
|
+
p.url = "http://github.com/josei/lighrdf"
|
10
|
+
p.author = "Jose Ignacio"
|
11
|
+
p.email = "joseignacio.fernandez@gmail.com"
|
12
|
+
p.install_message = '**Remember to install raptor RDF tools and (optionally for RDF PNG output) Graphviz**'
|
13
|
+
p.ignore_pattern = ["pkg/*"]
|
14
|
+
p.development_dependencies = [['activesupport','>= 2.0.2']]
|
15
|
+
end
|
10
16
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
self.developer 'José Ignacio', 'joseignacio.fernandez@gmail.com'
|
15
|
-
self.summary = "Light and easy library for managing RDF data and graphs"
|
16
|
-
self.post_install_message = '**Remember to install raptor RDF tools and (optionally for RDF PNG output) Graphviz**'
|
17
|
-
self.rubyforge_name = self.name # TODO this is default value
|
18
|
-
self.extra_deps = [['activesupport','>= 2.0.2']]
|
17
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
18
|
+
rdoc.rdoc_files.include('README.rdoc').include('lib/**/*.rb')
|
19
|
+
rdoc.main = "README.rdoc"
|
19
20
|
end
|
20
21
|
|
21
|
-
|
22
|
-
Dir['tasks/**/*.rake'].each { |t| load t }
|
22
|
+
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each
|
data/lib/lightrdf/node.rb
CHANGED
data/lib/lightrdf/parser.rb
CHANGED
@@ -47,8 +47,8 @@ module RDF
|
|
47
47
|
case format
|
48
48
|
when :ntriples
|
49
49
|
graph = RDF::Graph.new
|
50
|
-
graph.triples = text.split("
|
51
|
-
s,p,o = l.strip.match(
|
50
|
+
graph.triples = text.split("\n").map do |l|
|
51
|
+
s, p, o = l.strip.match(/\A(<\S+>|".*"|_:\w+)\s+(<\S+>|".*"|_:\w+)\s+(<\S+>|".*"|_:\w+)\s+\.\Z/).captures
|
52
52
|
[parse_chunk_ntriples(s), parse_chunk_ntriples(p), parse_chunk_ntriples(o)]
|
53
53
|
end
|
54
54
|
graph
|
data/lib/lightrdf.rb
CHANGED
data/lightrdf.gemspec
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{lightrdf}
|
5
|
+
s.version = "0.1.1"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Jose Ignacio"]
|
9
|
+
s.date = %q{2010-10-29}
|
10
|
+
s.default_executable = %q{yarfp}
|
11
|
+
s.description = %q{RDF library}
|
12
|
+
s.email = %q{joseignacio.fernandez@gmail.com}
|
13
|
+
s.executables = ["yarfp"]
|
14
|
+
s.extra_rdoc_files = ["README.rdoc", "bin/yarfp", "lib/lightrdf.rb", "lib/lightrdf/graph.rb", "lib/lightrdf/node.rb", "lib/lightrdf/parser.rb", "lib/lightrdf/quri.rb"]
|
15
|
+
s.files = ["History.txt", "Manifest", "README.rdoc", "Rakefile", "bin/yarfp", "lib/lightrdf.rb", "lib/lightrdf/graph.rb", "lib/lightrdf/node.rb", "lib/lightrdf/parser.rb", "lib/lightrdf/quri.rb", "test/test_helper.rb", "test/test_lightrdf.rb", "lightrdf.gemspec"]
|
16
|
+
s.homepage = %q{http://github.com/josei/lighrdf}
|
17
|
+
s.post_install_message = %q{**Remember to install raptor RDF tools and (optionally for RDF PNG output) Graphviz**}
|
18
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Lightrdf", "--main", "README.rdoc"]
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
s.rubyforge_project = %q{lightrdf}
|
21
|
+
s.rubygems_version = %q{1.3.6}
|
22
|
+
s.summary = %q{Light and easy library for managing RDF data and graphs}
|
23
|
+
s.test_files = ["test/test_lightrdf.rb", "test/test_helper.rb"]
|
24
|
+
|
25
|
+
if s.respond_to? :specification_version then
|
26
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
27
|
+
s.specification_version = 3
|
28
|
+
|
29
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
30
|
+
s.add_development_dependency(%q<activesupport>, [">= 2.0.2"])
|
31
|
+
else
|
32
|
+
s.add_dependency(%q<activesupport>, [">= 2.0.2"])
|
33
|
+
end
|
34
|
+
else
|
35
|
+
s.add_dependency(%q<activesupport>, [">= 2.0.2"])
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -5,15 +5,16 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
|
8
|
+
- 1
|
9
|
+
version: 0.1.1
|
9
10
|
platform: ruby
|
10
11
|
authors:
|
11
|
-
-
|
12
|
+
- Jose Ignacio
|
12
13
|
autorequire:
|
13
14
|
bindir: bin
|
14
15
|
cert_chain: []
|
15
16
|
|
16
|
-
date: 2010-10-
|
17
|
+
date: 2010-10-29 00:00:00 +02:00
|
17
18
|
default_executable:
|
18
19
|
dependencies:
|
19
20
|
- !ruby/object:Gem::Dependency
|
@@ -28,49 +29,25 @@ dependencies:
|
|
28
29
|
- 0
|
29
30
|
- 2
|
30
31
|
version: 2.0.2
|
31
|
-
type: :runtime
|
32
|
-
version_requirements: *id001
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: rubyforge
|
35
|
-
prerelease: false
|
36
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
segments:
|
41
|
-
- 2
|
42
|
-
- 0
|
43
|
-
- 4
|
44
|
-
version: 2.0.4
|
45
|
-
type: :development
|
46
|
-
version_requirements: *id002
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: hoe
|
49
|
-
prerelease: false
|
50
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
segments:
|
55
|
-
- 2
|
56
|
-
- 6
|
57
|
-
- 0
|
58
|
-
version: 2.6.0
|
59
32
|
type: :development
|
60
|
-
version_requirements: *
|
61
|
-
description:
|
62
|
-
email:
|
63
|
-
- joseignacio.fernandez@gmail.com
|
33
|
+
version_requirements: *id001
|
34
|
+
description: RDF library
|
35
|
+
email: joseignacio.fernandez@gmail.com
|
64
36
|
executables:
|
65
37
|
- yarfp
|
66
38
|
extensions: []
|
67
39
|
|
68
40
|
extra_rdoc_files:
|
69
|
-
-
|
70
|
-
-
|
41
|
+
- README.rdoc
|
42
|
+
- bin/yarfp
|
43
|
+
- lib/lightrdf.rb
|
44
|
+
- lib/lightrdf/graph.rb
|
45
|
+
- lib/lightrdf/node.rb
|
46
|
+
- lib/lightrdf/parser.rb
|
47
|
+
- lib/lightrdf/quri.rb
|
71
48
|
files:
|
72
49
|
- History.txt
|
73
|
-
- Manifest
|
50
|
+
- Manifest
|
74
51
|
- README.rdoc
|
75
52
|
- Rakefile
|
76
53
|
- bin/yarfp
|
@@ -81,12 +58,17 @@ files:
|
|
81
58
|
- lib/lightrdf/quri.rb
|
82
59
|
- test/test_helper.rb
|
83
60
|
- test/test_lightrdf.rb
|
61
|
+
- lightrdf.gemspec
|
84
62
|
has_rdoc: true
|
85
|
-
homepage: http://github.com/josei/
|
63
|
+
homepage: http://github.com/josei/lighrdf
|
86
64
|
licenses: []
|
87
65
|
|
88
66
|
post_install_message: "**Remember to install raptor RDF tools and (optionally for RDF PNG output) Graphviz**"
|
89
67
|
rdoc_options:
|
68
|
+
- --line-numbers
|
69
|
+
- --inline-source
|
70
|
+
- --title
|
71
|
+
- Lightrdf
|
90
72
|
- --main
|
91
73
|
- README.rdoc
|
92
74
|
require_paths:
|
@@ -103,8 +85,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
85
|
- - ">="
|
104
86
|
- !ruby/object:Gem::Version
|
105
87
|
segments:
|
106
|
-
-
|
107
|
-
|
88
|
+
- 1
|
89
|
+
- 2
|
90
|
+
version: "1.2"
|
108
91
|
requirements: []
|
109
92
|
|
110
93
|
rubyforge_project: lightrdf
|