Permalink
Browse files

Merging in changes from pius

  • Loading branch information...
3 parents c2a8a08 + c2a8a08 + 3efeca6 commit 789d5b14fa328960e79e88a32e1e6f15a3270393 @tommorris committed Jul 12, 2008
View
@@ -0,0 +1,48 @@
+= rena
+
+* http://github.com/tommorris/rena
+
+== DESCRIPTION:
+
+Rena is an RDF library for Ruby.
+
+== FEATURES/PROBLEMS:
+
+* Features
+
+== SYNOPSIS:
+
+ Synopsis
+
+== REQUIREMENTS:
+
+* Addressable gem
+
+== INSTALL:
+
+* (sudo gem install rena)
+
+== LICENSE:
+
+(The MIT License)
+
+Copyright (c) 2008 Tom Morris
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,5 @@
+$:.unshift File.dirname(__FILE__)
+Dir.glob(File.join(File.dirname(__FILE__), 'rena/*.rb')).each { |f| require f }
+
+module Rena
+end
File renamed without changes.
@@ -1,8 +1,9 @@
-require 'lib/namespace'
-require 'lib/bnode'
-require 'lib/uriref'
-require 'lib/literal'
-require 'lib/triple'
+require 'lib/rena/namespace'
+require 'lib/rena/bnode'
+require 'lib/rena/uriref'
+require 'lib/rena/literal'
+require 'lib/rena/triple'
+
class Graph
attr_accessor :triples, :nsbinding
File renamed without changes.
@@ -1,5 +1,5 @@
-require 'lib/uriref'
-require 'lib/graph'
+require 'lib/rena/uriref'
+require 'lib/rena/graph'
class Namespace
attr_accessor :short, :uri
@@ -1,9 +1,9 @@
-require 'lib/uriref'
-require 'lib/graph'
-require 'lib/literal'
-require 'lib/exceptions/uri_relative_exception'
-require 'lib/exceptions/about_each_exception'
-require 'lib/rexml_hacks'
+require 'lib/rena/uriref'
+require 'lib/rena/graph'
+require 'lib/rena/literal'
+require 'lib/rena/exceptions/uri_relative_exception'
+require 'lib/rena/exceptions/about_each_exception'
+require 'lib/rena/rexml_hacks'
class RdfXmlParser
attr_accessor :xml, :graph
File renamed without changes.
File renamed without changes.
@@ -1,9 +1,11 @@
+require 'rubygems'
require 'addressable/uri'
-require 'lib/exceptions/uri_relative_exception'
+require 'lib/rena/exceptions/uri_relative_exception'
class URIRef
attr_accessor :uri
def initialize (string)
+ self.test_string(string)
@uri = Addressable::URI.parse(string)
if @uri.relative?
raise UriRelativeException, "<" + @uri.to_s + ">"
@@ -21,11 +23,11 @@ def to_ntriples
"<" + @uri.to_s + ">"
end
- # def test_string (string)
- # string.each_byte do |b|
- # if b >= 0 and b <= 31
- # raise "URI must not contain control characters"
- # end
- # end
- # end
+ def test_string (string)
+ string.each_byte do |b|
+ if b >= 0 and b <= 31
+ raise "URI must not contain control characters"
+ end
+ end
+ end
end
View
@@ -0,0 +1,16 @@
+Gem::Specification.new do |s|
+ s.name = "rena"
+ s.version = "0.0.1"
+ s.date = "2008-07-12"
+ s.summary = "Ruby RDF library."
+ s.email = "tom@tommorris.org"
+ s.homepage = "http://github.com/tommorris/rena"
+ s.description = "Rena is a Ruby library for manipulating RDF files."
+ s.has_rdoc = true
+ s.authors = ["Tom Morris"]
+ s.files = ["README.txt", "Rakefile", "rena.gemspec", "lib/rena.rb", "lib/rena/bnode.rb", "lib/rena/graph.rb", "lib/rena/literal.rb", "lib/rena/namespace.rb", "lib/rena/rdfxmlparser.rb", "lib/rena/rexml_hacks.rb", "lib/rena/triple.rb", "lib/rena/uriref.rb", "lib/rena/exceptions/about_each_exception.rb", "lib/rena/exceptions/uri_relative_exception.rb"]
+ s.test_files = ["test/test_uris.rb", "test/xml.rdf", "test/spec/bnode.spec.rb", "test/spec/graph.spec.rb", "test/spec/literal.spec.rb", "test/spec/namespaces.spec.rb", "test/spec/parser.spec.rb", "test/spec/rexml_hacks.spec.rb", "test/spec/triple.spec.rb", "test/spec/uriref.spec.rb"]
+ #s.rdoc_options = ["--main", "README.txt"]
+ #s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
+ s.add_dependency("addressable", ["> 0.0.0"])
+end

0 comments on commit 789d5b1

Please sign in to comment.