module Mu::AuthSudo
Constants
- VERSION
Public Class Methods
query(query)
click to toggle source
# File lib/mu/auth-sudo.rb, line 20 def self.query(query) puts "Executing sudo query: #{query}" sparql_client.query query end
sparql_client(options = {})
click to toggle source
# File lib/mu/auth-sudo.rb, line 12 def self.sparql_client(options = {}) options = { headers: { 'mu-auth-sudo': 'true' } } if ENV['MU_SPARQL_TIMEOUT'] options[:read_timeout] = ENV['MU_SPARQL_TIMEOUT'].to_i end SPARQL::Client.new(ENV['MU_SPARQL_ENDPOINT'], options) end
update(query)
click to toggle source
# File lib/mu/auth-sudo.rb, line 25 def self.update(query) puts "Executing sudo update: #{query}" sparql_client.update query end