pho 0.4 → 0.4.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/CHANGES +12 -1
- data/Rakefile +2 -2
- data/doc/index.html +15 -1
- data/doc/rdoc/classes/Pho.html +14 -0
- data/doc/rdoc/classes/Pho/DatatypeProperty.html +12 -12
- data/doc/rdoc/classes/Pho/Etags.html +36 -36
- data/doc/rdoc/classes/Pho/Facet/Results.html +19 -19
- data/doc/rdoc/classes/Pho/Facet/Term.html +6 -6
- data/doc/rdoc/classes/Pho/FieldPredicateMap.html +90 -90
- data/doc/rdoc/classes/Pho/FieldWeighting.html +12 -12
- data/doc/rdoc/classes/Pho/Job.html +64 -64
- data/doc/rdoc/classes/Pho/Jobs.html +61 -61
- data/doc/rdoc/classes/Pho/Namespaces.html +6 -1
- data/doc/rdoc/classes/Pho/QueryProfile.html +61 -61
- data/doc/rdoc/classes/Pho/RDFCollection.html +71 -71
- data/doc/rdoc/classes/Pho/RDF_JSON.html +118 -0
- data/doc/rdoc/classes/Pho/RDF_JSON/SetAlgebra.html +240 -0
- data/doc/rdoc/classes/Pho/Snapshot.html +35 -35
- data/doc/rdoc/classes/Pho/Status.html +26 -26
- data/doc/rdoc/classes/Pho/Store.html +342 -264
- data/doc/rdoc/classes/Pho/Update.html +127 -0
- data/doc/rdoc/classes/Pho/Update/Changeset.html +520 -0
- data/doc/rdoc/classes/Pho/Update/ChangesetBuilder.html +330 -0
- data/doc/rdoc/classes/Pho/Update/Changesets.html +204 -0
- data/doc/rdoc/classes/Pho/Update/LiteralStatement.html +248 -0
- data/doc/rdoc/classes/Pho/Update/ResourceStatement.html +213 -0
- data/doc/rdoc/classes/Pho/Update/Statement.html +302 -0
- data/doc/rdoc/classes/String.html +146 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGES.html +33 -2
- data/doc/rdoc/files/lib/pho/changeset_builder_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/changeset_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/job_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/query_profile_rb.html +1 -1
- data/doc/rdoc/files/lib/pho/rdf_json_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/store_rb.html +1 -1
- data/doc/rdoc/files/lib/pho_rb.html +4 -1
- data/doc/rdoc/fr_class_index.html +10 -0
- data/doc/rdoc/fr_file_index.html +3 -0
- data/doc/rdoc/fr_method_index.html +140 -110
- data/lib/pho.rb +14 -1
- data/lib/pho/changeset.rb +312 -0
- data/lib/pho/changeset_builder.rb +118 -0
- data/lib/pho/job.rb +1 -1
- data/lib/pho/query_profile.rb +1 -1
- data/lib/pho/rdf_json.rb +81 -0
- data/lib/pho/store.rb +63 -25
- data/tests/tc_changeset.rb +273 -0
- data/tests/tc_changeset_builder.rb +151 -0
- data/tests/tc_changesets.rb +96 -0
- data/tests/tc_metabox.rb +20 -2
- data/tests/tc_query_profile.rb +4 -2
- data/tests/tc_rdf_json.rb +273 -0
- data/tests/tc_search.rb +5 -5
- data/tests/tc_sparql.rb +12 -0
- data/tests/ts_pho.rb +5 -1
- metadata +25 -3
data/tests/tc_search.rb
CHANGED
@@ -8,7 +8,7 @@ class SearchTest < Test::Unit::TestCase
|
|
8
8
|
def test_simple_search
|
9
9
|
mc = mock()
|
10
10
|
mc.stub_everything()
|
11
|
-
mc.expects(:get).with("http://api.talis.com/stores/testing/items", {"query" => "lunar"}
|
11
|
+
mc.expects(:get).with("http://api.talis.com/stores/testing/items", {"query" => "lunar"})
|
12
12
|
|
13
13
|
store = Pho::Store.new("http://api.talis.com/stores/testing", "user", "pass", mc)
|
14
14
|
s = store.search("lunar")
|
@@ -17,7 +17,7 @@ class SearchTest < Test::Unit::TestCase
|
|
17
17
|
def test_parameter_search
|
18
18
|
mc = mock()
|
19
19
|
mc.stub_everything()
|
20
|
-
mc.expects(:get).with("http://api.talis.com/stores/testing/items", {"query" => "lunar", "max" => "50", "offset" => "10"}
|
20
|
+
mc.expects(:get).with("http://api.talis.com/stores/testing/items", {"query" => "lunar", "max" => "50", "offset" => "10"})
|
21
21
|
|
22
22
|
store = Pho::Store.new("http://api.talis.com/stores/testing", "user", "pass", mc)
|
23
23
|
s = store.search("lunar", {"max" => "50", "offset" => "10"})
|
@@ -26,7 +26,7 @@ class SearchTest < Test::Unit::TestCase
|
|
26
26
|
def test_facet
|
27
27
|
mc = mock()
|
28
28
|
mc.expects(:set_auth)
|
29
|
-
mc.expects(:get).with("http://api.talis.com/stores/testing/services/facet", {"query" => "lunar", "fields" => "name,agency"}
|
29
|
+
mc.expects(:get).with("http://api.talis.com/stores/testing/services/facet", {"query" => "lunar", "fields" => "name,agency"})
|
30
30
|
|
31
31
|
store = Pho::Store.new("http://api.talis.com/stores/testing", "user", "pass", mc)
|
32
32
|
s = store.facet("lunar", ["name", "agency"] )
|
@@ -35,7 +35,7 @@ class SearchTest < Test::Unit::TestCase
|
|
35
35
|
def test_augment_uri
|
36
36
|
mc = mock()
|
37
37
|
mc.expects(:set_auth)
|
38
|
-
mc.expects(:get).with("http://api.talis.com/stores/testing/services/augment", {"data-uri" => "http://www.example.org/index.rss"}
|
38
|
+
mc.expects(:get).with("http://api.talis.com/stores/testing/services/augment", {"data-uri" => "http://www.example.org/index.rss"})
|
39
39
|
|
40
40
|
|
41
41
|
store = Pho::Store.new("http://api.talis.com/stores/testing", "user", "pass", mc)
|
@@ -45,7 +45,7 @@ class SearchTest < Test::Unit::TestCase
|
|
45
45
|
def test_augment
|
46
46
|
mc = mock()
|
47
47
|
mc.expects(:set_auth)
|
48
|
-
|
48
|
+
mc.expects(:post).with("http://api.talis.com/stores/testing/services/augment", "data", nil)
|
49
49
|
|
50
50
|
store = Pho::Store.new("http://api.talis.com/stores/testing", "user", "pass", mc)
|
51
51
|
response = store.augment("data")
|
data/tests/tc_sparql.rb
CHANGED
@@ -17,6 +17,18 @@ class SparqlTest < Test::Unit::TestCase
|
|
17
17
|
assert_equal("RESULTS", response.content)
|
18
18
|
end
|
19
19
|
|
20
|
+
def test_simple_multisparql
|
21
|
+
|
22
|
+
mc = mock()
|
23
|
+
mc.expects(:set_auth)
|
24
|
+
mc.expects(:get).with("http://api.talis.com/stores/testing/services/multisparql", {"query" => "SPARQL"}, {"Accept" => "application/rdf+xml"} ).returns(
|
25
|
+
HTTP::Message.new_response("RESULTS"))
|
26
|
+
|
27
|
+
store = Pho::Store.new("http://api.talis.com/stores/testing", "user", "pass", mc)
|
28
|
+
response = store.sparql("SPARQL", "application/rdf+xml", :multisparql)
|
29
|
+
assert_equal("RESULTS", response.content)
|
30
|
+
end
|
31
|
+
|
20
32
|
def test_sparql_with_mimetype
|
21
33
|
|
22
34
|
mc = mock()
|
data/tests/ts_pho.rb
CHANGED
@@ -13,4 +13,8 @@ require 'tc_search.rb'
|
|
13
13
|
require 'tc_sparql.rb'
|
14
14
|
require 'tc_status.rb'
|
15
15
|
require 'tc_job.rb'
|
16
|
-
require 'tc_rdf_collection.rb'
|
16
|
+
require 'tc_rdf_collection.rb'
|
17
|
+
require 'tc_rdf_json.rb'
|
18
|
+
require 'tc_changeset_builder.rb'
|
19
|
+
require 'tc_changeset.rb'
|
20
|
+
require 'tc_changesets.rb'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leigh Dodds
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-22 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -69,11 +69,14 @@ files:
|
|
69
69
|
- doc/rdoc/classes/Pho/DatatypeProperty.html
|
70
70
|
- doc/rdoc/classes/Pho/Facet.html
|
71
71
|
- doc/rdoc/classes/Pho/JobUpdate.html
|
72
|
+
- doc/rdoc/classes/Pho/RDF_JSON
|
73
|
+
- doc/rdoc/classes/Pho/RDF_JSON/SetAlgebra.html
|
72
74
|
- doc/rdoc/classes/Pho/RDFCollection.html
|
73
75
|
- doc/rdoc/classes/Pho/Job.html
|
74
76
|
- doc/rdoc/classes/Pho/Status.html
|
75
77
|
- doc/rdoc/classes/Pho/QueryProfile.html
|
76
78
|
- doc/rdoc/classes/Pho/Snapshot.html
|
79
|
+
- doc/rdoc/classes/Pho/RDF_JSON.html
|
77
80
|
- doc/rdoc/classes/Pho/FieldWeighting.html
|
78
81
|
- doc/rdoc/classes/Pho/Namespaces.html
|
79
82
|
- doc/rdoc/classes/Pho/Store.html
|
@@ -82,16 +85,28 @@ files:
|
|
82
85
|
- doc/rdoc/classes/Pho/Facet/Term.html
|
83
86
|
- doc/rdoc/classes/Pho/Analyzers.html
|
84
87
|
- doc/rdoc/classes/Pho/FieldPredicateMap.html
|
88
|
+
- doc/rdoc/classes/Pho/Update.html
|
89
|
+
- doc/rdoc/classes/Pho/Update
|
90
|
+
- doc/rdoc/classes/Pho/Update/Changesets.html
|
91
|
+
- doc/rdoc/classes/Pho/Update/ChangesetBuilder.html
|
92
|
+
- doc/rdoc/classes/Pho/Update/Changeset.html
|
93
|
+
- doc/rdoc/classes/Pho/Update/Statement.html
|
94
|
+
- doc/rdoc/classes/Pho/Update/LiteralStatement.html
|
95
|
+
- doc/rdoc/classes/Pho/Update/ResourceStatement.html
|
96
|
+
- doc/rdoc/classes/String.html
|
85
97
|
- doc/rdoc/classes/Pho.html
|
86
98
|
- doc/rdoc/files
|
87
99
|
- doc/rdoc/files/README.html
|
88
100
|
- doc/rdoc/files/lib
|
89
101
|
- doc/rdoc/files/lib/pho_rb.html
|
90
102
|
- doc/rdoc/files/lib/pho
|
103
|
+
- doc/rdoc/files/lib/pho/changeset_rb.html
|
104
|
+
- doc/rdoc/files/lib/pho/changeset_builder_rb.html
|
91
105
|
- doc/rdoc/files/lib/pho/job_rb.html
|
92
106
|
- doc/rdoc/files/lib/pho/rdf_collection_rb.html
|
93
107
|
- doc/rdoc/files/lib/pho/query_profile_rb.html
|
94
108
|
- doc/rdoc/files/lib/pho/etags_rb.html
|
109
|
+
- doc/rdoc/files/lib/pho/rdf_json_rb.html
|
95
110
|
- doc/rdoc/files/lib/pho/snapshot_rb.html
|
96
111
|
- doc/rdoc/files/lib/pho/field_predicate_map_rb.html
|
97
112
|
- doc/rdoc/files/lib/pho/store_rb.html
|
@@ -101,17 +116,21 @@ files:
|
|
101
116
|
- doc/rdoc/index.html
|
102
117
|
- doc/rdoc/created.rid
|
103
118
|
- tests/tc_facet.rb
|
119
|
+
- tests/tc_changesets.rb
|
104
120
|
- tests/tc_metabox.rb
|
105
121
|
- tests/tc_store_util.rb
|
106
122
|
- tests/tc_contentbox.rb
|
107
123
|
- tests/tc_sparql.rb
|
124
|
+
- tests/tc_changeset_builder.rb
|
108
125
|
- tests/tc_rdf_collection.rb
|
109
126
|
- tests/ts_pho.rb
|
110
127
|
- tests/tc_jobcontrol.rb
|
128
|
+
- tests/tc_rdf_json.rb
|
111
129
|
- tests/tc_snapshots.rb
|
112
130
|
- tests/tc_job.rb
|
113
131
|
- tests/tc_search.rb
|
114
132
|
- tests/tc_status.rb
|
133
|
+
- tests/tc_changeset.rb
|
115
134
|
- tests/tc_etags.rb
|
116
135
|
- tests/tc_field_predicate_map.rb
|
117
136
|
- tests/tc_query_profile.rb
|
@@ -120,11 +139,14 @@ files:
|
|
120
139
|
- examples/contentbox.rb
|
121
140
|
- lib/pho.rb
|
122
141
|
- lib/pho
|
142
|
+
- lib/pho/changeset_builder.rb
|
143
|
+
- lib/pho/rdf_json.rb
|
123
144
|
- lib/pho/etags.rb
|
124
145
|
- lib/pho/status.rb
|
125
146
|
- lib/pho/rdf_collection.rb
|
126
147
|
- lib/pho/store.rb
|
127
148
|
- lib/pho/field_predicate_map.rb
|
149
|
+
- lib/pho/changeset.rb
|
128
150
|
- lib/pho/facet.rb
|
129
151
|
- lib/pho/query_profile.rb
|
130
152
|
- lib/pho/job.rb
|
@@ -144,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
166
|
requirements:
|
145
167
|
- - ">="
|
146
168
|
- !ruby/object:Gem::Version
|
147
|
-
version: 1.8.
|
169
|
+
version: 1.8.5
|
148
170
|
version:
|
149
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
172
|
requirements:
|