Permalink
Browse files

Move demo-site to Heroku Cedar

  • Loading branch information...
jeremyevans committed Dec 7, 2013
1 parent bc739de commit 72efaccaaa6848568cfd389534e2490c4e0e0842
Showing with 40 additions and 17 deletions.
  1. +0 −4 .gems
  2. +7 −0 Gemfile
  3. +30 −0 Gemfile.lock
  4. +1 −0 Procfile
  5. +0 −1 demo-site/config.ru
  6. +1 −12 demo-site/forme_demo.rb
  7. +1 −0 demo-site/unicorn.conf
View
4 .gems
@@ -1,4 +0,0 @@
-sequel --version '>= 3.25.0'
-forme
-sinatra
-pg
View
@@ -0,0 +1,7 @@
+source "https://rubygems.org"
+
+gem 'sequel'
+gem 'forme'
+gem 'sinatra'
+gem 'pg'
+gem 'unicorn'
View
@@ -0,0 +1,30 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ forme (0.8.0)
+ kgio (2.7.4)
+ pg (0.17.0)
+ rack (1.5.2)
+ rack-protection (1.5.0)
+ rack
+ raindrops (0.10.0)
+ sequel (4.5.0)
+ sinatra (1.4.3)
+ rack (~> 1.4)
+ rack-protection (~> 1.4)
+ tilt (~> 1.3, >= 1.3.4)
+ tilt (1.4.1)
+ unicorn (4.7.0)
+ kgio (~> 2.6)
+ rack
+ raindrops (~> 0.7)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ forme
+ pg
+ sequel
+ sinatra
+ unicorn
View
@@ -0,0 +1 @@
+web: unicorn -p $PORT -E $RACK_ENV -c demo-site/unicorn.conf
View
@@ -1,5 +1,4 @@
Encoding.default_internal = Encoding.default_external = 'UTF-8' if RUBY_VERSION >= '1.9'
$: << '.'
require './forme_demo'
-use FileServer, 'public'
run FormeDemo
View
@@ -8,6 +8,7 @@
class FormeDemo < Sinatra::Base
disable :run
disable :session
+ enable :static
helpers Forme::Sinatra::ERB
helpers do
@@ -114,15 +115,3 @@ def demo(t, opts={})
end
end
end
-
-class FileServer
- def initialize(app, root)
- @app = app
- @rfile = Rack::File.new(root)
- end
- def call(env)
- res = @rfile.call(env)
- res[0] == 200 ? res : @app.call(env)
- end
-end
-
View
@@ -0,0 +1 @@
+worker_processes 4

0 comments on commit 72efacc

Please sign in to comment.