Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

In sinatra example, either open a URL, or evaluate as a string.

  • Loading branch information...
commit 4f3a58737aa8144b30126809f858b86c90073f16 1 parent 632b9fb
@gkellogg gkellogg authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  sinatra_rackup.rb
View
3  sinatra_rackup.rb
@@ -14,7 +14,8 @@
graph << [RDF::Node.new, RDF::DC.title, "Hello, world!"]
end
if params["query"]
- SPARQL.execute(::URI.decode(params["query"]), repository)
+ query = query.to_s =~ /^\w:/ ? RDF::Util::File.open_file(params["query"]) : :URI.decode(params["query"].to_s)
+ SPARQL.execute(query, repository)
else
service_description(:repo => repository)
end
Please sign in to comment.
Something went wrong with that request. Please try again.