Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 31 lines (24 sloc) 0.732 kb
8ec156a Sean Cribbs WIP
seancribbs authored
1 $: << 'lib'
2 require 'rubygems'
3 require 'bundler'
4
5 Bundler.require
6
7 require 'giddyup'
8 require 'rack/static'
1117518 Sean Cribbs Update the bundler lockfile, cleanup ws in Rakefile, add deflater in pro...
seancribbs authored
9 require 'rack/deflater'
50b6a30 Christopher Meiklejohn Rewrite / to index.
cmeiklejohn authored
10 require 'rack-rewrite'
9d0e077 Christopher Meiklejohn Add rake pipeline.
cmeiklejohn authored
11 require 'rake-pipeline'
12 require 'rake-pipeline/middleware'
8ec156a Sean Cribbs WIP
seancribbs authored
13
13d8579 Sean Cribbs Add .woff to the known MIME_TYPES
seancribbs authored
14 Rack::Mime::MIME_TYPES['.woff'] = 'application/x-font-woff'
15
50b6a30 Christopher Meiklejohn Rewrite / to index.
cmeiklejohn authored
16 use Rack::Rewrite do
17 rewrite %r{^(.*)\/$}, '$1/index.html'
3d66b70 Sean Cribbs Big assets dump, loads, displays minimally.
seancribbs authored
18 rewrite %r{^(.*)\/img\/(.*)$}, '$1/images/$2' # Hack for bootstrap
50b6a30 Christopher Meiklejohn Rewrite / to index.
cmeiklejohn authored
19 end
20
1117518 Sean Cribbs Update the bundler lockfile, cleanup ws in Rakefile, add deflater in pro...
seancribbs authored
21 if ENV['RACK_ENV'] == 'production'
22 use Rack::Deflater
23 else
24dfbd8 Sean Cribbs Don't activate the pipeline middleware in production. We precompile.
seancribbs authored
24 use Rake::Pipeline::Middleware, "Assetfile"
25 end
1117518 Sean Cribbs Update the bundler lockfile, cleanup ws in Rakefile, add deflater in pro...
seancribbs authored
26
27 use Rack::Static, :urls => ["/index.html", "/favicon.ico", "/stylesheets",
28 "/javascripts", "/images", "/fonts"],
29 :root => "public"
8ec156a Sean Cribbs WIP
seancribbs authored
30 run GiddyUp::Application.adapter
Something went wrong with that request. Please try again.