Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "test"

This reverts commit 094ce58.
  • Loading branch information...
commit 25d71087b3a449d0f0c03b8965514e6963417ba9 1 parent 094ce58
bry4n authored
Showing with 10 additions and 15 deletions.
  1. +9 −13 app.rb
  2. +1 −2  config.ru
22 app.rb
View
@@ -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
@@ -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'
@@ -28,5 +26,3 @@ class MVC < Sinatra::Base
Dir.glob("helpers/*.rb") {|file| load file}
load "configs/routes.rb"
-
-end
3  config.ru
View
@@ -2,5 +2,4 @@ require 'app'
use Rack::ShowExceptions
-puts $config
-MVC.run! $config
+run Sinatra::Application
Please sign in to comment.
Something went wrong with that request. Please try again.