bantic-integrity 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,387 @@
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
+ :height 1.4em
112
+ label
113
+ :float left
114
+ :display block
115
+ :margin-top .5em
116
+ :width 8em
117
+ :margin-right .75em
118
+ .with_errors
119
+ label
120
+ :background red
121
+ :color white
122
+ :position relative
123
+ :top -.7em
124
+ &.required
125
+ label
126
+ :position static
127
+ :margin-right .25em
128
+ :padding 0 .2em
129
+ input, textarea
130
+ :border 2px solid #f22
131
+ :background #fee
132
+ :color = !text_color - #111
133
+ .required
134
+ label
135
+ :float none
136
+ :display block
137
+ :width auto
138
+ :position relative
139
+ :font-weight bold
140
+ :margin-top 1em
141
+ :text-indent -.65em
142
+ &:before
143
+ :content "* "
144
+ :color = !link_color
145
+ input.text
146
+ :width 25.6em
147
+ :font-size 24px
148
+ :font-weight bold
149
+ .normal
150
+ :margin-top 2em
151
+ h2.notifier label
152
+ :float none
153
+ :width auto
154
+ :margin-right 0
155
+ .warning
156
+ :font-size .5em
157
+ :font-weight normal
158
+ :color = !light_color
159
+ fieldset
160
+ :padding-bottom 1em
161
+ :margin-left 1.35em
162
+ :border-bottom = 1px solid !rule_color
163
+ :margin-bottom 1em
164
+ h3
165
+ :margin-top 1em
166
+ :margin-bottom 0
167
+ p.normal
168
+ :margin-top 1em
169
+ p label
170
+ :width 6.7em
171
+ p.submit
172
+ :margin-top 2em
173
+ &:after
174
+ :display block
175
+ :clear both
176
+ :float none
177
+ :content "."
178
+ :text-indent -9999em
179
+ :text-align left
180
+ &.destroy
181
+ :margin-top 0
182
+ button
183
+ :float none
184
+ :display inline
185
+
186
+ .blank_slate, .error
187
+ p
188
+ :position relative
189
+ :top .3em
190
+ h1
191
+ :border-width 0
192
+ :margin 0
193
+ :padding 0
194
+ button
195
+ :float none
196
+ :border 0 none
197
+ :background transparent
198
+ :display inline
199
+ :color = !link_color
200
+ :padding 0.25em 0
201
+ :margin 0
202
+ &:hover
203
+ :background = !link_color
204
+ :color = !link_bg
205
+
206
+ .error
207
+ dt
208
+ :margin
209
+ :top 1.4em
210
+ :bottom .3em
211
+ :font
212
+ :size 1.75em
213
+ :family = !nice_fonts
214
+ dd
215
+ :line-height 1.4
216
+
217
+ .backtrace
218
+ :margin 1em 0
219
+ :overflow scroll
220
+ :height 30em
221
+ :border = 1px solid !rule_color
222
+ :line-height 1.6
223
+
224
+ #projects
225
+ :margin 1em 0 2em
226
+ :border-top = 1px solid !rule_color
227
+ li
228
+ :position relative
229
+ :border-bottom = 1px solid !rule_color
230
+ &.odd
231
+ :background = !content_bg - #080808
232
+ &.building
233
+ :background transparent url(/spinner.gif) no-repeat scroll right
234
+ a
235
+ :font-size 2em
236
+ :padding .25em
237
+ :line-height 1.2
238
+ :font-weight bold
239
+ :display block
240
+ &.success
241
+ :color = !success_color
242
+ &.failed
243
+ :color = !failed_color
244
+ .meta
245
+ :position absolute
246
+ :right .6em
247
+ :top 1.5em
248
+ :font-size 0.8em
249
+ :color = !light_color
250
+ :text-align right
251
+ &.building .meta
252
+ :right 1.6em
253
+ &.success .meta
254
+ :color = !success_color
255
+ &.failed .meta
256
+ :color = !failed_color
257
+
258
+
259
+ #previous_builds
260
+ li
261
+ a
262
+ :display block
263
+ :padding .25em
264
+ :margin-bottom .25em
265
+ :border
266
+ :width 1px
267
+ :style solid
268
+ strong
269
+ :font-size 1.3em
270
+ .attribution
271
+ :font-size .9em
272
+
273
+ #projects, #previous_builds
274
+ li
275
+ &.success a
276
+ :background-color = !success_bg
277
+ :border-color = !success_bg - #222
278
+ :color = !success_color
279
+ .attribution
280
+ :color = !success_bg - #444
281
+ &:hover
282
+ :background-color = !success_bg + #222
283
+ &.failed a
284
+ :background-color = !failed_bg
285
+ :border-color = !failed_bg - #222
286
+ :color = !failed_color
287
+ .attribution
288
+ :color = !failed_bg - #444
289
+ &:hover
290
+ :background-color = !failed_bg + #222
291
+
292
+
293
+ #build, #last_build
294
+ h1, blockquote
295
+ :border
296
+ :width 0 1px
297
+ :style solid
298
+ h1
299
+ :border-top-width 1px
300
+ blockquote
301
+ :bottom-bottom-width 1px
302
+ :line-height 1.4
303
+
304
+ &.success
305
+ h1, blockquote
306
+ :background-color = !success_bg
307
+ :border-color = (!success_bg - #222) (!success_bg + #111) (!success_bg + #111) (!success_bg - #222)
308
+ h1
309
+ :color = !success_color
310
+ .meta
311
+ :color = !success_bg - #444
312
+
313
+ &.failed
314
+ h1, blockquote
315
+ :background-color = !failed_bg
316
+ :border-color = (!failed_bg - #222) (!failed_bg + #111) (!failed_bg + #111) (!failed_bg - #222)
317
+ h1
318
+ :color = !failed_color
319
+ .meta
320
+ :color = !failed_bg - #444
321
+
322
+ h1
323
+ :margin-top .5em
324
+ :margin-bottom 0
325
+ :padding .25em
326
+ :color = !success_color
327
+
328
+ blockquote
329
+ :padding .75em
330
+ :margin-bottom 2em
331
+ .meta
332
+ :margin-top 1em
333
+ :display block
334
+ :font-size .9em
335
+
336
+ pre.output
337
+ :background #111
338
+ :color #fff
339
+ :padding .5em
340
+ :overflow auto
341
+ :max-height 50em
342
+ :font-size .825em
343
+
344
+ .color30
345
+ :color #333
346
+ .color31
347
+ :color #e33
348
+ .color32
349
+ :color #3e3
350
+ .color33
351
+ :color #ee3
352
+ .color34
353
+ :color #33e
354
+ .color35
355
+ :color #e3e
356
+ .color36
357
+ :color #3ee
358
+ .color37
359
+ :color #fff
360
+
361
+ #push_url
362
+ :display block
363
+ :margin
364
+ :top 1em
365
+ :left 2em
366
+
367
+ a
368
+ &.success
369
+ :color = !success_bg
370
+ &:hover
371
+ :background-color = !success_bg
372
+ :color white
373
+ &.failed
374
+ :color = !failed_bg
375
+ &:hover
376
+ :background-color = !failed_bg
377
+ :color white
378
+
379
+ #footer
380
+ :padding 1.5em 2.5em
381
+ :border-top 1px solid #ccc
382
+ :font-size .8em
383
+ :width 50em !important
384
+ :color #666
385
+ :text-align right
386
+ strong
387
+ :font-weight bold
data/views/layout.haml ADDED
@@ -0,0 +1,25 @@
1
+ !!! Strict
2
+ %html{ :lang => "en", :"xml:lang" => "en", :xmlns => "http://www.w3.org/1999/xhtml" }
3
+ %head
4
+ %meta{ :content => "text/html; charset=utf-8", :"http-equiv" => "Content-Type" }
5
+ %meta{ :content => "en", :"http-equiv" => "Content-Language" }
6
+ %title= "#{@title.last} | integrity"
7
+ %link{ :media => "screen", :type => "text/css", :href => "/reset.css", :rel => "stylesheet" }
8
+ %link{ :media => "screen", :type => "text/css", :href => "/buttons.css", :rel => "stylesheet" }
9
+ %link{ :media => "screen", :type => "text/css", :href => "/integrity.css", :rel => "stylesheet" }
10
+ %body
11
+ #header
12
+ %h1= @title.join(" / ")
13
+ %address.watermark
14
+ checked with
15
+ %a{ :href => "http://integrityapp.com", :title => "The fun continuous integration server" } integrity
16
+ #content= yield
17
+ - if Integrity.config && Integrity.config[:use_basic_auth]
18
+ #footer
19
+ - if authorized?
20
+ Oh, hello
21
+ %strong&= current_user
22
+ - else
23
+ Hey there!
24
+ %a{ :href => "/login" } Log In
25
+ if you have a user
data/views/new.haml ADDED
@@ -0,0 +1,53 @@
1
+ %form{ :method => "post", :action => (@project.new_record? ? "/" : project_url(@project)) }
2
+ - unless @project.new_record?
3
+ .hidden
4
+ %input{ :name => "_method", :type => "hidden", :value => "put" }
5
+
6
+ %p.required{ :class => error_class(@project, :name) }
7
+ %label{ :for => "project_name" }
8
+ Name
9
+ = errors_on @project, :name
10
+ %input.text#project_name{ :name => "project_data[name]", :type => "text", :value => h(@project.name) }
11
+
12
+ %p.required{ :class => error_class(@project, :uri) }
13
+ %label{ :for => "project_repository" }
14
+ Git repository
15
+ = errors_on @project, :uri
16
+ %input.text#project_repository{ :name => "project_data[uri]", :type => "text", :value => h(@project.uri) }
17
+
18
+ %p.normal{ :class => error_class(@project, :branch) }
19
+ %label{ :for => "project_branch" }
20
+ Branch to track
21
+ = errors_on @project, :branch
22
+ %input.text#project_branch{ :name => "project_data[branch]", :type => "text", :value => "master", :value => h(@project.branch) }
23
+
24
+ %p.normal{ :class => error_class(@project, :command) }
25
+ %label{ :for => "project_build_script" }
26
+ Build script
27
+ = errors_on @project, :command
28
+ %textarea#project_build_script{ :name => "project_data[command]", :cols => 40, :rows => 1 }&= @project.command.to_s
29
+
30
+ %p.normal.checkbox
31
+ %label{ :for => "project_public" } Public project
32
+ %input.checkbox#project_public{ checkbox("project_data[public]", @project.public?) }
33
+
34
+ - Notifier.available.each do |notifier|
35
+ = notifier_form(notifier)
36
+
37
+ %p.submit
38
+ %button.positive{ :type => "submit" }= @project.new_record? ? "Create Project" : "Update Project"
39
+
40
+ - unless @project.new_record?
41
+ %h2 Push URL
42
+ %p
43
+ You can use this Push URL with your GitHub project to enable automated continuous integration.
44
+ %p
45
+ %code#push_url= push_url_for(@project)
46
+
47
+ %form{ :method => "post", :action => project_url(@project) }
48
+ .hidden
49
+ %input{ :name => "_method", :type => "hidden", :value => "delete" }
50
+ %h2 Delete this project
51
+ %p.submit.destroy
52
+ This will delete the project and all the builds in the system
53
+ %button.negative{ :type => "submit" } Yes, I'm sure, nuke it
@@ -0,0 +1,31 @@
1
+ .error
2
+ %h1
3
+ Ehm, you seem a bit lost, sir. Maybe going to the
4
+ %a{ :href => "/", :rel => "home" } list of projects
5
+ will help?
6
+ %dl
7
+ %dt Ouch. This is a 404 error-thingie, right?
8
+ %dd Yeah, you browsed to a page that doesn't exist in this server.
9
+
10
+ %dt What can I do?
11
+ %dd
12
+ As a very good book says on its cover:
13
+ = succeed "." do
14
+ %strong DON'T PANIC
15
+ / if you didn't get the reference you aren't as nerd as you should be
16
+ You should probably just go back to
17
+ %a{ :href => "/", :rel => "home" } the projects list
18
+ or, alternatively, go
19
+ = succeed "." do
20
+ %a{ :href => request.referer } back from whence you came
21
+
22
+ %dt
23
+ What the hell is
24
+ = succeed "?" do
25
+ %strong Integrity
26
+ %dd
27
+ Integrity is your friendly
28
+ %a{ :href => "http://en.wikipedia.org/wiki/Continuous_integration" } Continuous Integration
29
+ server. If you want to know more about us, check our website at
30
+ = succeed "." do
31
+ %a{ :href => "http://integrityapp.com" } integrityapp.com
@@ -0,0 +1,7 @@
1
+ %h2.notifier
2
+ %label
3
+ %input.checkbox{ checkbox("enabled_notifiers[]", enabled, :value => notifier) }
4
+ == #{notifier} Notifications
5
+ %span.warning be aware that no validation will be made on these fields
6
+ %fieldset{ :id => "#{notifier.downcase}_config" }
7
+ = yield
@@ -0,0 +1,32 @@
1
+ #administrative
2
+ %a{ :href => project_url(@project, :edit) } Edit Project
3
+
4
+ - if @project.builds.empty?
5
+ %form.blank_slate{ :action => project_url(@project, :builds), :method => :post }
6
+ %p No builds for this project, buddy
7
+ %h1
8
+ You can request a
9
+ %button{ :type => :submit } manual build
10
+ - else
11
+ - @build = @project.last_build
12
+ #last_build{ :class => @build.status }
13
+ = haml(:build_info, :layout => false)
14
+
15
+ %form{ :action => project_url(@project, :builds), :method => :post }
16
+ %p.submit
17
+ %button{ :type => :submit } Request Manual Build
18
+
19
+ - unless @project.previous_builds.empty?
20
+ %h2 Previous builds
21
+ %ul#previous_builds
22
+ - @project.previous_builds.each do |build|
23
+ %li{ :class => build.status }
24
+ %a{ :href => build_url(build) }
25
+ %strong.build
26
+ Build
27
+ &= build.short_commit_identifier
28
+ %span.attribution
29
+ by
30
+ = succeed "," do
31
+ &= build.commit_author.name
32
+ &= pretty_date build.commited_at
@@ -0,0 +1,38 @@
1
+ .error
2
+ %h1
3
+ So... you don't know the password? Hmm... You can
4
+ %a{ :href => "/login" } try again
5
+ or
6
+ = succeed "." do
7
+ %a{ :href => "/", :rel => "home" } go back
8
+
9
+ %dl
10
+ %dt Er... So... I'm trying to login without a password...
11
+ %dd
12
+ Hey pal, sorry, but I can't let in anyone that isn't
13
+ = succeed "." do
14
+ %strong on the list
15
+ I could lose my job you know? You'll have to come up with
16
+ a valid password :-(
17
+
18
+ %dt What can I do?
19
+ %dd
20
+ This just means that you can't access some part of this Integrity
21
+ server, but that shouldn't let you out of some of the
22
+ %a{ :href => "/" } awesome projects
23
+ hosted here. If this was just a misunderstanding and you
24
+ %strong do
25
+ have a password, then
26
+ = succeed "." do
27
+ %a{ :href => "/login" } click here to try again
28
+
29
+ %dt
30
+ So what the hell is
31
+ = succeed "?" do
32
+ %strong Integrity
33
+ %dd
34
+ Integrity is your friendly
35
+ %a{ :href => "http://en.wikipedia.org/wiki/Continuous_integration" } Continuous Integration
36
+ server. If you want to know more about us, check our website at
37
+ = succeed "." do
38
+ %a{ :href => "http://integrityapp.com" } integrityapp.com