Permalink
Browse files

Update to use the newer named app run command

  • Loading branch information...
1 parent b5a4849 commit db2cbdcf1b73ab78bbb74367c795851fc787fd10 @adamstac committed Jul 11, 2013
Showing with 11 additions and 7 deletions.
  1. +9 −5 app.rb
  2. +1 −1 config.ru
  3. +1 −1 tasks/application.rake
View
@@ -1,10 +1,14 @@
require 'rubygems'
-require 'sinatra'
+require 'sinatra/base'
require 'haml'
-# Helpers
-require './helpers/render_partial'
+class SinatraBootstrap < Sinatra::Base
+ require './helpers/render_partial'
-get '/' do
- haml :index
+ get '/' do
+ haml :index
+ end
+
+ # start the server if ruby file executed directly
+ run! if app_file == $0
end
View
@@ -2,4 +2,4 @@ require 'rubygems'
require 'sinatra'
require './app'
-run Sinatra::Application
+run SinatraBootstrap
@@ -1,4 +1,4 @@
desc 'Run the app'
task :s do
- system "bundle exec shotgun config.ru"
+ system "rackup -p 4567"
end

0 comments on commit db2cbdc

Please sign in to comment.