Add config.ru to support development server.

Conflicts:

	Gemfile.lock
This commit is contained in:
Jez Cope 2012-04-20 07:52:08 +01:00
parent 9e0ee48833
commit e63ec349ee
3 changed files with 21 additions and 0 deletions

View File

@ -18,6 +18,8 @@ gem "faker"
gem "therubyracer"
group :development do
gem "rack-rewrite"
gem "thor"
gem "sequel"
gem "activesupport"

View File

@ -33,6 +33,7 @@ GEM
cri (~> 2.2)
nokogiri (1.5.2)
rack (1.4.1)
rack-rewrite (1.2.1)
sass (3.1.15)
sequel (3.34.1)
therubyracer (0.10.1)
@ -59,6 +60,7 @@ DEPENDENCIES
nanoc
nokogiri
rack
rack-rewrite
sequel
therubyracer
thor

17
config.ru Normal file
View File

@ -0,0 +1,17 @@
require 'bundler/setup'
Bundler.require
require 'rack-rewrite'
use Rack::Rewrite do
r301 %r{^([^\.]*[^\/])$}, '$1/'
r301 %r{^(.*\/)$}, '$1index.html'
end
use Rack::Static, :urls => ["/"], :root => Dir.pwd + '/output'
class NanocRack
def call(env)
[200, {"Content-Type" => "text/html"}, ["Ooops. This shouldn't happen."] ]
end
end
run NanocRack.new