Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (28 sloc) 842 Bytes
#\ -p 4000
gem 'activesupport'
gem 'serve'
require 'serve'
require 'serve/rack'
require 'sass/plugin/rack'
require 'compass'
# The project root directory
root = ::File.dirname(__FILE__)
# Compass
Compass.add_project_configuration(root + '/compass.config')
Compass.configure_sass_plugin!
# Rack Middleware
use Rack::ShowStatus # Nice looking 404s and other messages
use Rack::ShowExceptions # Nice looking errors
use Sass::Plugin::Rack # Compile Sass on the fly
# Rack Application
if ENV['SERVER_SOFTWARE'] =~ /passenger/i
# Passendger only needs the adapter
run Serve::RackAdapter.new(root + '/views')
else
# We use Rack::Cascade and Rack::Directory on other platforms to handle static
# assets
run Rack::Cascade.new([
Serve::RackAdapter.new(root + '/views'),
Rack::Directory.new(root + '/public')
])
end