Skip to content
Browse files

Tidy config.ru and add config

  • Loading branch information...
1 parent df5f2e9 commit 8da356b732dfc3fd7cbb74e485056d350c95bb16 @garethrees committed Nov 22, 2012
Showing with 16 additions and 6 deletions.
  1. +1 −5 config.ru
  2. +15 −1 fonts.rb
View
6 config.ru
@@ -1,12 +1,8 @@
require 'rubygems'
-require 'sinatra'
require 'bundler'
-require 'erb'
-require 'fistface'
Bundler.require
require './fonts'
-$stdout.sync = true
-run Fonts.new
+run Fonts
View
16 fonts.rb
@@ -3,9 +3,23 @@
class Fonts < Sinatra::Base
register Sinatra::FistFace
- set :root, File.dirname(__FILE__)
+
+ configure do
+ set :root, File.dirname(__FILE__)
+ set :app_file, __FILE__
+ end
+
+ configure :development do
+ enable :logging, :dump_errors, :raise_errors
+ end
+
+ configure :production do
+ set :raise_errors, false
+ set :show_exceptions, false
+ end
get '/' do
erb :index
end
+
end

0 comments on commit 8da356b

Please sign in to comment.
Something went wrong with that request. Please try again.