From ce101444ba0f4608ee3c2eb87e1447717a5f4096 Mon Sep 17 00:00:00 2001 From: gebele Date: Thu, 21 Jun 2012 17:48:16 +0200 Subject: uri-list by hostname --- lib/4store.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/4store.rb b/lib/4store.rb index 11c8f27..658211c 100644 --- a/lib/4store.rb +++ b/lib/4store.rb @@ -82,8 +82,8 @@ module OpenTox if sparql =~ /SELECT/i return RestClient.get(sparql_uri, :params => { :query => sparql }, :accept => mime_type).body.gsub(/<|>/,'').split("\n") if mime_type == 'application/sparql-results+xml' list = RestClient.get(sparql_uri, :params => { :query => sparql }, :accept => "text/plain").body.gsub(/<|>/,'').split("\n") - h = `hostname -f`.strip - list.keep_if{|v| v =~ /#{h}\/#{SERVICE}/} + h = `hostname`.strip + list.keep_if{|v| v =~ /#{h}\./} return list unless mime_type case mime_type when /json/ -- cgit v1.2.3