oliyoung-integrity 0.1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/README.markdown +73 -0
  2. data/Rakefile +118 -0
  3. data/bin/integrity +4 -0
  4. data/config/config.sample.ru +21 -0
  5. data/config/config.sample.yml +41 -0
  6. data/config/thin.sample.yml +13 -0
  7. data/lib/integrity.rb +72 -0
  8. data/lib/integrity/app.rb +138 -0
  9. data/lib/integrity/author.rb +39 -0
  10. data/lib/integrity/build.rb +84 -0
  11. data/lib/integrity/commit.rb +71 -0
  12. data/lib/integrity/core_ext/object.rb +6 -0
  13. data/lib/integrity/helpers.rb +16 -0
  14. data/lib/integrity/helpers/authorization.rb +33 -0
  15. data/lib/integrity/helpers/breadcrumbs.rb +20 -0
  16. data/lib/integrity/helpers/forms.rb +28 -0
  17. data/lib/integrity/helpers/pretty_output.rb +45 -0
  18. data/lib/integrity/helpers/rendering.rb +19 -0
  19. data/lib/integrity/helpers/resources.rb +19 -0
  20. data/lib/integrity/helpers/urls.rb +49 -0
  21. data/lib/integrity/installer.rb +131 -0
  22. data/lib/integrity/migrations.rb +140 -0
  23. data/lib/integrity/notifier.rb +48 -0
  24. data/lib/integrity/notifier/base.rb +65 -0
  25. data/lib/integrity/project.rb +153 -0
  26. data/lib/integrity/project_builder.rb +56 -0
  27. data/lib/integrity/scm.rb +19 -0
  28. data/lib/integrity/scm/git.rb +84 -0
  29. data/lib/integrity/scm/git/uri.rb +57 -0
  30. data/public/buttons.css +82 -0
  31. data/public/reset.css +7 -0
  32. data/public/spinner.gif +0 -0
  33. data/test/acceptance/api_test.rb +97 -0
  34. data/test/acceptance/browse_project_builds_test.rb +65 -0
  35. data/test/acceptance/browse_project_test.rb +95 -0
  36. data/test/acceptance/build_notifications_test.rb +42 -0
  37. data/test/acceptance/create_project_test.rb +97 -0
  38. data/test/acceptance/delete_project_test.rb +53 -0
  39. data/test/acceptance/edit_project_test.rb +117 -0
  40. data/test/acceptance/error_page_test.rb +18 -0
  41. data/test/acceptance/helpers.rb +2 -0
  42. data/test/acceptance/installer_test.rb +82 -0
  43. data/test/acceptance/manual_build_project_test.rb +82 -0
  44. data/test/acceptance/notifier_test.rb +109 -0
  45. data/test/acceptance/project_syndication_test.rb +30 -0
  46. data/test/acceptance/stylesheet_test.rb +18 -0
  47. data/test/helpers.rb +80 -0
  48. data/test/helpers/acceptance.rb +78 -0
  49. data/test/helpers/acceptance/email_notifier.rb +55 -0
  50. data/test/helpers/acceptance/git_helper.rb +99 -0
  51. data/test/helpers/acceptance/textfile_notifier.rb +26 -0
  52. data/test/helpers/expectations.rb +4 -0
  53. data/test/helpers/expectations/be_a.rb +23 -0
  54. data/test/helpers/expectations/change.rb +90 -0
  55. data/test/helpers/expectations/have.rb +105 -0
  56. data/test/helpers/expectations/predicates.rb +37 -0
  57. data/test/helpers/fixtures.rb +87 -0
  58. data/test/helpers/initial_migration_fixture.sql +44 -0
  59. data/test/unit/build_test.rb +51 -0
  60. data/test/unit/commit_test.rb +83 -0
  61. data/test/unit/helpers_test.rb +56 -0
  62. data/test/unit/integrity_test.rb +18 -0
  63. data/test/unit/migrations_test.rb +56 -0
  64. data/test/unit/notifier_test.rb +123 -0
  65. data/test/unit/project_builder_test.rb +111 -0
  66. data/test/unit/project_test.rb +282 -0
  67. data/test/unit/scm_test.rb +54 -0
  68. data/views/_commit_info.haml +24 -0
  69. data/views/build.haml +2 -0
  70. data/views/error.haml +37 -0
  71. data/views/home.haml +21 -0
  72. data/views/integrity.sass +400 -0
  73. data/views/layout.haml +28 -0
  74. data/views/new.haml +51 -0
  75. data/views/not_found.haml +31 -0
  76. data/views/notifier.haml +7 -0
  77. data/views/project.builder +21 -0
  78. data/views/project.haml +30 -0
  79. data/views/unauthorized.haml +38 -0
  80. metadata +225 -0
@@ -0,0 +1,282 @@
1
+ require File.dirname(__FILE__) + "/../helpers"
2
+
3
+ class ProjectTest < Test::Unit::TestCase
4
+ before(:each) do
5
+ RR.reset
6
+ ignore_logs!
7
+ end
8
+
9
+ specify "default fixture is valid and can be saved" do
10
+ lambda do
11
+ Project.generate.tap do |project|
12
+ project.should be_valid
13
+ project.save
14
+ end
15
+ end.should change(Project, :count).by(1)
16
+ end
17
+
18
+ specify "integrity fixture is valid and can be saved" do
19
+ lambda do
20
+ Project.generate(:integrity).tap do |project|
21
+ project.should be_valid
22
+ project.save
23
+ end
24
+ end.should change(Project, :count).by(1)
25
+ end
26
+
27
+ describe "Properties" do
28
+ before(:each) do
29
+ @project = Project.generate(:integrity)
30
+ end
31
+
32
+ it "has a name" do
33
+ @project.name.should == "Integrity"
34
+ end
35
+
36
+ it "has a permalink" do
37
+ @project.permalink.should == "integrity"
38
+
39
+ @project.tap do |project|
40
+ project.name = "foo's bar/baz and BACON?!"
41
+ project.save
42
+ end.permalink.should == "foos-bar-baz-and-bacon"
43
+ end
44
+
45
+ it "has an URI" do
46
+ @project.uri.should == Addressable::URI.parse("git://github.com/foca/integrity.git")
47
+ end
48
+
49
+ it "has a branch" do
50
+ @project.branch.should == "master"
51
+ end
52
+
53
+ specify "branch defaults to master" do
54
+ Project.new.branch.should == "master"
55
+ end
56
+
57
+ it "has a command" do
58
+ # TODO: rename to build_command
59
+ @project.command.should == "rake"
60
+ end
61
+
62
+ specify "command defaults to 'rake'" do
63
+ Project.new.command.should == "rake"
64
+ end
65
+
66
+ it "has a building flag" do
67
+ @project.should_not be_building
68
+ end
69
+
70
+ specify "building flag default to false" do
71
+ Project.new.should_not be_building
72
+ end
73
+
74
+ it "knows it's visibility" do
75
+ # TODO: rename Project#public property to visibility
76
+ # TODO: and have utility method to query its state instead
77
+
78
+ Project.new.should be_public
79
+
80
+ @project.should be_public
81
+ @project.tap { |p| p.public = "1" }.should be_public
82
+ @project.tap { |p| p.public = "0" }.should_not be_public
83
+
84
+ Project.gen(:public => "false").should be_public
85
+ Project.gen(:public => "true").should be_public
86
+ Project.gen(:public => false).should_not be_public
87
+ Project.gen(:public => nil).should_not be_public
88
+ end
89
+
90
+ it "has a created_at" do
91
+ @project.created_at.should be_a(DateTime)
92
+ end
93
+
94
+ it "has an updated_at" do
95
+ @project.updated_at.should be_a(DateTime)
96
+ end
97
+
98
+ it "knows it's status" do
99
+ Project.gen(:commits => 1.of{ Commit.gen(:successful) }).status.should == :success
100
+ Project.gen(:commits => 2.of{ Commit.gen(:successful) }).status.should == :success
101
+ Project.gen(:commits => 2.of{ Commit.gen(:failed) }).status.should == :failed
102
+ Project.gen(:commits => 1.of{ Commit.gen(:pending) }).status.should == :pending
103
+ Project.gen(:commits => []).status.should be_nil
104
+ end
105
+
106
+ it "knows it's last build" do
107
+ Project.gen(:commits => []).last_commit.should be_nil
108
+
109
+ commits = 5.of { Commit.gen(:successful) }
110
+ project = Project.gen(:commits => commits)
111
+ project.last_commit.should == commits.sort_by {|c| c.committed_at }.last
112
+ end
113
+ end
114
+
115
+ describe "Validation" do
116
+ it "requires a name" do
117
+ lambda do
118
+ Project.gen(:name => nil).should_not be_valid
119
+ end.should_not change(Project, :count)
120
+ end
121
+
122
+ it "requires an URI" do
123
+ lambda do
124
+ Project.gen(:uri => nil).should_not be_valid
125
+ end.should_not change(Project, :count)
126
+ end
127
+
128
+ it "requires a branch" do
129
+ lambda do
130
+ Project.gen(:branch => nil).should_not be_valid
131
+ end.should_not change(Project, :count)
132
+ end
133
+
134
+ it "requires a command" do
135
+ lambda do
136
+ Project.gen(:command => nil).should_not be_valid
137
+ end.should_not change(Project, :count)
138
+ end
139
+
140
+ it "ensures its name is unique" do
141
+ Project.gen(:name => "Integrity")
142
+ lambda do
143
+ Project.gen(:name => "Integrity").should_not be_valid
144
+ end.should_not change(Project, :count)
145
+ end
146
+ end
147
+
148
+ describe "Finding public or private projects" do
149
+ before(:each) do
150
+ @public_project = Project.gen(:public => true)
151
+ @private_project = Project.gen(:public => false)
152
+ end
153
+
154
+ it "finds only public projects if the condition passed is false" do
155
+ projects = Project.only_public_unless(false)
156
+ projects.should_not include(@private_project)
157
+ projects.should include(@public_project)
158
+ end
159
+
160
+ it "finds both private and public projects if the condition passed is true" do
161
+ projects = Project.only_public_unless(true)
162
+ projects.should include(@private_project)
163
+ projects.should include(@public_project)
164
+ end
165
+ end
166
+
167
+ describe "When finding its previous builds" do
168
+ before(:each) do
169
+ @project = Project.generate(:commits => 5.of { Commit.gen })
170
+ @commits = @project.commits.sort_by {|c| c.committed_at }.reverse
171
+ end
172
+
173
+ it "has 4 previous builds" do
174
+ @project.should have(4).previous_commits
175
+ end
176
+
177
+ it "returns the builds ordered chronogicaly (desc) by creation date" do
178
+ @project.previous_commits.should == @commits[1..-1]
179
+ end
180
+
181
+ it "excludes the last build" do
182
+ @project.previous_commits.should_not include(@project.last_commit)
183
+ end
184
+
185
+ it "returns an empty array if it has only one build" do
186
+ project = Project.gen(:commits => 1.of { Integrity::Commit.gen })
187
+ project.should have(:no).previous_commits
188
+ end
189
+
190
+ it "returns an empty array if there are no builds" do
191
+ project = Project.gen(:commits => [])
192
+ project.should have(:no).previous_commits
193
+ end
194
+ end
195
+
196
+ describe "When getting destroyed" do
197
+ before(:each) do
198
+ @commits = 7.of { Commit.gen }
199
+ @project = Project.generate(:commits => @commits)
200
+ end
201
+
202
+ it "destroys itself and tell ProjectBuilder to delete the code from disk" do
203
+ lambda do
204
+ stub.instance_of(ProjectBuilder).delete_code
205
+ @project.destroy
206
+ end.should change(Project, :count).by(-1)
207
+ end
208
+
209
+ it "destroys its builds" do
210
+ lambda do
211
+ @project.destroy
212
+ end.should change(Commit, :count).by(-7)
213
+ end
214
+ end
215
+
216
+ describe "When retrieving state about its notifier" do
217
+ before(:each) do
218
+ @project = Project.generate
219
+ @irc = Notifier.generate(:irc)
220
+ end
221
+
222
+ specify "#config_for returns given notifier's configuration" do
223
+ @project.update_attributes(:notifiers => [@irc])
224
+ @project.config_for("IRC").should == {:uri => "irc://irc.freenode.net/integrity"}
225
+ end
226
+
227
+ specify "#config_for returns an empty hash if no such notifier" do
228
+ @project.config_for("IRC").should == {}
229
+ end
230
+
231
+ specify "#notifies? is true if it uses the given notifier" do
232
+ @project.update_attributes(:notifiers => [@irc])
233
+ @project.notifies?("IRC").should == true
234
+ end
235
+
236
+ specify "#notifies? is false if it doesnt use the given notifier" do
237
+ @project.update_attributes(:notifiers => [])
238
+
239
+ @project.notifies?("IRC").should == false
240
+ @project.notifies?("UndefinedNotifier").should == false
241
+ end
242
+ end
243
+
244
+ describe "When building a commit" do
245
+ before(:each) do
246
+ @commits = 2.of { Commit.gen }
247
+ @project = Project.gen(:integrity, :commits => @commits)
248
+ stub.instance_of(ProjectBuilder).build { nil }
249
+ end
250
+
251
+ it "gets the specified commit and creates a pending build for it" do
252
+ commit = @commits.last
253
+
254
+ lambda {
255
+ @project.build(commit.identifier)
256
+ }.should change(Build, :count).by(1)
257
+
258
+ build = Build.all.last
259
+ build.commit.should be(commit)
260
+ build.should be_pending
261
+
262
+ commit.should be_pending
263
+ end
264
+
265
+ it "creates an empty commit with the head of the project if passed 'HEAD' (the default)" do
266
+ mock(@project).head_of_remote_repo { "FOOBAR" }
267
+
268
+ lambda {
269
+ @project.build("HEAD")
270
+ }.should change(Commit, :count).by(1)
271
+
272
+ build = Build.all.last
273
+ build.commit.should be(@project.last_commit)
274
+
275
+ @project.last_commit.should be_pending
276
+ @project.last_commit.identifier.should be("FOOBAR")
277
+
278
+ @project.last_commit.author.name.should == "<Commit author not loaded>"
279
+ @project.last_commit.message.should == "<Commit message not loaded>"
280
+ end
281
+ end
282
+ end
@@ -0,0 +1,54 @@
1
+ require File.dirname(__FILE__) + "/../helpers"
2
+
3
+ class SCMTest < Test::Unit::TestCase
4
+ def scm(uri)
5
+ SCM.new(Addressable::URI.parse(uri), "master", "foo")
6
+ end
7
+
8
+ it "recognizes git URIs" do
9
+ scm("git://example.org/repo").should be_an(SCM::Git)
10
+ scm("git@example.org/repo.git").should be_an(SCM::Git)
11
+ scm("git://example.org/repo.git").should be_an(SCM::Git)
12
+ end
13
+
14
+ it "raises SCMUnknownError if it can't figure the SCM from the URI" do
15
+ lambda { scm("scm://example.org") }.should raise_error(SCM::SCMUnknownError)
16
+ end
17
+
18
+ it "doesn't need the working tree path for all operations, so it's not required on the constructor" do
19
+ lambda {
20
+ SCM.new(Addressable::URI.parse("git://github.com/foca/integrity.git"), "master")
21
+ }.should_not raise_error
22
+ end
23
+
24
+ describe "SCM::Git::URI" do
25
+ uris = [
26
+ "rsync://host.xz/path/to/repo.git/",
27
+ "rsync://host.xz/path/to/repo.git",
28
+ "rsync://host.xz/path/to/repo.gi",
29
+ "http://host.xz/path/to/repo.git/",
30
+ "https://host.xz/path/to/repo.git/",
31
+ "git://host.xz/path/to/repo.git/",
32
+ "git://host.xz/~user/path/to/repo.git/",
33
+ "ssh://[user@]host.xz[:port]/path/to/repo.git/",
34
+ "ssh://[user@]host.xz/path/to/repo.git/",
35
+ "ssh://[user@]host.xz/~user/path/to/repo.git/",
36
+ "ssh://[user@]host.xz/~/path/to/repo.git",
37
+ "host.xz:/path/to/repo.git/",
38
+ "host.xz:~user/path/to/repo.git/",
39
+ "host.xz:path/to/repo.git",
40
+ "user@host.xz:/path/to/repo.git/",
41
+ "user@host.xz:~user/path/to/repo.git/",
42
+ "user@host.xz:path/to/repo.git",
43
+ "user@host.xz:path/to/repo",
44
+ "user@host.xz:path/to/repo.a_git"
45
+ ]
46
+
47
+ uris.each do |uri|
48
+ it "parses the uri #{uri}" do
49
+ git_url = SCM::Git::URI.new(uri)
50
+ git_url.working_tree_path.should == "path-to-repo"
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,24 @@
1
+ %h1&= commit.human_readable_status
2
+
3
+ - if commit.failed?
4
+ %form{ :action => commit_path(commit, :builds), :method => :post }
5
+ %p.submit
6
+ %button{ :type => :submit, :title => "Rebuild this commit" }<
7
+ Rebuild
8
+
9
+ %blockquote
10
+ %p&= commit.message
11
+ %p.meta<
12
+ %span.who<
13
+ &== by: #{commit.author.name}
14
+ |
15
+ %span.when{ :title => commit.commited_at }<
16
+ &= pretty_date commit.committed_at
17
+ |
18
+ %span.what<
19
+ &== commit: #{commit.identifier}
20
+
21
+ %h2 Build Output:
22
+ %pre.output
23
+ :preserve
24
+ #{bash_color_codes h(commit.output)}
data/views/build.haml ADDED
@@ -0,0 +1,2 @@
1
+ #build{ :class => @commit.status }
2
+ = partial(:commit_info, :commit => @commit)
data/views/error.haml ADDED
@@ -0,0 +1,37 @@
1
+ .error
2
+ %h1
3
+ Whatever you do, DON'T PANIC!
4
+
5
+ %dl
6
+ %dt This is what happened:
7
+ %dd
8
+ %strong&= @error.message
9
+ %pre.backtrace= @error.backtrace.join("\n")
10
+ %dd
11
+ %strong Query parameters:
12
+ %pre.query_params= params.inspect
13
+
14
+ %dt What can I do?
15
+ %dd
16
+ - if @project
17
+ Is your
18
+ %a{ :href => project_url(@project, :edit) } config
19
+ ok?
20
+ Need
21
+ %a{ :href => "http://integrityapp.com/configure" } help?
22
+ Remember to restart Integrity.
23
+ If you think everything is fine,
24
+ then drop by our irc channel:
25
+ %a{ :href => "irc://irc.freenode.org:6667/integrity" } #integrity
26
+ on freenode, and we'll try to help.
27
+
28
+ %dt
29
+ What the hell is
30
+ = succeed "?" do
31
+ %strong Integrity
32
+ %dd
33
+ Integrity is your friendly
34
+ %a{ :href => "http://en.wikipedia.org/wiki/Continuous_integration" } Continuous Integration
35
+ server. If you want to know more about us, check our website at
36
+ = succeed "." do
37
+ %a{ :href => "http://integrityapp.com" } integrityapp.com
data/views/home.haml ADDED
@@ -0,0 +1,21 @@
1
+ - if @projects.empty?
2
+ .blank_slate
3
+ %p None yet, huh?
4
+ %h1
5
+ Why don't you
6
+ = succeed "?" do
7
+ %a{ :href => "/new" } create your first project
8
+ - else
9
+ %ul#projects
10
+ - @projects.each do |project|
11
+ %li{ :class => cycle("even", "odd") + ' ' + project.status.to_s }
12
+ %a{ :href => project_path(project) }&= project.name
13
+ .meta
14
+ - if project.building?
15
+ Building!
16
+ - elsif project.last_commit.nil?
17
+ Never built yet
18
+ - else
19
+ = project.human_readable_status
20
+ %p#new
21
+ %a{ :href => "/new" } Add a new project
@@ -0,0 +1,400 @@
1
+ !default_fonts = "Helvetica Neue, Helvetica, Arial, sans-serif"
2
+ !nice_fonts = "Georgia, Times New Roman, serif"
3
+ !monospace_fonts = "Monaco, Deja Vu Sans Mono, Inconsolata, Consolas, monospace"
4
+
5
+ !page_bg = #e0e0e0
6
+ !content_bg = #eee
7
+ !header_bg = #fff
8
+ !text_color = #333
9
+ !light_color = #999
10
+ !title_color = #4e4e4e
11
+ !link_color = #ed1556
12
+ !link_bg = #fff
13
+ !rule_color = #c0c0c0
14
+ !watermark = #ccc
15
+ !quote_bg = #fff
16
+ !success_bg = #bbf8aa
17
+ !success_color = #337022
18
+ !failed_bg = #fba
19
+ !failed_color = #f10
20
+
21
+ html
22
+ :background-color = !page_bg
23
+
24
+ body
25
+ :font-size 100%
26
+ :font-family = !default_fonts
27
+ :color = !text_color
28
+
29
+ a
30
+ :color = !link_color
31
+ :text-decoration none
32
+ &:hover
33
+ :color = !link_bg
34
+ :background-color = !link_color
35
+
36
+ #header, #content, #footer
37
+ :width 40em
38
+ :margin 0 auto
39
+ :background = !content_bg
40
+ :padding 0 2em
41
+ :z-index 0
42
+ :position relative
43
+ :font-size 1em
44
+
45
+ #header
46
+ :background = !header_bg
47
+ h1
48
+ :font-weight bold
49
+ :font-size 1.5em
50
+ address.watermark
51
+ :position absolute
52
+ :font-weight bold
53
+ :right 3em
54
+ :top 0
55
+ :font-size .75em
56
+ :color = !watermark
57
+ a
58
+ :color = !watermark
59
+ :font-weight bold
60
+ :font-size 2em
61
+ &:hover
62
+ :background transparent
63
+ :color = !watermark - #222
64
+
65
+ #content
66
+ :padding-top 1em
67
+ :padding-bottom 2em
68
+
69
+ strong
70
+ :font-weight bold
71
+ em
72
+ :font-style italic
73
+
74
+ h1, h2, h3, h4, h5, h6
75
+ :color = !title_color
76
+ h1
77
+ :font-size 2em
78
+ :font-weight bold
79
+ :margin-bottom .75em
80
+ :padding .25em 0
81
+ :line-height 1.2
82
+ :border-bottom = 1px solid !rule_color
83
+ h2
84
+ :font-weight bold
85
+ :font-size 1.5em
86
+ :margin 1em 0 .2em
87
+ h3
88
+ :font-weight bold
89
+ :font-size 1.25em
90
+ :margin .25em 0
91
+ h4, h5, h6
92
+ :font-weight bold
93
+ :margin-top .5em
94
+
95
+ code, pre, textarea, input
96
+ :font-family = !monospace_fonts
97
+ pre
98
+ margin .5em :0
99
+ padding .5em
100
+
101
+ form
102
+ p
103
+ :margin-top 1em
104
+ :position relative
105
+ &.checkbox label
106
+ :margin-top 0 !important
107
+ input.text, textarea
108
+ :width 30em
109
+ :padding .2em .4em
110
+ :color = !title_color
111
+ input.text
112
+ :height 1.4em
113
+ label
114
+ :float left
115
+ :display block
116
+ :margin-top .5em
117
+ :width 8em
118
+ :margin-right .75em
119
+ .with_errors
120
+ label
121
+ :background red
122
+ :color white
123
+ :position relative
124
+ :top -.7em
125
+ &.required
126
+ label
127
+ :position static
128
+ :margin-right .25em
129
+ :padding 0 .2em
130
+ input, textarea
131
+ :border 2px solid #f22
132
+ :background #fee
133
+ :color = !text_color - #111
134
+ .required
135
+ label
136
+ :float none
137
+ :display block
138
+ :width auto
139
+ :position relative
140
+ :font-weight bold
141
+ :margin-top 1em
142
+ :text-indent -.65em
143
+ &:before
144
+ :content "* "
145
+ :color = !link_color
146
+ input.text
147
+ :width 25.6em
148
+ :font-size 24px
149
+ :font-weight bold
150
+ .normal
151
+ :margin-top 2em
152
+ h2.notifier label
153
+ :float none
154
+ :width auto
155
+ :margin-right 0
156
+ .warning
157
+ :font-size .5em
158
+ :font-weight normal
159
+ :color = !light_color
160
+ fieldset
161
+ :padding-bottom 1em
162
+ :margin-left 1.35em
163
+ :border-bottom = 1px solid !rule_color
164
+ :margin-bottom 1em
165
+ h3
166
+ :margin-top 1em
167
+ :margin-bottom 0
168
+ p.normal
169
+ :margin-top 1em
170
+ p label
171
+ :width 6.7em
172
+ p.submit
173
+ :margin-top 2em
174
+ &:after
175
+ :display block
176
+ :clear both
177
+ :float none
178
+ :content "."
179
+ :text-indent -9999em
180
+ :text-align left
181
+ &.destroy, &.manual-build
182
+ button
183
+ :float none
184
+ :display inline
185
+ &.manual-build
186
+ button
187
+ :margin-right 0
188
+
189
+ #build form, #last_build form
190
+ :font-size .75em
191
+ p.submit
192
+ :margin 0
193
+ :padding 0
194
+ :position absolute
195
+ :right .5em
196
+ :top 1.25em
197
+
198
+ .blank_slate, .error
199
+ p
200
+ :position relative
201
+ :top .3em
202
+ h1
203
+ :border-width 0
204
+ :margin 0
205
+ :padding 0
206
+ button
207
+ :float none
208
+ :border 0 none
209
+ :background transparent
210
+ :display inline
211
+ :color = !link_color
212
+ :padding 0.25em 0
213
+ :margin 0
214
+ &:hover
215
+ :background = !link_color
216
+ :color = !link_bg
217
+
218
+ .error
219
+ dt
220
+ :margin
221
+ :top 1.4em
222
+ :bottom .3em
223
+ :font
224
+ :size 1.75em
225
+ :family = !nice_fonts
226
+ dd
227
+ :line-height 1.4
228
+
229
+ .backtrace
230
+ :margin 1em 0
231
+ :overflow scroll
232
+ :height 30em
233
+ :border = 1px solid !rule_color
234
+ :line-height 1.6
235
+
236
+ #projects
237
+ :margin 1em 0 2em
238
+ :border-top = 1px solid !rule_color
239
+ li
240
+ :position relative
241
+ :border-bottom = 1px solid !rule_color
242
+ &.odd
243
+ :background = !content_bg - #080808
244
+ &.building
245
+ :background transparent url(/spinner.gif) no-repeat scroll right
246
+ a
247
+ :font-size 2em
248
+ :padding .25em
249
+ :line-height 1.2
250
+ :font-weight bold
251
+ :display block
252
+ &.success
253
+ :color = !success_color
254
+ &.failed
255
+ :color = !failed_color
256
+ .meta
257
+ :position absolute
258
+ :right .6em
259
+ :top 1.5em
260
+ :font-size 0.8em
261
+ :color = !light_color
262
+ :text-align right
263
+ &.building .meta
264
+ :right 1.6em
265
+ &.success .meta
266
+ :color = !success_color
267
+ &.failed .meta
268
+ :color = !failed_color
269
+
270
+
271
+ #previous_builds
272
+ li
273
+ a
274
+ :display block
275
+ :padding .25em
276
+ :margin-bottom .25em
277
+ :border
278
+ :width 1px
279
+ :style solid
280
+ strong
281
+ :font-size 1.3em
282
+ .attribution
283
+ :font-size .9em
284
+
285
+ #projects, #previous_builds
286
+ li
287
+ &.success a
288
+ :background-color = !success_bg
289
+ :border-color = !success_bg - #222
290
+ :color = !success_color
291
+ .attribution
292
+ :color = !success_bg - #444
293
+ &:hover
294
+ :background-color = !success_bg + #222
295
+ &.failed a
296
+ :background-color = !failed_bg
297
+ :border-color = !failed_bg - #222
298
+ :color = !failed_color
299
+ .attribution
300
+ :color = !failed_bg - #444
301
+ &:hover
302
+ :background-color = !failed_bg + #222
303
+
304
+
305
+ #build, #last_build
306
+ :position relative
307
+ h1, blockquote
308
+ :border
309
+ :width 0 1px
310
+ :style solid
311
+ h1
312
+ :border-top-width 1px
313
+ blockquote
314
+ :bottom-bottom-width 1px
315
+ :line-height 1.4
316
+
317
+ &.success
318
+ h1, blockquote
319
+ :background-color = !success_bg
320
+ :border-color = (!success_bg - #222) (!success_bg + #111) (!success_bg + #111) (!success_bg - #222)
321
+ h1
322
+ :color = !success_color
323
+ .meta
324
+ :color = !success_bg - #444
325
+
326
+ &.failed
327
+ h1, blockquote
328
+ :background-color = !failed_bg
329
+ :border-color = (!failed_bg - #222) (!failed_bg + #111) (!failed_bg + #111) (!failed_bg - #222)
330
+ h1
331
+ :color = !failed_color
332
+ .meta
333
+ :color = !failed_bg - #444
334
+
335
+ h1
336
+ :margin-top .5em
337
+ :margin-bottom 0
338
+ :padding .25em
339
+ :color = !success_color
340
+
341
+ blockquote
342
+ :padding .75em
343
+ :margin-bottom 2em
344
+ .meta
345
+ :margin-top 1em
346
+ :display block
347
+ :font-size .9em
348
+
349
+ pre.output
350
+ :background #111
351
+ :color #fff
352
+ :padding .5em
353
+ :overflow auto
354
+ :max-height 50em
355
+ :font-size .825em
356
+
357
+ .color30
358
+ :color #333
359
+ .color31
360
+ :color #e33
361
+ .color32
362
+ :color #3e3
363
+ .color33
364
+ :color #ee3
365
+ .color34
366
+ :color #33e
367
+ .color35
368
+ :color #e3e
369
+ .color36
370
+ :color #3ee
371
+ .color37
372
+ :color #fff
373
+
374
+ #push_path
375
+ :display block
376
+ :margin
377
+ :top 1em
378
+ :left 2em
379
+
380
+ a
381
+ &.success
382
+ :color = !success_bg
383
+ &:hover
384
+ :background-color = !success_bg
385
+ :color white
386
+ &.failed
387
+ :color = !failed_bg
388
+ &:hover
389
+ :background-color = !failed_bg
390
+ :color white
391
+
392
+ #footer
393
+ :padding 1.5em 2.5em
394
+ :border-top 1px solid #ccc
395
+ :font-size .8em
396
+ :width 50em !important
397
+ :color #666
398
+ :text-align right
399
+ strong
400
+ :font-weight bold