helma-opentox-ruby-api-wrapper 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -1,6 +1,11 @@
1
1
  require 'rest_client'
2
2
  require 'crack/xml'
3
3
 
4
+ ENV['OPENTOX_COMPOUND'] = 'http://webservices.in-silico.ch/compound/v0/' unless ENV['OPENTOX_COMPOUND']
5
+ ENV['OPENTOX_FEATURE'] = 'http://webservices.in-silico.ch/feature/v0/' unless ENV['OPENTOX_FEATURE']
6
+ ENV['OPENTOX_DATASET'] = 'http://webservices.in-silico.ch/dataset/v0/' unless ENV['OPENTOX_DATASET']
7
+ ENV['OPENTOX_FMINER'] = 'http://webservices.in-silico.ch/fminer/v0/' unless ENV['OPENTOX_FMINER']
8
+
4
9
  module OpenTox
5
10
 
6
11
  class OpenTox
@@ -19,9 +24,9 @@ module OpenTox
19
24
  if params[:uri]
20
25
  @uri = params[:uri].to_s
21
26
  elsif params[:smiles]
22
- @uri = RestClient.post ENV['OPENTOX_COMPOUNDS'] ,:smiles => uri_escape(params[:smiles])
27
+ @uri = RestClient.post ENV['OPENTOX_COMPOUND'] ,:smiles => uri_escape(params[:smiles])
23
28
  elsif params[:name]
24
- @uri = RestClient.post ENV['OPENTOX_COMPOUNDS'] ,:name => uri_escape(params[:name])
29
+ @uri = RestClient.post ENV['OPENTOX_COMPOUND'] ,:name => uri_escape(params[:name])
25
30
  end
26
31
  end
27
32
 
@@ -53,7 +58,7 @@ module OpenTox
53
58
  if params[:uri]
54
59
  @uri = params[:uri].to_s
55
60
  else
56
- @uri = ENV['OPENTOX_FEATURES'] + uri_escape(params[:name])
61
+ @uri = ENV['OPENTOX_FEATURE'] + uri_escape(params[:name])
57
62
  params[:values].each do |k,v|
58
63
  @uri += '/' + k.to_s + '/' + v.to_s
59
64
  end
@@ -79,7 +84,7 @@ module OpenTox
79
84
  if params[:uri]
80
85
  @uri = params[:uri].to_s
81
86
  elsif params[:name]
82
- @uri = RestClient.post ENV['OPENTOX_DATASETS'], :name => params[:name]
87
+ @uri = RestClient.post ENV['OPENTOX_DATASET'], :name => params[:name]
83
88
  RestClient.delete @uri + '/associations'
84
89
  end
85
90
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{opentox-ruby-api-wrapper}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Christoph Helma"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helma-opentox-ruby-api-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Helma