sparql-client 3.1.2 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/VERSION +1 -1
  4. data/lib/sparql/client.rb +10 -0
  5. metadata +12 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 512a63b7dcf77b57309f5c1cd734a4db60e84ba1977df4e3c8fab3529c0b96be
4
- data.tar.gz: ea1e7413c3b92668960da2ad9ed632a5511d3ff334702631a29bb6bd3cf523b9
3
+ metadata.gz: 91430f8e6c63118569f32b193b274fe8f19ca59728af08591177bdd5795ff05e
4
+ data.tar.gz: 3e0da28e7522a09004e2ac4bcd1b42e17cc943f02fd242d3a9e399597baa33e1
5
5
  SHA512:
6
- metadata.gz: 185b11ee8c1597a3ed72a1161d101fccae20dcadb025fa333d0c956930d92c0ff2d98f979c9213cd8ceef73cb287fb7073b338aefa47afb51c075c307172906d
7
- data.tar.gz: 68c871d80127d46298bddd60b4bf4df7326d67a00d1d8c522862b870846bb08326a27a44ca5aa15a9a813fd2bb4299ec98d69a3b4a554e2ad8b78f307b5432cf
6
+ metadata.gz: 21e38994cd92126304d4a481a3ee471018c9dd99206d537340b2c91eb49bd853bd76fa3bf558e795ed18110b6d639f97cb5288d2b520f5196739d7bb9cc0f095
7
+ data.tar.gz: 75a14ccdce74d985fb83f541853e4e8d95edfeb9c8d59a5f5fbc988cf378c985623df574585480e30945791327ce9f99ab5da2178b5c886c8cc91152d7174442
data/README.md CHANGED
@@ -124,11 +124,11 @@ sparql.delete_data(data)
124
124
 
125
125
  ## Dependencies
126
126
 
127
- * [Ruby](https://ruby-lang.org/) (>= 2.4)
128
- * [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.1)
127
+ * [Ruby](https://ruby-lang.org/) (>= 2.6)
128
+ * [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.2)
129
129
  * [Net::HTTP::Persistent](https://rubygems.org/gems/net-http-persistent) (~> 4.0, >= 4.0.1)
130
- * Soft dependency on [SPARQL](https://rubygems.org/gems/sparql) (~> 3.1)
131
- * Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.11)
130
+ * Soft dependency on [SPARQL](https://rubygems.org/gems/sparql) (~> 3.2)
131
+ * Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.12)
132
132
 
133
133
  ## Installation
134
134
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.2
1
+ 3.2.0
data/lib/sparql/client.rb CHANGED
@@ -442,6 +442,11 @@ module SPARQL
442
442
  RDF::Literal.new(value['value'], datatype: value['datatype'], language: value['xml:lang'])
443
443
  when :'typed-literal'
444
444
  RDF::Literal.new(value['value'], datatype: value['datatype'])
445
+ when :triple
446
+ s = parse_json_value(value['value']['subject'], nodes)
447
+ p = parse_json_value(value['value']['predicate'], nodes)
448
+ o = parse_json_value(value['value']['object'], nodes)
449
+ RDF::Statement(s, p, o)
445
450
  else nil
446
451
  end
447
452
  end
@@ -558,6 +563,11 @@ module SPARQL
558
563
  lang = value.respond_to?(:attr) ? value.attr('xml:lang') : value.attributes['xml:lang']
559
564
  datatype = value.respond_to?(:attr) ? value.attr('datatype') : value.attributes['datatype']
560
565
  RDF::Literal.new(value.text, language: lang, datatype: datatype)
566
+ when :triple
567
+ # Note, this is order dependent
568
+ res = value.elements.map {|e| e.elements.to_a}.
569
+ flatten.map {|e| parse_xml_value(e, nodes)}
570
+ RDF::Statement(*res)
561
571
  else nil
562
572
  end
563
573
  end
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: 3.1.2
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arto Bendiken
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-01-18 00:00:00.000000000 Z
13
+ date: 2021-12-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rdf
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '3.1'
21
+ version: '3.2'
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
- version: '3.1'
28
+ version: '3.2'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: net-http-persistent
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -52,28 +52,28 @@ dependencies:
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '3.1'
55
+ version: '3.2'
56
56
  type: :development
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '3.1'
62
+ version: '3.2'
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: sparql
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '3.1'
69
+ version: '3.2'
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '3.1'
76
+ version: '3.2'
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: rspec
79
79
  requirement: !ruby/object:Gem::Requirement
@@ -108,14 +108,14 @@ dependencies:
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '3.11'
111
+ version: '3.14'
112
112
  type: :development
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: '3.11'
118
+ version: '3.14'
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: yard
121
121
  requirement: !ruby/object:Gem::Requirement
@@ -162,14 +162,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - ">="
164
164
  - !ruby/object:Gem::Version
165
- version: '2.4'
165
+ version: '2.6'
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  requirements:
168
168
  - - ">="
169
169
  - !ruby/object:Gem::Version
170
170
  version: '0'
171
171
  requirements: []
172
- rubygems_version: 3.2.3
172
+ rubygems_version: 3.3.3
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: SPARQL client for RDF.rb.