sparql-client 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/CREDITS CHANGED
@@ -1,4 +1,5 @@
1
1
  * Gabriel Horner <gabriel.horner@gmail.com>
2
2
  * Nicholas Humfrey <njh@aelius.com>
3
+ * Fumihiro Kato <fumi@fumi.me>
3
4
  * David Nielsen <david@graveyard.dk>
4
5
  * Thamaraiselvan Poomalai <p.thamarai@gmail.com>
data/README CHANGED
@@ -103,6 +103,7 @@ Contributors
103
103
 
104
104
  * [Gabriel Horner](http://github.com/cldwalker) - <http://tagaholic.me/>
105
105
  * [Nicholas Humfrey](http://github.com/njh) - <http://www.aelius.com/njh/>
106
+ * [Fumihiro Kato](http://github.com/fumi) - <http://fumi.me/>
106
107
  * [David Nielsen](http://github.com/drankard) - <http://github.com/drankard>
107
108
  * [Thamaraiselvan Poomalai](http://github.com/selvan) - <http://softonaut.blogspot.com/>
108
109
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
@@ -92,6 +92,7 @@ module SPARQL
92
92
  # @option options [String] :content_type
93
93
  # @return [Array<RDF::Query::Solution>]
94
94
  def query(query, options = {})
95
+ @headers['Accept'] = options[:content_type] if options[:content_type]
95
96
  get(query) do |response|
96
97
  case response
97
98
  when Net::HTTPBadRequest # 400 Bad Request
@@ -168,6 +169,7 @@ module SPARQL
168
169
  # @return [Enumerable<RDF::Query::Solution>]
169
170
  # @see http://www.w3.org/TR/rdf-sparql-json-res/#results
170
171
  def parse_xml_bindings(xml)
172
+ xml.force_encoding(encoding) if xml.respond_to?(:force_encoding)
171
173
  require 'rexml/document' unless defined?(::REXML::Document)
172
174
  xml = REXML::Document.new(xml).root unless xml.is_a?(REXML::Element)
173
175
 
@@ -218,6 +220,12 @@ module SPARQL
218
220
  end
219
221
  end
220
222
 
223
+ ##
224
+ # @return [Encoding]
225
+ def encoding
226
+ @encoding ||= ::Encoding::UTF_8
227
+ end
228
+
221
229
  ##
222
230
  # Outputs a developer-friendly representation of this object to `stderr`.
223
231
  #
@@ -2,7 +2,7 @@ module SPARQL; class Client
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 5
5
+ TINY = 6
6
6
  EXTRA = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, EXTRA].compact.join('.')
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Arto Bendiken
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-06 00:00:00 +02:00
18
+ date: 2010-09-17 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency