public
Description: Subtlety: SVN => RSS, hAtom => Atom
Homepage: http://subtlety.errtheblog.com/
Clone URL: git://github.com/defunkt/subtlety.git
detach
defunkt (author)
Wed Jan 23 03:46:07 -0800 2008
commit  390e62d49d6917b545370bb0018611d08e4fd43b
tree    f536949b59ad3c5f6690e3698fed29c20cd1ffcc
parent  232e64be0c530da73956d11bd1485d0a55d3b1cc
...
27
28
29
 
 
30
31
32
...
37
38
39
40
41
42
 
 
 
43
44
45
...
199
200
201
202
203
204
205
206
207
 
 
 
 
 
208
 
209
210
211
...
213
214
215
216
217
218
219
220
 
 
221
222
223
...
27
28
29
30
31
32
33
34
...
39
40
41
 
42
 
43
44
45
46
47
48
...
202
203
204
 
 
 
 
 
 
205
206
207
208
209
210
211
212
213
214
...
216
217
218
 
 
 
 
 
219
220
221
222
223
0
@@ -27,6 +27,8 @@ def timeout_exec(command)
0
   end
0
 rescue Timeout::Error
0
   Process.kill('HUP', pid)
0
+ensure
0
+ Process.detach(pid)
0
 end
0
 
0
 ##
0
@@ -37,9 +39,10 @@ class Item < Sequel::Model
0
   set_schema do
0
     primary_key :id
0
          string :url
0
- boolean :atom, :default => false
0
       timestamp :created_at
0
- index [ :url, :atom ]
0
+ timestamp :updated_at
0
+ boolean :atom, :default => false
0
+ index :url
0
   end
0
 
0
   def key; pk.to_s(16) end
0
@@ -199,13 +202,13 @@ def xml!
0
   @headers['Content-Type'] = 'application/xml'
0
 end
0
 
0
-config_for :development do
0
- def sendfile(file)
0
- xml!
0
- return if file.include? '..'
0
- File.read(file)
0
- end
0
+def sendfile(file)
0
+ xml!
0
+ return if file.include? '..'
0
+ File.read(file)
0
+end
0
 
0
+config_for :development do
0
   get '/images/diag.gif' do
0
     @headers['Content-Type'] = 'image/gif'
0
     File.read('images/diag.gif')
0
@@ -213,11 +216,8 @@ config_for :development do
0
 end
0
 
0
 config_for :production do
0
- def sendfile(file)
0
- xml!
0
- return if file.include? '..'
0
- @headers['X-Accel-Redirect'] = "/static/#{file}"
0
- end
0
+ get(404) { '' }
0
+ get(500) { '' }
0
 end
0
 
0
 module Helpers

Comments

    No one has commented yet.