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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ec8251bdec3834b0de6457e7a74683f395045f0fda56306f3d113f2f5b9f8a4
4
- data.tar.gz: 42069d353daed99aff64042ecc6a0115628a2642f93f675df14b95b101bae235
3
+ metadata.gz: 592b7393da5e5461ec8f1fd5b425f33b8a13db56552e31af5fdd6eee1859b720
4
+ data.tar.gz: 6d6d3fb2bb44a445cffe5c399b98426c04b146a7b9f6257efb88a8c4e04cd9dd
5
5
  SHA512:
6
- metadata.gz: fcc8944f3070d447691ca25f52ba4a1e5a160567ec04aacf4e6f69a09580b3897d248877074bfb546909a74187e545fd01349f7fbded1ff60f90fb7dff11a45f
7
- data.tar.gz: 63854d94b8569f2936273bb6ca53a91b4dab916794e6f0a8ec2daa73d650f05f609ec10a53109bc708a45364add6a8cea4d88aee647755d836cc0c54f2b7c926
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, :method => "get")
18
+ client = SPARQL::Client.new(MAPPINGS[endpoint] || endpoint, method: 'get')
19
19
 
20
- #Rails.logger.debug "SPARQL QUERY: \n#{sparql}"
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
  }
@@ -1,3 +1,3 @@
1
1
  module TogoStanza
2
- VERSION = '2.2.0'
2
+ VERSION = '2.2.1'
3
3
  end
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.0
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-01-22 00:00:00.000000000 Z
11
+ date: 2020-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport