Permalink
Browse files

Add files necessary for Heroku deployment

  • Loading branch information...
1 parent 8492077 commit 82aaf339ddec5f06680b6a52acec1308e6165e4f @rwdaigle rwdaigle committed Jan 12, 2011
Showing with 59 additions and 9 deletions.
  1. +15 −9 Gemfile
  2. +16 −0 Gemfile.lock
  3. +28 −0 config.ru
View
24 Gemfile
@@ -1,11 +1,17 @@
source 'http://rubygems.org'
-gem 'activesupport', "2.3.5"
-gem 'jekyll', :git => "https://github.com/henrik/jekyll.git"
-gem 'compass'
-gem 'compass-colors'
-gem 'rdiscount'
-gem 'fssm'
-gem 'serve'
-gem 'mongrel'
-gem 'rake'
+gem 'rack-rewrite', '~> 1.0.0'
+
+group :development do
+ gem 'activesupport', "2.3.5"
+ gem 'jekyll', :git => "https://github.com/henrik/jekyll.git"
+ gem 'compass'
+ gem 'compass-colors'
+ gem 'rdiscount'
+ gem 'fssm'
+ gem 'serve'
+ gem 'mongrel'
+ gem 'rake'
+ gem 'heroku'
+ gem 'rack'
+end
View
@@ -22,25 +22,38 @@ GEM
haml (>= 3.0.4)
compass-colors (0.3.1)
compass (>= 0.8.7)
+ configuration (1.2.0)
daemons (1.1.0)
directory_watcher (1.3.2)
fast-stemmer (1.0.0)
fastthread (1.0.7)
fssm (0.2.3)
gem_plugin (0.2.3)
haml (3.0.25)
+ heroku (1.15.1)
+ json_pure (>= 1.2.0, < 1.5.0)
+ launchy (~> 0.3.2)
+ rest-client (>= 1.4.0, < 1.7.0)
+ json_pure (1.4.6)
+ launchy (0.3.7)
+ configuration (>= 0.0.5)
+ rake (>= 0.8.1)
liquid (2.2.2)
maruku (0.6.0)
syntax (>= 1.0.0)
+ mime-types (1.16)
mongrel (1.1.5)
cgi_multipart_eof_fix (>= 2.4)
daemons (>= 1.0.3)
fastthread (>= 1.0.1)
gem_plugin (>= 0.2.3)
open4 (1.0.1)
rack (1.2.1)
+ rack-rewrite (1.0.2)
rake (0.8.7)
rdiscount (1.6.5)
+ rest-client (1.6.1)
+ mime-types (>= 1.16)
serve (0.11.7)
activesupport (>= 2.3.5)
rack (>= 1.2.1)
@@ -54,8 +67,11 @@ DEPENDENCIES
compass
compass-colors
fssm
+ heroku
jekyll!
mongrel
+ rack
+ rack-rewrite (~> 1.0.0)
rake
rdiscount
serve
View
@@ -0,0 +1,28 @@
+# Rack-rewrite to append "/index.html" to URLs without "."
+gem 'rack-rewrite', '~> 1.0.0'
+
+require 'rack/rewrite'
+
+use Rack::Rewrite do
+ r301 %r{^([^\.]*[^\/])$}, '$1/'
+ r301 %r{^(.*\/)$}, '$1index.html'
+end
+
+run Rack::Directory.new('site')
+
+# use Rack::Static, :urls => ['/stylesheets'], :root => "output"
+# use Rack::Static, :urls => ["/"], :root => Dir.pwd + "public"
+# use Rack::Static, :urls => [/./], :root => "public"
+# use Rack::ETag
+
+# Empty app, should never be reached:
+# class Site
+# def call(env)
+# [200, {"Content-Type" => "text/html"}, ["Ouch, broken link! Please report to contact@bracket7.com"] ]
+# end
+# end
+#
+# run Site.new
+
+# use Rack::Static, :urls => ["/stylesheets", "/images", "/javascripts"], :root => "public"
+# run lambda { |env| [200, { 'Content-Type' => 'text/html', 'Cache-Control' => 'public, max-age=86400' }, File.open('public/index.html', File::RDONLY)] }

0 comments on commit 82aaf33

Please sign in to comment.