Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 8db1ab0614ae602f5d0187e6db468137e91e018d 1 parent a223e39
@foca foca authored
View
5 bin/integrity
@@ -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
19 dog_food.rb
@@ -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}"
View
8 lib/integrity/ui.rb → integrity.rb
@@ -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
View
0  lib/integrity/ui/public/buttons.css → public/buttons.css
File renamed without changes
View
0  lib/integrity/ui/public/reset.css → public/reset.css
File renamed without changes
View
0  lib/integrity/ui/public/spinner.gif → public/spinner.gif
File renamed without changes
View
2  spec/ui_spec.rb
@@ -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 }
View
0  lib/integrity/ui/views/build.haml → views/build.haml
File renamed without changes
View
0  lib/integrity/ui/views/build_info.haml → views/build_info.haml
File renamed without changes
View
0  lib/integrity/ui/views/home.haml → views/home.haml
File renamed without changes
View
0  lib/integrity/ui/views/integrity.sass → views/integrity.sass
File renamed without changes
View
0  lib/integrity/ui/views/layout.haml → views/layout.haml
File renamed without changes
View
0  lib/integrity/ui/views/new.haml → views/new.haml
File renamed without changes
View
0  lib/integrity/ui/views/not_found.haml → views/not_found.haml
File renamed without changes
View
0  lib/integrity/ui/views/notifier.haml → views/notifier.haml
File renamed without changes
View
0  lib/integrity/ui/views/project.haml → views/project.haml
File renamed without changes
View
0  lib/integrity/ui/views/unauthorized.haml → views/unauthorized.haml
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.