Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

Commit

Permalink
Merge commit '1c830064aab330f0c4c93513474047926c4518f1'
Browse files Browse the repository at this point in the history
  • Loading branch information
sr committed Apr 1, 2010
2 parents eac532a + 1c83006 commit 5a5207d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 43 deletions.
2 changes: 1 addition & 1 deletion integrity/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* Add a rake task to clean-up old build checkouts

* Add a TCP notifier. Works great with http://github.com/atmos/irccat-nodejs
* Add a TCP notifier. Works great with http://github.com/atmos/ircat.js

* Fix URLs, allowing to mount Integrity to a sub direcory [Iain Hecker]

Expand Down
5 changes: 2 additions & 3 deletions integrity/doc/htmlize
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cat <<EOF
<!DOCTYPE html>
<html>
<head>
<title>Integrity | The easy and fun automated continuous integration server</title>
<title>Integrity | Continuous Integration server</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href=integrity.css rel=stylesheet type="text/css">
</head>
Expand All @@ -14,8 +14,7 @@ src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
alt="Fork me on GitHub" /></a></p>
<div id=header>
<h1><a href="/">Integrity</a></h1>
<p>The easy and fun automated <strong>continuous integration</strong>
server</p>
<p>Continuous Integration server</p>
</div>
<div id=content>
EOF
Expand Down
10 changes: 0 additions & 10 deletions integrity/lib/integrity/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ class App < Sinatra::Base

helpers Integrity::Helpers

# TODO
def last_modified(time)
return unless time
super
end

not_found do
status 404
show :not_found, :title => "lost, are we?"
Expand Down Expand Up @@ -52,7 +46,6 @@ def last_modified(time)
end

get "/?" do
last_modified Build.max(:updated_at)
@projects = authorized? ? Project.all : Project.all(:public => true)
show :home, :title => "projects"
end
Expand Down Expand Up @@ -86,7 +79,6 @@ def last_modified(time)

get "/:project" do
login_required unless current_project.public?
last_modified current_project.builds.max(:updated_at)
show :project, :title => ["projects", current_project.name]
end

Expand Down Expand Up @@ -123,8 +115,6 @@ def last_modified(time)

get "/:project/builds/:build" do
login_required unless current_project.public?
last_modified current_build.updated_at

show :build, :title => ["projects", current_project.permalink,
current_build.commit.identifier]
end
Expand Down
18 changes: 1 addition & 17 deletions integrity/test/acceptance/browse_builds_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ class BrowseBuildsTest < Test::Unit::AcceptanceTestCase
assert_have_tag("li.failed", :count => 2)
assert_have_tag("li.success", :count => 3)
end

header "HTTP_IF_MODIFIED_SINCE", last_response["Last-Modified"]
visit "/"

assert_equal 304, last_response.status
end

scenario "Looking for details on the last build" do
Expand All @@ -47,7 +42,7 @@ class BrowseBuildsTest < Test::Unit::AcceptanceTestCase
:message => "No more pending tests :)",
:committed_at => Time.mktime(2008, 12, 15, 18)
)
Project.gen(:integrity, :builds => [build])
p = Project.gen(:integrity, :builds => [build])

visit "/integrity"

Expand All @@ -56,11 +51,6 @@ class BrowseBuildsTest < Test::Unit::AcceptanceTestCase
assert_have_tag("span.who", :content => "by: Nicolas Sanguinetti")
assert_have_tag("span.when", :content => "Dec 15th")
assert_have_tag("pre.output", :content => "This is the build output")

header "HTTP_IF_MODIFIED_SINCE", last_response["Last-Modified"]
visit "/"

assert_equal 304, last_response.status
end

scenario "Browsing to an individual build page" do
Expand All @@ -83,11 +73,5 @@ class BrowseBuildsTest < Test::Unit::AcceptanceTestCase
assert_have_tag("h1", :content => "This commit hasn't been built yet")
assert_have_no_tag("h2", :content => "Build Output:")
assert_have_tag("button", :content => "Rebuild")

visit "/integrity"
header "HTTP_IF_MODIFIED_SINCE", last_response["Last-Modified"]
visit "/integrity"

assert_equal 304, last_response.status
end
end
2 changes: 1 addition & 1 deletion integrity/test/acceptance/delete_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DeleteTest < Test::Unit::AcceptanceTestCase
login_as "admin", "test"
visit "/integrity"
click_link "Build foo"
click_button "Delete build"
click_button "Delete this build"

assert_not_contain("Previous builds")
end
Expand Down
5 changes: 0 additions & 5 deletions integrity/test/acceptance/homepage_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ class HomepageTest < Test::Unit::AcceptanceTestCase

assert_have_tag("li[@class~=blank]", :content => "Never built yet")
assert_have_tag("li[@class~=building]", :content => "Building!")

header "HTTP_IF_MODIFIED_SINCE", last_response["Last-Modified"]
visit "/"

assert_equal 304, last_response.status
end

scenario "Clicking on a project from the homepage" do
Expand Down
11 changes: 5 additions & 6 deletions integrity/views/build.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#build{ :class => @build.status }
= partial(:build_info, :build => @build)
- unless @build.building?
%form{ :action => build_path(@build), :method => :post }
%input{ :name => "_method", :type => "hidden", :value => "delete" }
%p
%button{ :title => "Delete this build" }
Delete build
%form{ :action => build_path(@build), :method => :post }
%input{ :name => "_method", :type => "hidden", :value => "delete" }
%p
%button{ :title => "Delete this build" }
Delete this build

0 comments on commit 5a5207d

Please sign in to comment.