sparql 0.3.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -168,18 +168,18 @@ Full documentation available on [Rubydoc.info][SPARQL doc]
168
168
  ## Dependencies
169
169
 
170
170
  * [Ruby](http://ruby-lang.org/) (>= 1.9) or (>= 1.8.1 with [Backports][])
171
- * [RDF.rb](http://rubygems.org/gems/rdf) (>= 0.3.5)
172
- * [SPARQL::Client](https://rubygems.org/gems/sparql-client) (>= 0.0.11)
173
- * [SXP](https://rubygems.org/gems/sxp) (>= 0.0.15)
171
+ * [RDF.rb](http://rubygems.org/gems/rdf) (>= 1.0)
172
+ * [SPARQL::Client](https://rubygems.org/gems/sparql-client) (>= 1.0)
173
+ * [SXP](https://rubygems.org/gems/sxp) (>= 0.1.0)
174
174
  * [Builder](https://rubygems.org/gems/builder) (>= 3.0.0)
175
175
  * [JSON](https://rubygems.org/gems/json) (>= 1.5.1)
176
- * Soft dependency on [Linked Data][] (>= 0.3.5)
177
- * Soft dependency on [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.3.3)
176
+ * Soft dependency on [Linked Data][] (>= 1.0)
177
+ * Soft dependency on [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.5.0)
178
178
  Falls back to REXML for XML parsing Builder for XML serializing. Nokogiri is much more efficient
179
- * Soft dependency on [Equivalent XML](https://rubygems.org/gems/equivalent-xml) (>= 0.2.9)
179
+ * Soft dependency on [Equivalent XML](https://rubygems.org/gems/equivalent-xml) (>= 0.3.0)
180
180
  Equivalent XML performs more efficient comparisons of XML Literals when Nokogiri is included
181
- * Soft dependency on [Rack][] (>= 1.3.2)
182
- * Soft dependency on [Sinatra][] (>= 1.4.1)
181
+ * Soft dependency on [Rack][] (>= 1.4.4)
182
+ * Soft dependency on [Sinatra][] (>= 1.3.3)
183
183
 
184
184
  ## Installation
185
185
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 1.0.0
@@ -42,10 +42,12 @@ module Rack; module SPARQL
42
42
  # @see http://rack.rubyforge.org/doc/SPEC.html
43
43
  def call(env)
44
44
  response = app.call(env)
45
- case response[2] # the body
46
- when RDF::Enumerable, RDF::Query::Solutions, RDF::Literal::Boolean
47
- serialize(env, *response)
48
- else response
45
+ body = response[2].respond_to?(:body) ? response[2].body : response[2]
46
+ case body
47
+ when RDF::Enumerable, RDF::Query::Solutions, RDF::Literal::Boolean
48
+ response[2] = body # Put it back in the response, it might have been a proxy
49
+ serialize(env, *response)
50
+ else response
49
51
  end
50
52
  end
51
53
 
@@ -25,10 +25,16 @@ module SPARQL; module Algebra
25
25
 
26
26
  NAME = [:dataset]
27
27
  # Selected accept headers, from those available
28
- ACCEPTS = (%w(text/turtle application/rdf+xml;q=0.8 text/plain;q=0.4).
28
+ ACCEPTS = (%w(
29
+ text/turtle
30
+ application/rdf+xml;q=0.8
31
+ application/n-triples;q=0.4
32
+ text/plain;q=0.1
33
+ ).
29
34
  select do |content_type|
35
+ # Add other content types
30
36
  RDF::Format.content_types.include?(content_type.split(';').first)
31
- end << ' */*;q=0.1').join(', ').freeze
37
+ end << ' */*;q=0.2').join(', ').freeze
32
38
 
33
39
  ##
34
40
  # Executes this query on the given `queryable` graph or repository.
@@ -1,7 +1,7 @@
1
1
  module SPARQL
2
2
  module VERSION
3
3
  VERSION_FILE = File.join(File.expand_path(File.dirname(__FILE__)), "..", "..", "VERSION")
4
- MAJOR, MINOR, TINY, EXTRA = File.read(VERSION_FILE).chop.split(".")
4
+ MAJOR, MINOR, TINY, EXTRA = File.read(VERSION_FILE).chomp.split(".")
5
5
 
6
6
  STRING = [MAJOR, MINOR, TINY, EXTRA].compact.join('.')
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-01-02 00:00:00.000000000 Z
14
+ date: 2013-01-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rdf
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ! '>='
22
22
  - !ruby/object:Gem::Version
23
- version: 0.3.5
23
+ version: '1.0'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,7 +28,7 @@ dependencies:
28
28
  requirements:
29
29
  - - ! '>='
30
30
  - !ruby/object:Gem::Version
31
- version: 0.3.5
31
+ version: '1.0'
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: builder
34
34
  requirement: !ruby/object:Gem::Requirement
@@ -36,7 +36,7 @@ dependencies:
36
36
  requirements:
37
37
  - - ! '>='
38
38
  - !ruby/object:Gem::Version
39
- version: 3.0.0
39
+ version: '3.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
@@ -44,7 +44,7 @@ dependencies:
44
44
  requirements:
45
45
  - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.0
47
+ version: '3.0'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: json
50
50
  requirement: !ruby/object:Gem::Requirement
@@ -52,7 +52,7 @@ dependencies:
52
52
  requirements:
53
53
  - - ! '>='
54
54
  - !ruby/object:Gem::Version
55
- version: 1.5.1
55
+ version: '1.7'
56
56
  type: :runtime
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
@@ -60,7 +60,7 @@ dependencies:
60
60
  requirements:
61
61
  - - ! '>='
62
62
  - !ruby/object:Gem::Version
63
- version: 1.5.1
63
+ version: '1.7'
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: sxp
66
66
  requirement: !ruby/object:Gem::Requirement
@@ -68,7 +68,7 @@ dependencies:
68
68
  requirements:
69
69
  - - ! '>='
70
70
  - !ruby/object:Gem::Version
71
- version: 0.0.14
71
+ version: '0'
72
72
  type: :runtime
73
73
  prerelease: false
74
74
  version_requirements: !ruby/object:Gem::Requirement
@@ -76,7 +76,7 @@ dependencies:
76
76
  requirements:
77
77
  - - ! '>='
78
78
  - !ruby/object:Gem::Version
79
- version: 0.0.14
79
+ version: '0'
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: sparql-client
82
82
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +84,7 @@ dependencies:
84
84
  requirements:
85
85
  - - ! '>='
86
86
  - !ruby/object:Gem::Version
87
- version: 0.1.0
87
+ version: '1.0'
88
88
  type: :runtime
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
@@ -92,7 +92,7 @@ dependencies:
92
92
  requirements:
93
93
  - - ! '>='
94
94
  - !ruby/object:Gem::Version
95
- version: 0.1.0
95
+ version: '1.0'
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: rdf-xsd
98
98
  requirement: !ruby/object:Gem::Requirement
@@ -100,7 +100,7 @@ dependencies:
100
100
  requirements:
101
101
  - - ! '>='
102
102
  - !ruby/object:Gem::Version
103
- version: 0.3.5
103
+ version: '1.0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
@@ -108,7 +108,7 @@ dependencies:
108
108
  requirements:
109
109
  - - ! '>='
110
110
  - !ruby/object:Gem::Version
111
- version: 0.3.5
111
+ version: '1.0'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: sinatra
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -116,7 +116,7 @@ dependencies:
116
116
  requirements:
117
117
  - - ! '>='
118
118
  - !ruby/object:Gem::Version
119
- version: 1.3.2
119
+ version: 1.3.3
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
@@ -124,7 +124,7 @@ dependencies:
124
124
  requirements:
125
125
  - - ! '>='
126
126
  - !ruby/object:Gem::Version
127
- version: 1.3.2
127
+ version: 1.3.3
128
128
  - !ruby/object:Gem::Dependency
129
129
  name: rack
130
130
  requirement: !ruby/object:Gem::Requirement
@@ -132,7 +132,7 @@ dependencies:
132
132
  requirements:
133
133
  - - ! '>='
134
134
  - !ruby/object:Gem::Version
135
- version: 1.4.1
135
+ version: 1.4.4
136
136
  type: :development
137
137
  prerelease: false
138
138
  version_requirements: !ruby/object:Gem::Requirement
@@ -140,7 +140,7 @@ dependencies:
140
140
  requirements:
141
141
  - - ! '>='
142
142
  - !ruby/object:Gem::Version
143
- version: 1.4.1
143
+ version: 1.4.4
144
144
  - !ruby/object:Gem::Dependency
145
145
  name: rack-test
146
146
  requirement: !ruby/object:Gem::Requirement
@@ -148,7 +148,7 @@ dependencies:
148
148
  requirements:
149
149
  - - ! '>='
150
150
  - !ruby/object:Gem::Version
151
- version: 0.6.1
151
+ version: 0.6.2
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
@@ -156,7 +156,7 @@ dependencies:
156
156
  requirements:
157
157
  - - ! '>='
158
158
  - !ruby/object:Gem::Version
159
- version: 0.6.1
159
+ version: 0.6.2
160
160
  - !ruby/object:Gem::Dependency
161
161
  name: linkeddata
162
162
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +164,7 @@ dependencies:
164
164
  requirements:
165
165
  - - ! '>='
166
166
  - !ruby/object:Gem::Version
167
- version: 0.3.5
167
+ version: '0'
168
168
  type: :development
169
169
  prerelease: false
170
170
  version_requirements: !ruby/object:Gem::Requirement
@@ -172,7 +172,7 @@ dependencies:
172
172
  requirements:
173
173
  - - ! '>='
174
174
  - !ruby/object:Gem::Version
175
- version: 0.3.5
175
+ version: '0'
176
176
  - !ruby/object:Gem::Dependency
177
177
  name: rdf-spec
178
178
  requirement: !ruby/object:Gem::Requirement
@@ -180,7 +180,7 @@ dependencies:
180
180
  requirements:
181
181
  - - ! '>='
182
182
  - !ruby/object:Gem::Version
183
- version: 0.3.5
183
+ version: '1.0'
184
184
  type: :development
185
185
  prerelease: false
186
186
  version_requirements: !ruby/object:Gem::Requirement
@@ -188,7 +188,7 @@ dependencies:
188
188
  requirements:
189
189
  - - ! '>='
190
190
  - !ruby/object:Gem::Version
191
- version: 0.3.5
191
+ version: '1.0'
192
192
  - !ruby/object:Gem::Dependency
193
193
  name: open-uri-cached
194
194
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +196,7 @@ dependencies:
196
196
  requirements:
197
197
  - - ! '>='
198
198
  - !ruby/object:Gem::Version
199
- version: 0.0.4
199
+ version: 0.0.5
200
200
  type: :development
201
201
  prerelease: false
202
202
  version_requirements: !ruby/object:Gem::Requirement
@@ -204,7 +204,7 @@ dependencies:
204
204
  requirements:
205
205
  - - ! '>='
206
206
  - !ruby/object:Gem::Version
207
- version: 0.0.4
207
+ version: 0.0.5
208
208
  - !ruby/object:Gem::Dependency
209
209
  name: equivalent-xml
210
210
  requirement: !ruby/object:Gem::Requirement
@@ -212,7 +212,7 @@ dependencies:
212
212
  requirements:
213
213
  - - ! '>='
214
214
  - !ruby/object:Gem::Version
215
- version: 0.2.8
215
+ version: '0'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
@@ -220,7 +220,7 @@ dependencies:
220
220
  requirements:
221
221
  - - ! '>='
222
222
  - !ruby/object:Gem::Version
223
- version: 0.2.8
223
+ version: '0'
224
224
  - !ruby/object:Gem::Dependency
225
225
  name: nokogiri
226
226
  requirement: !ruby/object:Gem::Requirement
@@ -244,7 +244,7 @@ dependencies:
244
244
  requirements:
245
245
  - - ! '>='
246
246
  - !ruby/object:Gem::Version
247
- version: 2.10.0
247
+ version: 2.12.0
248
248
  type: :development
249
249
  prerelease: false
250
250
  version_requirements: !ruby/object:Gem::Requirement
@@ -252,7 +252,7 @@ dependencies:
252
252
  requirements:
253
253
  - - ! '>='
254
254
  - !ruby/object:Gem::Version
255
- version: 2.10.0
255
+ version: 2.12.0
256
256
  - !ruby/object:Gem::Dependency
257
257
  name: spira
258
258
  requirement: !ruby/object:Gem::Requirement
@@ -260,7 +260,7 @@ dependencies:
260
260
  requirements:
261
261
  - - ! '>='
262
262
  - !ruby/object:Gem::Version
263
- version: 0.0.12
263
+ version: '0'
264
264
  type: :development
265
265
  prerelease: false
266
266
  version_requirements: !ruby/object:Gem::Requirement
@@ -268,7 +268,7 @@ dependencies:
268
268
  requirements:
269
269
  - - ! '>='
270
270
  - !ruby/object:Gem::Version
271
- version: 0.0.12
271
+ version: '0'
272
272
  - !ruby/object:Gem::Dependency
273
273
  name: yard
274
274
  requirement: !ruby/object:Gem::Requirement
@@ -276,7 +276,7 @@ dependencies:
276
276
  requirements:
277
277
  - - ! '>='
278
278
  - !ruby/object:Gem::Version
279
- version: 0.8.2
279
+ version: 0.8.3
280
280
  type: :development
281
281
  prerelease: false
282
282
  version_requirements: !ruby/object:Gem::Requirement
@@ -284,7 +284,7 @@ dependencies:
284
284
  requirements:
285
285
  - - ! '>='
286
286
  - !ruby/object:Gem::Version
287
- version: 0.8.2
287
+ version: 0.8.3
288
288
  description: ! "\n Implements SPARQL grammar parsing to SPARQL Algebra, SPARQL
289
289
  Algebra processing\n and includes SPARQL Client for accessing remote repositories."
290
290
  email: public-rdf-ruby@w3.org