Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update Rack static server deployment strategy.

  • Loading branch information...
commit 6b481e44fd35e22033f7f7f0ddf76d75e51590a3 1 parent 61542a5
@nelstrom authored
Showing with 20 additions and 7 deletions.
  1. +0 −3  .gems
  2. +4 −0 Gemfile
  3. +12 −0 Gemfile.lock
  4. +4 −4 config.ru
View
3  .gems
@@ -1,3 +0,0 @@
-rack-contrib
-rack-rewrite
-
View
4 Gemfile
@@ -0,0 +1,4 @@
+source :rubygems
+
+gem "rack"
+gem "rack-rewrite"
View
12 Gemfile.lock
@@ -0,0 +1,12 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ rack (1.2.2)
+ rack-rewrite (1.0.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rack
+ rack-rewrite
View
8 config.ru
@@ -1,9 +1,9 @@
-require "rubygems"
-require 'rack/contrib'
-require 'rack-rewrite'
+require 'rubygems'
+require 'rack/rewrite'
-use Rack::Static, :urls => ['/images'], :root => "public"
use Rack::Rewrite do
rewrite '/', '/index.html'
end
+use Rack::Static, :urls => ['/'], :root => "public"
+
run Rack::Directory.new('public')
Please sign in to comment.
Something went wrong with that request. Please try again.