Skip to content

Commit

Permalink
Revert "test"
Browse files Browse the repository at this point in the history
This reverts commit 094ce58.
  • Loading branch information
bry4n committed Nov 22, 2009
1 parent 094ce58 commit 25d7108
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
22 changes: 9 additions & 13 deletions app.rb
@@ -1,7 +1,7 @@
require "yaml"

$config = YAML.load_file("configs/config.yml")
if $config["logging"] == true
config = YAML.load_file("configs/config.yml")
if config["logging"] == true
log = File.new('log/sinatra.log', 'a+')
$stderr.reopen(log)
end
Expand All @@ -10,16 +10,14 @@
require 'sinatra'
require 'configs/deps'

set :run, false
set :environment, :"#{config['environment']}"
set :server, config["server"]
set :host, config["host"]
set :port, config["port"].to_i
set :views, 'app/views'
set :public, 'public'

class MVC < Sinatra::Base
set :environment, :"#{$config['environment']}"
set :server, $config["server"]
set :host, $config["host"]
set :port, $config["port"].to_i
set :views, 'app/views'
set :public, 'public'
enable :sessions, :logging, :dump_errors, :raise_errors, :static
enable :sessions, :logging, :dump_errors, :raise_errors, :static

load 'configs/configures.rb'

Expand All @@ -28,5 +26,3 @@ class MVC < Sinatra::Base
Dir.glob("helpers/*.rb") {|file| load file}

load "configs/routes.rb"

end
3 changes: 1 addition & 2 deletions config.ru
Expand Up @@ -2,5 +2,4 @@ require 'app'

use Rack::ShowExceptions

puts $config
MVC.run! $config
run Sinatra::Application

0 comments on commit 25d7108

Please sign in to comment.