@@ -73,51 +73,51 @@ def headers
7373 end
7474
7575 def base_query_options
76- { : format => RESULT_JSON }
76+ { format : RESULT_JSON }
7777 end
7878
7979 def base_request_options
80- { : headers => headers }
80+ { headers : headers }
8181 end
8282
8383 def extra_request_options
8484 case @auth_method
8585 when 'basic'
86- { : basic_auth => auth }
86+ { basic_auth : auth }
8787 when 'digest'
88- { : digest_auth => auth }
88+ { digest_auth : auth }
8989 end
9090 end
9191
9292 def auth
93- { : username => @username , : password => @password }
93+ { username : @username , password : @password }
9494 end
9595
9696 def api_get ( query , options = { } )
9797 # prefer sparul endpoint with auth if present to allow SELECT/CONSTRUCT access to protected graphs
9898 if @sparul_endpoint
9999 self . class . endpoint @sparul_endpoint
100100 Timeout ::timeout ( @timeout ) {
101- get '/' , : extra_query => { : query => query } . merge ( options ) ,
102- : extra_request => extra_request_options ,
103- : transform => RDF ::Virtuoso ::Parser ::JSON
101+ get '/' , extra_query : { query : query } . merge ( options ) ,
102+ extra_request : extra_request_options ,
103+ transform : RDF ::Virtuoso ::Parser ::JSON
104104 }
105105 else
106106 self . class . endpoint @sparql_endpoint
107107 Timeout ::timeout ( @timeout ) {
108108 puts self . inspect
109- get '/' , : extra_query => { : query => query } . merge ( options ) ,
110- : transform => RDF ::Virtuoso ::Parser ::JSON
109+ get '/' , extra_query : { query : query } . merge ( options ) ,
110+ transform : RDF ::Virtuoso ::Parser ::JSON
111111 }
112112 end
113113 end
114114
115115 def api_post ( query , options = { } )
116116 self . class . endpoint @sparul_endpoint
117117 Timeout ::timeout ( @timeout ) {
118- post '/' , : extra_body => { : query => query } . merge ( options ) ,
119- : extra_request => extra_request_options ,
120- : response_container => [
118+ post '/' , extra_body : { query : query } . merge ( options ) ,
119+ extra_request : extra_request_options ,
120+ response_container : [
121121 "results" , "bindings" , 0 , "callret-0" , "value" ]
122122 }
123123 end
0 commit comments