Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

Commit

Permalink
Add files necessary for Heroku deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
rwdaigle committed Jan 12, 2011
1 parent 8492077 commit 82aaf33
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 9 deletions.
24 changes: 15 additions & 9 deletions 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
16 changes: 16 additions & 0 deletions Gemfile.lock
Expand Up @@ -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)
Expand All @@ -54,8 +67,11 @@ DEPENDENCIES
compass
compass-colors
fssm
heroku
jekyll!
mongrel
rack
rack-rewrite (~> 1.0.0)
rake
rdiscount
serve
28 changes: 28 additions & 0 deletions config.ru
@@ -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.