From d598cd65995cc829c2610ff8d40c0431b9f935eb Mon Sep 17 00:00:00 2001 From: mguetlein Date: Wed, 5 May 2010 15:02:43 +0200 Subject: application/x-yaml to text/x-yaml --- lazar.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 lazar.rb diff --git a/lazar.rb b/lazar.rb old mode 100644 new mode 100755 index fd0067c..9880292 --- a/lazar.rb +++ b/lazar.rb @@ -76,8 +76,8 @@ class Lazar < Model def to_owl data = YAML.load(yaml) - activity_dataset = YAML.load(RestClient.get(data.trainingDataset, :accept => 'application/x-yaml').to_s) - feature_dataset = YAML.load(RestClient.get(data.feature_dataset_uri, :accept => 'application/x-yaml').to_s) + activity_dataset = YAML.load(RestClient.get(data.trainingDataset, :accept => 'text/x-yaml').to_s) + feature_dataset = YAML.load(RestClient.get(data.feature_dataset_uri, :accept => 'text/x-yaml').to_s) owl = OpenTox::Owl.create 'Model', uri owl.set("creator","http://github.com/helma/opentox-model") owl.set("title","#{URI.decode(activity_dataset.title)} lazar classification") @@ -108,7 +108,7 @@ get '/:id/?' do case params[:id] when /.yaml$/ params[:id].sub!(/.yaml$/,'') - accept = 'application/x-yaml' + accept = 'text/x-yaml' when /.rdf$/ params[:id].sub!(/.rdf$/,'') accept = 'application/rdf+xml' @@ -124,7 +124,7 @@ get '/:id/?' do end model.owl when /yaml/ - response['Content-Type'] = 'application/x-yaml' + response['Content-Type'] = 'text/x-yaml' model.yaml else halt 400, "Unsupported MIME type '#{accept}'" -- cgit v1.2.3 From fcadad9090fbd1f5570e3478dbd28807039e99e1 Mon Sep 17 00:00:00 2001 From: mguetlein Date: Tue, 11 May 2010 18:40:20 +0200 Subject: add search functionality --- application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application.rb b/application.rb index 2552c52..a50e7e4 100644 --- a/application.rb +++ b/application.rb @@ -18,7 +18,7 @@ require 'lazar.rb' get '/?' do # get index of models response['Content-Type'] = 'text/uri-list' - Model.all.collect{|m| m.uri}.join("\n") + "\n" + Model.all(params).collect{|m| m.uri}.join("\n") + "\n" end delete '/:id/?' do -- cgit v1.2.3 From a2540da70fc1d681bbf3d9695337ba55ac3176f6 Mon Sep 17 00:00:00 2001 From: mguetlein Date: Wed, 2 Jun 2010 12:32:59 +0200 Subject: change to api wrapper version 1.4.4.4 --- application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application.rb b/application.rb index a50e7e4..a04b60d 100644 --- a/application.rb +++ b/application.rb @@ -1,5 +1,5 @@ require 'rubygems' -gem 'opentox-ruby-api-wrapper', '= 1.4.0' +gem 'opentox-ruby-api-wrapper', '= 1.4.4.4' require 'opentox-ruby-api-wrapper' LOGGER.progname = File.expand_path(__FILE__) -- cgit v1.2.3 From 85daf0bc9eb7fea299d52230902ae30f37aa2947 Mon Sep 17 00:00:00 2001 From: mguetlein Date: Fri, 25 Jun 2010 20:36:03 +0200 Subject: replace text/x-yaml with application/x-yaml --- lazar.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lazar.rb b/lazar.rb index d4d6235..4e93143 100755 --- a/lazar.rb +++ b/lazar.rb @@ -80,8 +80,8 @@ class Lazar < Model def to_owl data = YAML.load(yaml) - activity_dataset = YAML.load(RestClient.get(data.trainingDataset, :accept => 'text/x-yaml').to_s) - feature_dataset = YAML.load(RestClient.get(data.feature_dataset_uri, :accept => 'text/x-yaml').to_s) + activity_dataset = YAML.load(RestClient.get(data.trainingDataset, :accept => 'application/x-yaml').to_s) + feature_dataset = YAML.load(RestClient.get(data.feature_dataset_uri, :accept => 'application/x-yaml').to_s) owl = OpenTox::Owl.create 'Model', uri owl.set("creator","http://github.com/helma/opentox-model") owl.set("title","#{URI.decode(activity_dataset.title)} lazar classification") @@ -112,7 +112,7 @@ get '/:id/?' do case params[:id] when /.yaml$/ params[:id].sub!(/.yaml$/,'') - accept = 'text/x-yaml' + accept = 'application/x-yaml' when /.rdf$/ params[:id].sub!(/.rdf$/,'') accept = 'application/rdf+xml' @@ -128,7 +128,7 @@ get '/:id/?' do end model.owl when /yaml/ - response['Content-Type'] = 'text/x-yaml' + response['Content-Type'] = 'application/x-yaml' model.yaml else halt 400, "Unsupported MIME type '#{accept}'" -- cgit v1.2.3 From de5eb540a2c91d453e4adb24869fcaaac5180e4f Mon Sep 17 00:00:00 2001 From: mguetlein Date: Mon, 28 Jun 2010 15:47:55 +0200 Subject: move to wrapper version 1.5.7 (application/x-yaml) --- application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application.rb b/application.rb index 7538196..304f8c0 100644 --- a/application.rb +++ b/application.rb @@ -1,5 +1,5 @@ require 'rubygems' -gem "opentox-ruby-api-wrapper", "= 1.5.6" +gem "opentox-ruby-api-wrapper", "= 1.5.7" require 'opentox-ruby-api-wrapper' LOGGER.progname = File.expand_path(__FILE__) -- cgit v1.2.3