lightrdf 0.1 → 0.1.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.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.1.1 2010-10-29
2
+
3
+ * Corrected parsing of ntriples format
4
+ * Fixes for Ruby 1.9
5
+
1
6
  === 0.1 2010-10-06
2
7
 
3
8
  * Initial release
@@ -1,5 +1,5 @@
1
1
  History.txt
2
- Manifest.txt
2
+ Manifest
3
3
  README.rdoc
4
4
  Rakefile
5
5
  bin/yarfp
data/Rakefile CHANGED
@@ -1,22 +1,22 @@
1
1
  require 'rubygems'
2
- gem 'hoe', '>= 2.1.0'
3
- require 'hoe'
4
- require 'fileutils'
2
+ require 'rake'
3
+ require 'echoe'
5
4
  require './lib/lightrdf'
6
5
 
7
- Hoe.plugin :newgem
8
- # Hoe.plugin :website
9
- # Hoe.plugin :cucumberfeatures
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
- # Generate all the Rake tasks
12
- # Run 'rake -T' to see list of generated tasks (from gem root directory)
13
- $hoe = Hoe.spec 'lightrdf' do
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
- require 'newgem/tasks'
22
- Dir['tasks/**/*.rake'].each { |t| load t }
22
+ Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each
data/lib/lightrdf/node.rb CHANGED
@@ -1,8 +1,10 @@
1
1
  module RDF
2
2
  class NsProxy
3
- undef :type
3
+ if RUBY_VERSION < '1.9'
4
+ undef :type
5
+ undef :id
6
+ end
4
7
  undef :class
5
- undef :id
6
8
  def initialize ns, object
7
9
  @object = object
8
10
  @ns = ns
@@ -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(".\n").map do |l|
51
- s,p,o = l.strip.match(/(<.+>|".*"|_:.*)\W(<.+>|".*"|_:.*)\W(<.+>|".*"|_:.*)/).captures
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
@@ -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.1'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
 
8
8
  require 'rubygems'
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
- version: "0.1"
8
+ - 1
9
+ version: 0.1.1
9
10
  platform: ruby
10
11
  authors:
11
- - "Jos\xC3\xA9 Ignacio"
12
+ - Jose Ignacio
12
13
  autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []
15
16
 
16
- date: 2010-10-06 00:00:00 +02:00
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: *id003
61
- description: LightRDF is a gem that makes managing RDF data and graphs easily with a Ruby interface.
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
- - History.txt
70
- - Manifest.txt
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.txt
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/lightrdf
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
- - 0
107
- version: "0"
88
+ - 1
89
+ - 2
90
+ version: "1.2"
108
91
  requirements: []
109
92
 
110
93
  rubyforge_project: lightrdf