opentox-ruby-api-wrapper 1.2.2 → 1.2.3

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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/dataset.rb +2 -2
  3. metadata +2 -3
  4. data/lib/feature.rb +0 -47
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.2
1
+ 1.2.3
data/lib/dataset.rb CHANGED
@@ -85,9 +85,9 @@ module OpenTox
85
85
 
86
86
  def self.find(uri)
87
87
  begin
88
- RestClient.get uri, :accept => 'application/rdf+xml' # check if the resource is available
89
88
  dataset = Dataset.new
90
- dataset.read uri.to_s
89
+ data = RestClient.get uri, :accept => 'application/rdf+xml' # check if the resource is available
90
+ dataset.rdf = data
91
91
  dataset
92
92
  rescue
93
93
  nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentox-ruby-api-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Helma
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-20 00:00:00 +01:00
12
+ date: 2009-12-21 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -113,7 +113,6 @@ files:
113
113
  - lib/compound.rb
114
114
  - lib/dataset.rb
115
115
  - lib/environment.rb
116
- - lib/feature.rb
117
116
  - lib/helper.rb
118
117
  - lib/model.rb
119
118
  - lib/opentox-ruby-api-wrapper.rb
data/lib/feature.rb DELETED
@@ -1,47 +0,0 @@
1
- module OpenTox
2
-
3
- class Feature
4
- include Owl
5
-
6
- def self.find_or_create(feature)
7
-
8
- if params[:uri]
9
- @uri = params[:uri]
10
- items = URI.split(@uri)[5].split(/\//)
11
- @name = items[1]
12
- @values = {}
13
- i = 2
14
- while i < items.size
15
- @values[items[i]] = items[i+1]
16
- i += 2
17
- end
18
- else
19
- @name = params[:name]
20
- @values = {}
21
- params.each do |k,v|
22
- @values[k] = v unless k.to_s == 'name'
23
- end
24
- @uri = File.join(@@config[:services]["opentox-feature"],path)
25
- end
26
- end
27
-
28
- def values_path
29
- path = ''
30
- @values.each do |k,v|
31
- path = File.join path, URI.encode(k.to_s), URI.encode(v.to_s)
32
- end
33
- path
34
- end
35
-
36
- def path
37
- File.join(URI.encode(@name),values_path)
38
- end
39
-
40
- def value(property)
41
- items = @uri.split(/\//)
42
- i = items.index(property)
43
- items[i+1]
44
- end
45
-
46
- end
47
- end