Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

raw build output

Signed-off-by: Simon Rozet <simon@rozet.name>
  • Loading branch information...
commit ee71d4381ed39eeb2186bd6409438a7bd4512a4d 1 parent a8c48d4
@halorgium halorgium authored committed
View
6 lib/integrity/app.rb
@@ -116,6 +116,12 @@ class App < Sinatra::Base
current_build.sha1_short]
end
+ get "/:project/builds/:build/raw" do
+ login_required unless current_project.public?
+ content_type :text
+ current_build.output
+ end
+
post "/:project/builds/:build" do
login_required
View
14 public/integrity.css
@@ -265,14 +265,16 @@ a {
#content #build blockquote, #content #last_build blockquote {
bottom-bottom-width: 1px;
line-height: 1.4; }
+ #content #build h2 a, #content #last_build h2 a {
+ font-size: smaller; }
#content #build.success h1, #content #build.success blockquote, #content #last_build.success h1, #content #last_build.success blockquote {
background-color: #bbf8aa;
border-color: #99d688 #ccffbb #ccffbb #99d688; }
#content #build.success h1, #content #last_build.success h1 {
color: #337022; }
- #content #build.success .meta, #content #build.success a, #content #last_build.success .meta, #content #last_build.success a {
+ #content #build.success .meta, #content #build.success .github a, #content #last_build.success .meta, #content #last_build.success .github a {
color: #77b466; }
- #content #build.success .meta a:hover, #content #build.success a a:hover, #content #last_build.success .meta a:hover, #content #last_build.success a a:hover {
+ #content #build.success .meta a:hover, #content #build.success .github a a:hover, #content #last_build.success .meta a:hover, #content #last_build.success .github a a:hover {
color: #bbf8aa;
background-color: #337022; }
#content #build.failed h1, #content #build.failed blockquote, #content #last_build.failed h1, #content #last_build.failed blockquote {
@@ -280,9 +282,9 @@ a {
border-color: #dd9988 #ffccbb #ffccbb #dd9988; }
#content #build.failed h1, #content #last_build.failed h1 {
color: #ff1100; }
- #content #build.failed .meta, #content #build.failed a, #content #last_build.failed .meta, #content #last_build.failed a {
+ #content #build.failed .meta, #content #build.failed .github a, #content #last_build.failed .meta, #content #last_build.failed .github a {
color: #bb7766; }
- #content #build.failed .meta a:hover, #content #build.failed a a:hover, #content #last_build.failed .meta a:hover, #content #last_build.failed a a:hover {
+ #content #build.failed .meta a:hover, #content #build.failed .github a a:hover, #content #last_build.failed .meta a:hover, #content #last_build.failed .github a a:hover {
color: #ffbbaa;
background-color: #ff1100; }
#content #build.building h1, #content #build.building blockquote, #content #last_build.building h1, #content #last_build.building blockquote {
@@ -290,9 +292,9 @@ a {
border-color: #aaaaaa #dddddd #dddddd #aaaaaa; }
#content #build.building h1, #content #last_build.building h1 {
color: #777777; }
- #content #build.building .meta, #content #build.building a, #content #last_build.building .meta, #content #last_build.building a {
+ #content #build.building .meta, #content #build.building .github a, #content #last_build.building .meta, #content #last_build.building .github a {
color: #333333; }
- #content #build.building .meta a:hover, #content #build.building a a:hover, #content #last_build.building .meta a:hover, #content #last_build.building a a:hover {
+ #content #build.building .meta a:hover, #content #build.building .github a a:hover, #content #last_build.building .meta a:hover, #content #last_build.building .github a a:hover {
color: #cccccc;
background-color: #777777; }
#content #build h1, #content #last_build h1 {
View
9 test/acceptance/browse_builds_test.rb
@@ -39,6 +39,11 @@ class BrowseBuildsTest < Test::Unit::AcceptanceTestCase
click_link Build.first.sha1_short
click_link "on GitHub"
assert last_request.url.include?("http://github.com")
+
+ visit "/integrity"
+ click_link "raw"
+ assert_equal Project.first(:name => "Integrity").last_build.output,
+ last_response.body
end
scenario "Looking for details on the last build" do
@@ -71,14 +76,14 @@ class BrowseBuildsTest < Test::Unit::AcceptanceTestCase
click_link(/Build 87e673a/)
assert_have_tag("h1", :content => "Built 87e673a successfully")
- assert_have_tag("h2", :content => "Build Output:")
+ assert_have_tag("h2", :content => "Build Output")
assert_have_tag("button", :content => "Rebuild")
visit "/integrity"
click_link(/Build 7fee3f0/)
assert_have_tag("h1", :content => "7fee3f0 hasn't been built yet")
- assert_have_no_tag("h2", :content => "Build Output:")
+ assert_have_no_tag("h2", :content => "Build Output")
assert_have_tag("button", :content => "Rebuild")
end
end
View
5 views/_build_info.haml
@@ -19,7 +19,10 @@
%a{ :href => github_commit_url(build) } view on GitHub
- if build.completed?
- %h2 Build Output:
+ %h2
+ Build Output
+ %a{:href => build_path(build, :raw)} (raw)
+
%pre.output
:preserve
#{bash_color_codes h(build.output)}
View
10 views/integrity.sass
@@ -317,13 +317,16 @@ a
:bottom-bottom-width 1px
:line-height 1.4
+ h2 a
+ :font-size smaller
+
&.success
h1, blockquote
:background-color = !success_bg
:border-color = (!success_bg - #222) (!success_bg + #111) (!success_bg + #111) (!success_bg - #222)
h1
:color = !success_color
- .meta, a
+ .meta, .github a
:color = !success_bg - #444
a:hover
:color = !success_bg
@@ -335,7 +338,7 @@ a
:border-color = (!failed_bg - #222) (!failed_bg + #111) (!failed_bg + #111) (!failed_bg - #222)
h1
:color = !failed_color
- .meta, a
+ .meta, .github a
:color = !failed_bg - #444
a:hover
:color = !failed_bg
@@ -347,11 +350,12 @@ a
:border-color = (!building_bg - #222) (!building_bg + #111) (!building_bg + #111) (!building_bg - #222)
h1
:color = !building_color
- .meta, a
+ .meta, .github a
:color = !building_color - #444
a:hover
:color = !building_bg
:background-color = !building_color
+
h1
:margin-top .5em
:margin-bottom 0
Please sign in to comment.
Something went wrong with that request. Please try again.