From f65ab8815edc18e918e659cb74cb18269fedf5a3 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 9 Mar 2011 10:26:05 +0100 Subject: uri_available moved to opentox-ruby helper --- application.rb | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/application.rb b/application.rb index ff3abe7..9d8c0d5 100644 --- a/application.rb +++ b/application.rb @@ -43,19 +43,6 @@ helpers do url_for "/#{id}", :full end - def uri_available?(urlStr) - url = URI.parse(urlStr) - unless @subjectid - Net::HTTP.start(url.host, url.port) do |http| - return http.head(url.request_uri).code == "200" - end - else - Net::HTTP.start(url.host, url.port) do |http| - return http.post(url.request_uri, "subjectid=#{@subjectid}").code == "202" - end - end - end - def activity(a) case a.to_s when "true" -- cgit v1.2.3