Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rearrange ross\'s mess

  • Loading branch information...
commit 73f1b23c56c377dfaa85c709103fe4a6e8f5b31d 1 parent 228d15a
@prefork prefork authored
Showing with 29 additions and 11 deletions.
  1. +3 −11 config.ru
  2. +19 −0 environment.rb
  3. +7 −0 permitmapping.rb
View
14 config.ru
@@ -1,12 +1,4 @@
-require 'bundler/setup'
-require 'sinatra/base'
+require './environment'
+require './permitmapping'
-use Rack::Session::Cookie
-
-class App < Sinatra::Base
- get '/' do
- erb :index
- end
-end
-
-run App.new
+run PermitMapping.new
View
19 environment.rb
@@ -0,0 +1,19 @@
+require 'rubygems'
+require 'bundler'
+Bundler.require
+
+# Setup defaults
+ROOT = File.expand_path(File.dirname(__FILE__))
+
+#DataMapper::Logger.new($stdout, :debug)
+
+# A Sqlite3 connection to a persistent database
+#DataMapper.setup(:default, "sqlite:///#{ROOT}/data/permits.db")
+#DataMapper.setup(:default, 'postgres://postgres:postgres@192.168.2.165/omaha-building-permits')
+#DataMapper.setup(:default, "sqlite:///tmp/permits.db")
+
+require 'open-uri'
+require 'uri'
+
+# Database stuff
+require './lib/models'
View
7 permitmapping.rb
@@ -0,0 +1,7 @@
+use Rack::Session::Cookie
+
+class App < Sinatra::Base
+ get '/' do
+ erb :index
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.