This repository has been archived by the owner on May 12, 2023. It is now read-only.
forked from rwdaigle/edgerails
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add files necessary for Heroku deployment
- Loading branch information
Showing
3 changed files
with
59 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)] } |