Permalink
Browse files

Refactor the file structure to look more like a regular sinatra app

  • Loading branch information...
1 parent a223e39 commit 8db1ab0614ae602f5d0187e6db468137e91e018d @foca foca committed Nov 9, 2008
View
@@ -1,5 +0,0 @@
-#!/usr/bin/env ruby
-require File.dirname(__FILE__) + "/../lib/integrity"
-require "sinatra"
-
-load File.dirname(__FILE__) + "/../lib/integrity/ui.rb"
View
@@ -1,19 +0,0 @@
-require File.dirname(__FILE__) + '/lib/integrity'
-
-Integrity.new
-include Integrity
-
-project = Project.first(:name => "Integrity") || begin
- Integrity::Project.create(
- :name => 'Integrity',
- :uri => 'git://github.com/foca/integrity.git',
- :command => 'git submodule update --init && rake'
- )
- Project.first(:name => 'Integrity')
-end
-
-result = project.build
-
-puts "Output\n#{'='*6}"
-puts result.output
-puts "STATUS: #{result.human_readable_status}"
@@ -1,9 +1,11 @@
+require File.dirname(__FILE__) + "/lib/integrity"
+require "sinatra"
require "authorization"
require "hacks"
-set :root, Integrity.root / "lib/integrity/ui"
-set :public, Integrity.root / "lib/integrity/ui/public"
-set :views, Integrity.root / "lib/integrity/ui/views"
+set :root, Integrity.root
+set :public, Integrity.root / "public"
+set :views, Integrity.root / "views"
enable :sessions
File renamed without changes.
File renamed without changes.
File renamed without changes
View
@@ -54,7 +54,7 @@ def enable_basic_auth!
before(:each) do
Integrity.stub!(:new)
disable_basic_auth!
- require Integrity.root / "lib" / "integrity" / "ui"
+ require Integrity.root / "integrity"
end
after(:each) { @project = nil }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8db1ab0

Please sign in to comment.