diff options
author | gebele <gebele@in-silico.ch> | 2012-06-21 17:48:16 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2012-06-21 17:48:16 +0200 |
commit | ce101444ba0f4608ee3c2eb87e1447717a5f4096 (patch) | |
tree | 11fc9b472b99457abe666e23d3a2664331ebe6ca | |
parent | bc9a8df2f200ecdb4fe4dc7de8cc644b3a038105 (diff) |
uri-list by hostname
-rw-r--r-- | lib/4store.rb | 4 |
1 files 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/ |