sparql-client 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/sparql/client.rb +11 -5
  4. metadata +22 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3780300088afdd02353be6a3a79906d8517914d7
4
- data.tar.gz: 950c9a7f362d0adba695eb0bf3f0b7e3688ea48e
3
+ metadata.gz: 5a387a6b1075c08923ef2406a5faedc7318e369b
4
+ data.tar.gz: 917d95e34802cd75598214ada6d9fc462e37a213
5
5
  SHA512:
6
- metadata.gz: 2f1576c6998669bab55a6344d7e22c8cdf6bf4896d40dd9c98eff7f963fa96864491494e9af311c9c2b119896bb1189503eab6a8eac80137a81569eb49c9bff3
7
- data.tar.gz: 525a8c2a6394a82c76d24886b29ea6a11ebf1015c1488cd308b77d5365d52f962e96c1fa5518e1ca8a23e683f5a576e2cd301432bd2a20196a8fd11d15959c9f
6
+ metadata.gz: 86abf733b0cc50703cba766a7da1742b4b8313e0b3db055c144d38a6df3e1cb02ae3a221efa2d63a2d1fa9d7bd1092d5024d6794e9020ae83eb743b1d3635515
7
+ data.tar.gz: 594f406a092751f8d0aa8ef16881674c86acae0cb69c8dcc0fd9d5e15e1a8da2eeeaad25865307357066e5125eb1d5146872fd6d0654a5428daae789afc38ce8
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.0.1
@@ -35,13 +35,13 @@ module SPARQL
35
35
  RESULT_JSON,
36
36
  RESULT_XML,
37
37
  RESULT_BOOL,
38
- "#{RESULT_TSV};p=0.8",
39
- "#{RESULT_CSV};p=0.2",
40
- '*/*;p=0.1'
38
+ "#{RESULT_TSV};q=0.8",
39
+ "#{RESULT_CSV};q=0.2",
40
+ '*/*;q=0.1'
41
41
  ].join(', ').freeze
42
42
  GRAPH_ALL = (
43
43
  RDF::Format.content_types.keys +
44
- ['*/*;p=0.1']
44
+ ['*/*;q=0.1']
45
45
  ).join(', ').freeze
46
46
 
47
47
  ACCEPT_JSON = {'Accept' => RESULT_JSON}.freeze
@@ -536,9 +536,11 @@ module SPARQL
536
536
  # @param [Hash{Symbol => Object}] options
537
537
  # @return [RDF::Enumerable]
538
538
  def parse_rdf_serialization(response, options = {})
539
- options = {:content_type => response.content_type} if options.empty?
539
+ options = {:content_type => response.content_type} unless options[:content_type]
540
540
  if reader = RDF::Reader.for(options)
541
541
  reader.new(response.body)
542
+ else
543
+ raise RDF::ReaderError, "no suitable rdf reader was found."
542
544
  end
543
545
  end
544
546
 
@@ -678,8 +680,12 @@ module SPARQL
678
680
 
679
681
  request.basic_auth(url.user, url.password) if url.user && !url.user.empty?
680
682
 
683
+ pre_http_hook(request) if respond_to?(:pre_http_hook)
684
+
681
685
  response = @http.request(::URI.parse(url.to_s), request)
682
686
 
687
+ post_http_hook(response) if respond_to?(:post_http_hook)
688
+
683
689
  10.times do
684
690
  if response.kind_of? Net::HTTPRedirection
685
691
  response = @http.request(::URI.parse(response['location']), request)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparql-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arto Bendiken
@@ -10,118 +10,118 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-04-10 00:00:00.000000000 Z
13
+ date: 2016-06-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rdf
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - "~>"
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
21
  version: '2.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - "~>"
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
28
  version: '2.0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: net-http-persistent
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - "~>"
33
+ - - ~>
34
34
  - !ruby/object:Gem::Version
35
35
  version: '2.9'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ~>
41
41
  - !ruby/object:Gem::Version
42
42
  version: '2.9'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: sparql
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ~>
48
48
  - !ruby/object:Gem::Version
49
49
  version: '2.0'
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - "~>"
54
+ - - ~>
55
55
  - !ruby/object:Gem::Version
56
56
  version: '2.0'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: rdf-spec
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
61
+ - - ~>
62
62
  - !ruby/object:Gem::Version
63
63
  version: '2.0'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - "~>"
68
+ - - ~>
69
69
  - !ruby/object:Gem::Version
70
70
  version: '2.0'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rspec
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - "~>"
75
+ - - ~>
76
76
  - !ruby/object:Gem::Version
77
77
  version: '3.4'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - "~>"
82
+ - - ~>
83
83
  - !ruby/object:Gem::Version
84
84
  version: '3.4'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: rspec-its
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - "~>"
89
+ - - ~>
90
90
  - !ruby/object:Gem::Version
91
91
  version: '1.2'
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - "~>"
96
+ - - ~>
97
97
  - !ruby/object:Gem::Version
98
98
  version: '1.2'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: webmock
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - "~>"
103
+ - - ~>
104
104
  - !ruby/object:Gem::Version
105
105
  version: '1.15'
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - "~>"
110
+ - - ~>
111
111
  - !ruby/object:Gem::Version
112
112
  version: '1.15'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: yard
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - "~>"
117
+ - - ~>
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0.8'
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - "~>"
124
+ - - ~>
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0.8'
127
127
  description: |-
@@ -139,11 +139,11 @@ files:
139
139
  - README.md
140
140
  - UNLICENSE
141
141
  - VERSION
142
- - lib/sparql/client.rb
143
142
  - lib/sparql/client/query.rb
144
143
  - lib/sparql/client/repository.rb
145
144
  - lib/sparql/client/update.rb
146
145
  - lib/sparql/client/version.rb
146
+ - lib/sparql/client.rb
147
147
  homepage: http://ruby-rdf.github.com/sparql-client/
148
148
  licenses:
149
149
  - Unlicense
@@ -154,19 +154,18 @@ require_paths:
154
154
  - lib
155
155
  required_ruby_version: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - '>='
158
158
  - !ruby/object:Gem::Version
159
159
  version: '2.0'
160
160
  required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  requirements:
162
- - - ">="
162
+ - - '>='
163
163
  - !ruby/object:Gem::Version
164
164
  version: '0'
165
165
  requirements: []
166
166
  rubyforge_project: sparql-client
167
- rubygems_version: 2.4.8
167
+ rubygems_version: 2.0.14.1
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: SPARQL client for RDF.rb.
171
171
  test_files: []
172
- has_rdoc: false