From 499b05d3d949b2b53b4411d28779d9155cf5bf5e Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 8 Feb 2010 10:23:33 +0100 Subject: started to track tasks from model --- lib/dataset.rb | 2 +- lib/model.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/dataset.rb b/lib/dataset.rb index 0a49e87..bd523a3 100644 --- a/lib/dataset.rb +++ b/lib/dataset.rb @@ -87,7 +87,7 @@ module OpenTox def self.find(uri) dataset = Dataset.new data = `curl "#{uri}"` - #data = RestClient.get uri, :accept => 'application/rdf+xml' # unclear why this does not work for complex uris, Dataset.find works from irb + #data = RestClient.get(uri, :accept => 'application/rdf+xml') # unclear why this does not work for complex uris, Dataset.find works from irb dataset.rdf = data dataset end diff --git a/lib/model.rb b/lib/model.rb index bd9d546..a585b59 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -50,6 +50,14 @@ module OpenTox RestClient.post(@@config[:services]["opentox-model"], data, :content_type => "application/x-yaml").to_s end +# def self.create(task) +# @uri = RestClient.post(@@config[:services]["opentox-model"], :task_uri => task.uri) +# end + +# def yaml=(data) +# RestClient.put(@@uri, data, :content_type => "application/x-yaml").to_s +# end + def endpoint YAML.load(RestClient.get(uri))[:endpoint] end -- cgit v1.2.3