togostanza 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/togostanza/stanza/querying.rb +3 -5
- data/lib/togostanza/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 592b7393da5e5461ec8f1fd5b425f33b8a13db56552e31af5fdd6eee1859b720
|
4
|
+
data.tar.gz: 6d6d3fb2bb44a445cffe5c399b98426c04b146a7b9f6257efb88a8c4e04cd9dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ab101689e22a8eba622ad61074e49c4a1227b523c18616c57090aadfc3e63af79c0a21ed481096112cd581e629a909ba0e18fe5ed87fe5e833420b0d0282ca1
|
7
|
+
data.tar.gz: 657961e75e63fb6e187aeac3f11b6275247c59b7138f6236e99d141f0120542ebf85e35c117e7936adcf1d2093dfd7d0c30aa9ba473fec53f4daeebe3449abe1
|
@@ -7,7 +7,7 @@ module TogoStanza::Stanza
|
|
7
7
|
togogenome: 'http://togogenome.org/sparql'
|
8
8
|
}
|
9
9
|
|
10
|
-
def query(endpoint, text_or_filename)
|
10
|
+
def query(endpoint, text_or_filename, **options)
|
11
11
|
path = File.join(root, 'sparql', text_or_filename)
|
12
12
|
|
13
13
|
if File.exist?(path)
|
@@ -15,11 +15,9 @@ module TogoStanza::Stanza
|
|
15
15
|
text_or_filename = Tilt.new(path).render(data)
|
16
16
|
end
|
17
17
|
|
18
|
-
client = SPARQL::Client.new(MAPPINGS[endpoint] || endpoint, :
|
18
|
+
client = SPARQL::Client.new(MAPPINGS[endpoint] || endpoint, method: 'get')
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
client.query(text_or_filename).map {|binding|
|
20
|
+
client.query(text_or_filename, **{content_type: 'application/sparql-results+json'}.merge(options)).map {|binding|
|
23
21
|
binding.each_with_object({}) {|(name, term), hash|
|
24
22
|
hash[name] = term.to_s
|
25
23
|
}
|
data/lib/togostanza/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: togostanza
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keita Urashima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|