Permalink
Browse files

Deploy agent to octet using rsync, and running with CGI.

  • Loading branch information...
1 parent 6d1d42f commit dac2a57cafea215a3e219c8cbc0ad5efb495d5aa @sam-github committed Mar 1, 2009
Showing with 24 additions and 11 deletions.
  1. +5 −3 Makefile
  2. +0 −3 lib/vpim/.cvsignore
  3. +19 −5 lib/vpim/agent/app.rb
View
@@ -6,8 +6,7 @@ RUBY=/usr/bin/ruby
.PHONY: default doc test other
-do: vagent
- open vAgent.app
+do: agent-upload
reminder:
ruby -I lib samples/reminder.rb
@@ -20,6 +19,9 @@ bday:
doc-upload:
cd doc; scp -r . sam@rubyforge.org:/var/www/gforge-projects/vpim/
+agent-upload:
+ rsync -v --archive --compress --cvs-exclude --exclude=.svn/ --del lib octet:webapps/agent/
+
RDFLAGS = -w2
#--diagram
@@ -172,4 +174,4 @@ vagent:
-# vim:noexpandtab:tabstop=2:
+# vim:noexpandtab:tabstop=2:sw=2:
View
@@ -2,7 +2,4 @@
ChangeLog
*.swp
.svn
-agent
-.cvsignore
-.cvsignore
.cvsignore
View
@@ -6,16 +6,30 @@
details.
=end
-# I could wrap the Repo/Calendar/Atomize in a small class that would memoize
-# ical data and atom output. Maybe even do an HTTP head for fast detection of
-# change? Does a calendar have updated information? Can we memoize atom when
-# ics doesn't change?
-
require 'sinatra'
require 'vpim/agent/atomize'
require 'vpim/repo'
require 'vpim/view'
+configure do
+ server = Sinatra::Application.server
+ set :server, Proc.new {
+ if ENV.include?("PHP_FCGI_CHILDREN")
+ break "fastcgi" # Must NOT be the correct class name!
+ elsif ENV.include?("REQUEST_METHOD")
+ break "cgi" # Must NOT be the correct class name!
+ else
+ # Fall back on whatever it was going to be.
+ server
+ end
+ }
+end
+
+# I could wrap the Repo/Calendar/Atomize in a small class that would memoize
+# ical data and atom output. Maybe even do an HTTP head for fast detection of
+# change? Does a calendar have updated information? Can we memoize atom when
+# ics doesn't change?
+
module Vpim
module Agent
module App

0 comments on commit dac2a57

Please sign in to comment.