Permalink
Browse files

flatten the sinatra app (sorry to any forkers)

  • Loading branch information...
1 parent 453f795 commit bfc1ec8b37ee01a97489cea9bcd7ab608b456327 rick committed Nov 2, 2008
View
@@ -1,5 +1,3 @@
-config/environment.rb
-app/config.ru
-app/config.rb
-app/tmp
-app/*.log
+config.ru
+config.rb
+tmp
View
@@ -19,22 +19,21 @@ rake seinfeld:add_user USER=technoweenie
rake seinfeld:update
# let's start the show
-cd app
ruby seinfeld_calendar.rb
open http://localhost:4567/~technoweenie
DEPLOYMENT
==========
-My app/config.rb looks like this:
+My config.rb looks like this:
- $: << File.join(File.dirname(__FILE__), '..', 'lib')
+ $: << File.join(File.dirname(__FILE__), 'lib')
require 'seinfeld/models'
DataMapper.setup :default, 'mysql://rickybobby:shakeandbake@localhost/seinfeld'
Seinfeld::User.github_login = 'rickybobby'
Seinfeld::User.github_password = 'shakeandbake'
-My app/config.ru (for Passenger) looks like:
+My config.ru (for Passenger) looks like:
require 'rubygems'
require 'rack'
@@ -43,7 +42,6 @@ My app/config.ru (for Passenger) looks like:
Sinatra::Application.default_options.update(
:run => false,
:env => :production,
- :views => '/path/to/seinfeld/app/views', # sinatra looks in the wrong place
:raise_errors => true
)
View
@@ -14,7 +14,7 @@ task :default => 'spec'
namespace :seinfeld do
task :init do
- require 'app/config'
+ require 'config'
end
task :setup => :init do
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
@@ -1,6 +1,6 @@
unless Object.const_defined?(:Seinfeld)
# setup a config.ru for rack, or some other ruby config file
- $: << File.join(File.dirname(__FILE__), '..', 'lib')
+ $: << File.join(File.dirname(__FILE__), 'lib')
require 'seinfeld/models'
DataMapper.setup :default, 'mysql://localhost/seinfeld'
end
File renamed without changes.
File renamed without changes.

0 comments on commit bfc1ec8

Please sign in to comment.