ruby-sesame 0.1.0
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/COPYING +674 -0
- data/History.txt +3 -0
- data/Manifest.txt +10 -0
- data/README.txt +27 -0
- data/Rakefile +30 -0
- data/lib/ruby-sesame.rb +346 -0
- data/spec/live_spec.rb +273 -0
- data/spec/shared_ruby_sesame_spec.rb +45 -0
- data/spec/spec.opts +4 -0
- data/spec/spec_helper.rb +24 -0
- metadata +74 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Ruby-Sesame: a Ruby library to interact with OpenRDF.org's Sesame RDF
|
|
2
|
+
# framework via its REST interface.
|
|
3
|
+
#
|
|
4
|
+
# Copyright (C) 2008 Paul Legato (pjlegato at gmail dot com).
|
|
5
|
+
#
|
|
6
|
+
# This file is part of Ruby-Sesame.
|
|
7
|
+
#
|
|
8
|
+
# Ruby-Sesame is free software: you can redistribute it and/or modify
|
|
9
|
+
# it under the terms of the GNU General Public License as published by
|
|
10
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
# (at your option) any later version.
|
|
12
|
+
#
|
|
13
|
+
# Ruby-Sesame is distributed in the hope that it will be useful,
|
|
14
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
# GNU General Public License for more details.
|
|
17
|
+
#
|
|
18
|
+
# You should have received a copy of the GNU General Public License
|
|
19
|
+
# along with Ruby-Sesame. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
|
|
21
|
+
require File.join(File.dirname(__FILE__), *%w[spec_helper])
|
|
22
|
+
|
|
23
|
+
shared_examples_for "shared RubySesame specs" do
|
|
24
|
+
|
|
25
|
+
it "should initialize cleanly" do
|
|
26
|
+
lambda { RubySesame::Server.new("http://foo.bar:12345") }.should_not raise_error
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
it "should auto-add a trailing slash to a given server URL if it doesn't have one" do
|
|
30
|
+
server = RubySesame::Server.new("http://foo.bar:123")
|
|
31
|
+
server.url.should == "http://foo.bar:123/"
|
|
32
|
+
|
|
33
|
+
server = RubySesame::Server.new("http://foo.bar:987/")
|
|
34
|
+
server.url.should == "http://foo.bar:987/"
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it "should be able to make POST parameters correectly" do
|
|
38
|
+
RubySesame::Repository.post_parameterize(:foo => "bar", :baz => "asdf:foo").sort.should == ["baz=asdf%3Afoo", "foo=bar"]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
it "should be able to make GET parameters correectly" do
|
|
42
|
+
RubySesame::Repository.get_parameterize(:foo => "bar", :baz => "asdf:foo").split("&").sort.should == ["baz=asdf%3Afoo", "foo=bar"]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
end
|
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Ruby-Sesame: a Ruby library to interact with OpenRDF.org's Sesame RDF
|
|
2
|
+
# framework via its REST interface.
|
|
3
|
+
#
|
|
4
|
+
# Copyright (C) 2008 Paul Legato (pjlegato at gmail dot com).
|
|
5
|
+
#
|
|
6
|
+
# This file is part of Ruby-Sesame.
|
|
7
|
+
#
|
|
8
|
+
# Ruby-Sesame is free software: you can redistribute it and/or modify
|
|
9
|
+
# it under the terms of the GNU General Public License as published by
|
|
10
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
# (at your option) any later version.
|
|
12
|
+
#
|
|
13
|
+
# Ruby-Sesame is distributed in the hope that it will be useful,
|
|
14
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
# GNU General Public License for more details.
|
|
17
|
+
#
|
|
18
|
+
# You should have received a copy of the GNU General Public License
|
|
19
|
+
# along with Ruby-Sesame. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
|
|
21
|
+
require 'rubygems'
|
|
22
|
+
require 'spec'
|
|
23
|
+
require File.join(File.dirname(__FILE__), *%w[shared_ruby_sesame_spec])
|
|
24
|
+
require File.join(File.dirname(__FILE__), *%w[../lib/ruby-sesame])
|
metadata
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: ruby-sesame
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Paul Legato
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
|
|
12
|
+
date: 2008-12-06 00:00:00 -08:00
|
|
13
|
+
default_executable:
|
|
14
|
+
dependencies:
|
|
15
|
+
- !ruby/object:Gem::Dependency
|
|
16
|
+
name: hoe
|
|
17
|
+
type: :development
|
|
18
|
+
version_requirement:
|
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
20
|
+
requirements:
|
|
21
|
+
- - ">="
|
|
22
|
+
- !ruby/object:Gem::Version
|
|
23
|
+
version: 1.7.0
|
|
24
|
+
version:
|
|
25
|
+
description: ""
|
|
26
|
+
email: pjlegato at gmail dot com
|
|
27
|
+
executables: []
|
|
28
|
+
|
|
29
|
+
extensions: []
|
|
30
|
+
|
|
31
|
+
extra_rdoc_files:
|
|
32
|
+
- History.txt
|
|
33
|
+
- Manifest.txt
|
|
34
|
+
- README.txt
|
|
35
|
+
files:
|
|
36
|
+
- COPYING
|
|
37
|
+
- History.txt
|
|
38
|
+
- Manifest.txt
|
|
39
|
+
- README.txt
|
|
40
|
+
- Rakefile
|
|
41
|
+
- lib/ruby-sesame.rb
|
|
42
|
+
- spec/live_spec.rb
|
|
43
|
+
- spec/shared_ruby_sesame_spec.rb
|
|
44
|
+
- spec/spec.opts
|
|
45
|
+
- spec/spec_helper.rb
|
|
46
|
+
has_rdoc: true
|
|
47
|
+
homepage: http://ruby-sesame.rubyforge.org
|
|
48
|
+
post_install_message:
|
|
49
|
+
rdoc_options:
|
|
50
|
+
- --main
|
|
51
|
+
- README.txt
|
|
52
|
+
require_paths:
|
|
53
|
+
- lib
|
|
54
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
55
|
+
requirements:
|
|
56
|
+
- - ">="
|
|
57
|
+
- !ruby/object:Gem::Version
|
|
58
|
+
version: "0"
|
|
59
|
+
version:
|
|
60
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
|
+
requirements:
|
|
62
|
+
- - ">="
|
|
63
|
+
- !ruby/object:Gem::Version
|
|
64
|
+
version: "0"
|
|
65
|
+
version:
|
|
66
|
+
requirements: []
|
|
67
|
+
|
|
68
|
+
rubyforge_project: ruby-sesame
|
|
69
|
+
rubygems_version: 1.3.0
|
|
70
|
+
signing_key:
|
|
71
|
+
specification_version: 2
|
|
72
|
+
summary: A Ruby interface to OpenRDF.org's Sesame RDF triple store
|
|
73
|
+
test_files: []
|
|
74
|
+
|