opentox-ruby-api-wrapper 1.5.2 → 1.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +22 -1
  2. data/VERSION +1 -1
  3. data/lib/config/config_ru.rb +30 -8
  4. metadata +92 -20
data/Rakefile CHANGED
@@ -10,7 +10,28 @@ begin
10
10
  gem.email = "helma@in-silico.ch"
11
11
  gem.homepage = "http://github.com/helma/opentox-ruby-api-wrapper"
12
12
  gem.authors = ["Christoph Helma"]
13
- ["sinatra", "rest-client", "rack", "rack-contrib", "rack-flash", "emk-sinatra-url-for", "sinatra-respond_to", "dm-more", "dm-core", "sinatra-static-assets","tmail","roo","spreadsheet", "google-spreadsheet-ruby"].each do |dep|
13
+ [ "sinatra",
14
+ "emk-sinatra-url-for",
15
+ "sinatra-respond_to",
16
+ "sinatra-static-assets",
17
+ "dm-more",
18
+ "dm-core",
19
+ "rest-client",
20
+ "rack",
21
+ "rack-contrib",
22
+ "rack-flash",
23
+ "nokogiri",
24
+ "rubyzip",
25
+ "builder",
26
+ "do_mysql",
27
+ "data_objects",
28
+ "roo",
29
+ "spreadsheet",
30
+ "google-spreadsheet-ruby",
31
+ "tmail",
32
+ "haml"
33
+
34
+ ].each do |dep|
14
35
  gem.add_dependency dep
15
36
  end
16
37
  ['cucumber','jeweler'].each do |dep|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.2
1
+ 1.5.3
@@ -18,11 +18,33 @@ set :raise_errors, true
18
18
  end
19
19
 
20
20
  use Rack::ShowExceptions
21
- #if MAIL
22
- # use Rack::MailExceptions do |mail|
23
- # mail.to 'helma@in-silico.ch'
24
- # mail.subject '[ERROR] %s'
25
- # mail.from "toxcreate@in-silico.ch"
26
- # mail.smtp MAIL
27
- # end
28
- #end
21
+ if MAIL
22
+
23
+ # monkeypatch with the original method
24
+ # strangely enough my mailserver returns "Connection refused - connect(2)" errors without this patch
25
+ module Rack
26
+ class MailExceptions
27
+
28
+ def send_notification(exception, env)
29
+ mail = generate_mail(exception, env)
30
+ smtp = config[:smtp]
31
+ env['mail.sent'] = true
32
+ return if smtp[:server] == 'example.com'
33
+
34
+ Net::SMTP.start smtp[:server], smtp[:port], smtp[:domain], smtp[:user_name], smtp[:password], smtp[:authentication] do |server|
35
+ mail.to.each do |recipient|
36
+ server.send_message mail.to_s, mail.from, recipient
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+
44
+ use Rack::MailExceptions do |mail|
45
+ mail.to 'helma@in-silico.ch'
46
+ mail.subject '[ERROR] %s'
47
+ mail.from "toxcreate@in-silico.ch"
48
+ mail.smtp MAIL
49
+ end
50
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 5
8
- - 2
9
- version: 1.5.2
8
+ - 3
9
+ version: 1.5.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Christoph Helma
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-20 00:00:00 +02:00
17
+ date: 2010-05-21 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -30,7 +30,7 @@ dependencies:
30
30
  type: :runtime
31
31
  version_requirements: *id001
32
32
  - !ruby/object:Gem::Dependency
33
- name: rest-client
33
+ name: emk-sinatra-url-for
34
34
  prerelease: false
35
35
  requirement: &id002 !ruby/object:Gem::Requirement
36
36
  requirements:
@@ -42,7 +42,7 @@ dependencies:
42
42
  type: :runtime
43
43
  version_requirements: *id002
44
44
  - !ruby/object:Gem::Dependency
45
- name: rack
45
+ name: sinatra-respond_to
46
46
  prerelease: false
47
47
  requirement: &id003 !ruby/object:Gem::Requirement
48
48
  requirements:
@@ -54,7 +54,7 @@ dependencies:
54
54
  type: :runtime
55
55
  version_requirements: *id003
56
56
  - !ruby/object:Gem::Dependency
57
- name: rack-contrib
57
+ name: sinatra-static-assets
58
58
  prerelease: false
59
59
  requirement: &id004 !ruby/object:Gem::Requirement
60
60
  requirements:
@@ -66,7 +66,7 @@ dependencies:
66
66
  type: :runtime
67
67
  version_requirements: *id004
68
68
  - !ruby/object:Gem::Dependency
69
- name: rack-flash
69
+ name: dm-more
70
70
  prerelease: false
71
71
  requirement: &id005 !ruby/object:Gem::Requirement
72
72
  requirements:
@@ -78,7 +78,7 @@ dependencies:
78
78
  type: :runtime
79
79
  version_requirements: *id005
80
80
  - !ruby/object:Gem::Dependency
81
- name: emk-sinatra-url-for
81
+ name: dm-core
82
82
  prerelease: false
83
83
  requirement: &id006 !ruby/object:Gem::Requirement
84
84
  requirements:
@@ -90,7 +90,7 @@ dependencies:
90
90
  type: :runtime
91
91
  version_requirements: *id006
92
92
  - !ruby/object:Gem::Dependency
93
- name: sinatra-respond_to
93
+ name: rest-client
94
94
  prerelease: false
95
95
  requirement: &id007 !ruby/object:Gem::Requirement
96
96
  requirements:
@@ -102,7 +102,7 @@ dependencies:
102
102
  type: :runtime
103
103
  version_requirements: *id007
104
104
  - !ruby/object:Gem::Dependency
105
- name: dm-more
105
+ name: rack
106
106
  prerelease: false
107
107
  requirement: &id008 !ruby/object:Gem::Requirement
108
108
  requirements:
@@ -114,7 +114,7 @@ dependencies:
114
114
  type: :runtime
115
115
  version_requirements: *id008
116
116
  - !ruby/object:Gem::Dependency
117
- name: dm-core
117
+ name: rack-contrib
118
118
  prerelease: false
119
119
  requirement: &id009 !ruby/object:Gem::Requirement
120
120
  requirements:
@@ -126,7 +126,7 @@ dependencies:
126
126
  type: :runtime
127
127
  version_requirements: *id009
128
128
  - !ruby/object:Gem::Dependency
129
- name: sinatra-static-assets
129
+ name: rack-flash
130
130
  prerelease: false
131
131
  requirement: &id010 !ruby/object:Gem::Requirement
132
132
  requirements:
@@ -138,7 +138,7 @@ dependencies:
138
138
  type: :runtime
139
139
  version_requirements: *id010
140
140
  - !ruby/object:Gem::Dependency
141
- name: tmail
141
+ name: nokogiri
142
142
  prerelease: false
143
143
  requirement: &id011 !ruby/object:Gem::Requirement
144
144
  requirements:
@@ -150,7 +150,7 @@ dependencies:
150
150
  type: :runtime
151
151
  version_requirements: *id011
152
152
  - !ruby/object:Gem::Dependency
153
- name: roo
153
+ name: rubyzip
154
154
  prerelease: false
155
155
  requirement: &id012 !ruby/object:Gem::Requirement
156
156
  requirements:
@@ -162,7 +162,7 @@ dependencies:
162
162
  type: :runtime
163
163
  version_requirements: *id012
164
164
  - !ruby/object:Gem::Dependency
165
- name: spreadsheet
165
+ name: builder
166
166
  prerelease: false
167
167
  requirement: &id013 !ruby/object:Gem::Requirement
168
168
  requirements:
@@ -174,7 +174,7 @@ dependencies:
174
174
  type: :runtime
175
175
  version_requirements: *id013
176
176
  - !ruby/object:Gem::Dependency
177
- name: google-spreadsheet-ruby
177
+ name: do_mysql
178
178
  prerelease: false
179
179
  requirement: &id014 !ruby/object:Gem::Requirement
180
180
  requirements:
@@ -186,7 +186,7 @@ dependencies:
186
186
  type: :runtime
187
187
  version_requirements: *id014
188
188
  - !ruby/object:Gem::Dependency
189
- name: cucumber
189
+ name: data_objects
190
190
  prerelease: false
191
191
  requirement: &id015 !ruby/object:Gem::Requirement
192
192
  requirements:
@@ -195,10 +195,10 @@ dependencies:
195
195
  segments:
196
196
  - 0
197
197
  version: "0"
198
- type: :development
198
+ type: :runtime
199
199
  version_requirements: *id015
200
200
  - !ruby/object:Gem::Dependency
201
- name: jeweler
201
+ name: roo
202
202
  prerelease: false
203
203
  requirement: &id016 !ruby/object:Gem::Requirement
204
204
  requirements:
@@ -207,8 +207,80 @@ dependencies:
207
207
  segments:
208
208
  - 0
209
209
  version: "0"
210
- type: :development
210
+ type: :runtime
211
211
  version_requirements: *id016
212
+ - !ruby/object:Gem::Dependency
213
+ name: spreadsheet
214
+ prerelease: false
215
+ requirement: &id017 !ruby/object:Gem::Requirement
216
+ requirements:
217
+ - - ">="
218
+ - !ruby/object:Gem::Version
219
+ segments:
220
+ - 0
221
+ version: "0"
222
+ type: :runtime
223
+ version_requirements: *id017
224
+ - !ruby/object:Gem::Dependency
225
+ name: google-spreadsheet-ruby
226
+ prerelease: false
227
+ requirement: &id018 !ruby/object:Gem::Requirement
228
+ requirements:
229
+ - - ">="
230
+ - !ruby/object:Gem::Version
231
+ segments:
232
+ - 0
233
+ version: "0"
234
+ type: :runtime
235
+ version_requirements: *id018
236
+ - !ruby/object:Gem::Dependency
237
+ name: tmail
238
+ prerelease: false
239
+ requirement: &id019 !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ segments:
244
+ - 0
245
+ version: "0"
246
+ type: :runtime
247
+ version_requirements: *id019
248
+ - !ruby/object:Gem::Dependency
249
+ name: haml
250
+ prerelease: false
251
+ requirement: &id020 !ruby/object:Gem::Requirement
252
+ requirements:
253
+ - - ">="
254
+ - !ruby/object:Gem::Version
255
+ segments:
256
+ - 0
257
+ version: "0"
258
+ type: :runtime
259
+ version_requirements: *id020
260
+ - !ruby/object:Gem::Dependency
261
+ name: cucumber
262
+ prerelease: false
263
+ requirement: &id021 !ruby/object:Gem::Requirement
264
+ requirements:
265
+ - - ">="
266
+ - !ruby/object:Gem::Version
267
+ segments:
268
+ - 0
269
+ version: "0"
270
+ type: :development
271
+ version_requirements: *id021
272
+ - !ruby/object:Gem::Dependency
273
+ name: jeweler
274
+ prerelease: false
275
+ requirement: &id022 !ruby/object:Gem::Requirement
276
+ requirements:
277
+ - - ">="
278
+ - !ruby/object:Gem::Version
279
+ segments:
280
+ - 0
281
+ version: "0"
282
+ type: :development
283
+ version_requirements: *id022
212
284
  description: Ruby wrapper for the OpenTox REST API (http://www.opentox.org)
213
285
  email: helma@in-silico.ch
214
286
  executables: