Permalink
Browse files

Revert "test"

This reverts commit 8e59c98.
  • Loading branch information...
1 parent 8e59c98 commit bd5626895e49d7fac2ca80b1d9899d30fe3cb365 bry4n committed Nov 22, 2009
Showing with 22 additions and 21 deletions.
  1. +20 −19 app.rb
  2. +1 −1 config.ru
  3. +1 −1 configs/deps.rb
  4. 0 tmp/default
View
39 app.rb
@@ -1,27 +1,28 @@
require "yaml"
+
+config = YAML.load_file("configs/config.yml")
+if config["logging"] == true
+ log = File.new('log/sinatra.log', 'a+')
+ $stderr.reopen(log)
+end
+
require 'rubygems'
require 'sinatra'
require 'configs/deps'
-class MVC < Sinatra::Base
- @config = YAML.load_file("configs/config.yml")
- if @config["logging"] == true
- log = File.new('log/sinatra.log', 'a+')
- $stderr.reopen(log)
- end
- load 'configs/configures.rb'
- 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
+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
- Dir.glob("app/controllers/*.rb") {|file| load file}
- Dir.glob("app/models/*.rb") {|file| load file}
- Dir.glob("helpers/*.rb") {|file| load file}
+load 'configs/configures.rb'
- load "configs/routes.rb"
+Dir.glob("app/controllers/*.rb") {|file| load file}
+Dir.glob("app/models/*.rb") {|file| load file}
+Dir.glob("helpers/*.rb") {|file| load file}
-end
+load "configs/routes.rb"
View
@@ -2,4 +2,4 @@ require 'app'
use Rack::ShowExceptions
-MVC.run!
+run Sinatra::Application
View
@@ -12,4 +12,4 @@
#require 'ohm'
#require 'sequel'
#require 'datamapper'
-#require 'mongo_mapper'
+
View
No changes.

0 comments on commit bd56268

Please sign in to comment.