opentox-ruby-api-wrapper 1.6.1 → 1.6.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
- 1.6.1
1
+ 1.6.2
@@ -31,8 +31,7 @@ module OpenTox
31
31
  def self.find(uri, accept_header=nil)
32
32
 
33
33
  unless accept_header
34
- #if uri.match(@@config[:services]["opentox-dataset"]) || uri=~ /188.40.32.88/ || uri =~ /informatik/
35
- if (uri.match(@@config[:services]["opentox-dataset"]) || uri =~ /in-silico.ch/) && !@@config[:accept_headers]["opentox-dataset"].grep(/yaml/).empty?
34
+ if (@@config[:yaml_hosts].include?(URI.parse(uri).host))
36
35
  accept_header = 'application/x-yaml'
37
36
  else
38
37
  accept_header = "application/rdf+xml"
@@ -213,7 +212,7 @@ module OpenTox
213
212
  load_feature_values
214
213
  end
215
214
  @owl = nil
216
- super.to_yaml
215
+ super
217
216
  end
218
217
 
219
218
  # saves (changes) as new dataset in dataset service
@@ -73,5 +73,5 @@ TRUE_REGEXP = /^(true|active|1|1.0)$/i
73
73
  FALSE_REGEXP = /^(false|inactive|0|0.0)$/i
74
74
 
75
75
  # Task durations
76
- DEFAULT_TASK_MAX_DURATION = @@config[:default_task_max_duration]
77
- EXTERNAL_TASK_MAX_DURATION = @@config[:external_task_max_duration]
76
+ DEFAULT_TASK_MAX_DURATION = 3600
77
+ EXTERNAL_TASK_MAX_DURATION = 3600
@@ -32,34 +32,10 @@
32
32
  opentox-task: "http://localhost/task/"
33
33
  opentox-validation: "http://localhost/validation/"
34
34
  #
35
- # Accept headers:
35
+ # Yaml capable hosts (faster than OWL-DL)
36
36
  #
37
- :accept_headers:
38
- opentox-compound:
39
- - "chemical/x-daylight-smiles"
40
- - "chemical/x-inchi"
41
- - "chemical/x-mdl-sdfile"
42
- - "image/gif"
43
- - "text/plain"
44
- opentox-dataset:
45
- - "application/x-yaml"
46
- - "application/rdf+xml"
47
- opentox-algorithm:
48
- - "application/x-yaml"
49
- - "application/rdf+xml"
50
- opentox-model:
51
- - "application/x-yaml"
52
- - "application/rdf+xml"
53
- opentox-task:
54
- - "application/x-yaml"
55
- - "application/rdf+xml"
56
- opentox-validation:
57
- - "application/x-yaml"
58
- - "application/rdf+xml"
59
-
60
- # Timeouts:
61
- :default_task_max_duration: 3600
62
- :external_task_max_duration: 3600
37
+ :yaml_hosts:
38
+ - "localhost"
63
39
 
64
40
  # Uncomment for verbose logging
65
41
  # :logger: debug
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentox-ruby-api-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
- - 1
10
- version: 1.6.1
9
+ - 2
10
+ version: 1.6.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Christoph Helma, Martin Guetlein