Created
November 6, 2008 23:02
-
-
Save dyoder/22732 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Waves | |
module Foundations | |
module Compact | |
app.module_eval <<-_CODE | |
module Resources | |
class Map | |
include Waves::Resources::Mixin | |
handler( Exception ) do | |
Waves::Views::Errors.new( request ).server_error_500 | |
end | |
handler( Waves::Dispatchers::NotFoundError ) do | |
Waves::Views::Errors.new( request ).not_found_404 | |
end | |
end | |
end | |
module Configurations | |
class Development < Waves::Configurations::Default | |
log :level => :debug | |
host '127.0.0.1' | |
port 3000 | |
server Waves::Servers::Mongrel | |
resource app::Resources::Map | |
end | |
class Production < Waves::Configurations::Default | |
log :level => :error, :output => ( "log.#{$$}" ), :rotation => :weekly | |
port 80 | |
host '0.0.0.0' | |
server Waves::Servers::Mongrel | |
application do | |
use Rack::Session::Cookie, :key => 'rack.session', | |
# :domain => 'foo.com', | |
:path => '/', | |
:expire_after => 2592000, | |
:secret => 'Change it' | |
run ::Waves::Dispatchers::Default.new | |
end | |
end | |
end | |
_CODE | |
end | |
Waves << app | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment