brycethornton-integrity 0.1.7.1

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.
Files changed (57) hide show
  1. data/README.markdown +66 -0
  2. data/Rakefile +110 -0
  3. data/VERSION.yml +4 -0
  4. data/app.rb +137 -0
  5. data/bin/integrity +4 -0
  6. data/config/config.sample.ru +31 -0
  7. data/config/config.sample.yml +38 -0
  8. data/config/thin.sample.yml +13 -0
  9. data/integrity.gemspec +76 -0
  10. data/lib/integrity.rb +82 -0
  11. data/lib/integrity/build.rb +61 -0
  12. data/lib/integrity/core_ext/object.rb +6 -0
  13. data/lib/integrity/core_ext/string.rb +5 -0
  14. data/lib/integrity/helpers.rb +16 -0
  15. data/lib/integrity/helpers/authorization.rb +33 -0
  16. data/lib/integrity/helpers/breadcrumbs.rb +20 -0
  17. data/lib/integrity/helpers/forms.rb +28 -0
  18. data/lib/integrity/helpers/pretty_output.rb +45 -0
  19. data/lib/integrity/helpers/rendering.rb +14 -0
  20. data/lib/integrity/helpers/resources.rb +13 -0
  21. data/lib/integrity/helpers/urls.rb +47 -0
  22. data/lib/integrity/installer.rb +132 -0
  23. data/lib/integrity/migrations.rb +152 -0
  24. data/lib/integrity/notifier.rb +50 -0
  25. data/lib/integrity/notifier/base.rb +55 -0
  26. data/lib/integrity/project.rb +117 -0
  27. data/lib/integrity/project_builder.rb +47 -0
  28. data/lib/integrity/scm.rb +19 -0
  29. data/lib/integrity/scm/git.rb +91 -0
  30. data/lib/integrity/scm/git/uri.rb +57 -0
  31. data/public/buttons.css +82 -0
  32. data/public/reset.css +7 -0
  33. data/public/spinner.gif +0 -0
  34. data/test/helpers.rb +48 -0
  35. data/test/helpers/acceptance.rb +126 -0
  36. data/test/helpers/acceptance/git_helper.rb +99 -0
  37. data/test/helpers/acceptance/textfile_notifier.rb +26 -0
  38. data/test/helpers/expectations.rb +5 -0
  39. data/test/helpers/expectations/be_a.rb +23 -0
  40. data/test/helpers/expectations/change.rb +90 -0
  41. data/test/helpers/expectations/have.rb +105 -0
  42. data/test/helpers/expectations/have_tag.rb +128 -0
  43. data/test/helpers/expectations/predicates.rb +37 -0
  44. data/test/helpers/fixtures.rb +83 -0
  45. data/views/_build_info.haml +18 -0
  46. data/views/build.haml +2 -0
  47. data/views/error.haml +36 -0
  48. data/views/home.haml +23 -0
  49. data/views/integrity.sass +387 -0
  50. data/views/layout.haml +28 -0
  51. data/views/new.haml +51 -0
  52. data/views/not_found.haml +31 -0
  53. data/views/notifier.haml +7 -0
  54. data/views/project.builder +21 -0
  55. data/views/project.haml +28 -0
  56. data/views/unauthorized.haml +38 -0
  57. metadata +243 -0
data/views/layout.haml ADDED
@@ -0,0 +1,28 @@
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
+ - unless @project.nil?
11
+ %link{ :rel => "alternate", :type => "application/atom+xml", :title => "Build history Atom", :href => "#{project_path(@project)}.atom"}
12
+
13
+ %body
14
+ #header
15
+ %h1= @title.join(" / ")
16
+ %address.watermark
17
+ checked with
18
+ %a{ :href => "http://integrityapp.com", :title => "The fun continuous integration server" } integrity
19
+ #content= yield
20
+ - if Integrity.config && Integrity.config[:use_basic_auth]
21
+ #footer
22
+ - if authorized?
23
+ Oh, hello
24
+ %strong&= current_user
25
+ - else
26
+ Hey there!
27
+ %a{ :href => "/login" } Log In
28
+ if you have a user
data/views/new.haml ADDED
@@ -0,0 +1,51 @@
1
+ %form{ :method => "post", :action => (@project.new_record? ? "/" : project_path(@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 #{errors_on @project, :name}
9
+ %input.text#project_name{ :name => "project_data[name]", :type => "text", :value => h(@project.name) }
10
+
11
+ %p.required{ :class => error_class(@project, :uri) }
12
+ %label{ :for => "project_repository" }<
13
+ &== Git repository #{errors_on @project, :uri}
14
+ %input.text#project_repository{ :name => "project_data[uri]", :type => "text", :value => h(@project.uri) }
15
+
16
+ %p.normal{ :class => error_class(@project, :branch) }
17
+ %label{ :for => "project_branch" }<
18
+ &== Branch to track #{errors_on @project, :branch}
19
+ %input.text#project_branch{ :name => "project_data[branch]", :type => "text", :value => "master", :value => h(@project.branch) }
20
+
21
+ %p.normal{ :class => error_class(@project, :command) }
22
+ %label{ :for => "project_build_script" }
23
+ &== Build script #{errors_on @project, :command}
24
+ %textarea#project_build_script{ :name => "project_data[command]", :cols => 40, :rows => 1 }
25
+ &== #{@project.command.to_s}
26
+
27
+ %p.normal.checkbox
28
+ %label{ :for => "project_public" } Public project
29
+ %input.hidden{ :name => "project_data[public]", :value => "0", :type => "hidden" }
30
+ %input.checkbox#project_public{ checkbox("project_data[public]", @project.public?) }
31
+
32
+ - Notifier.available.each do |notifier|
33
+ = notifier_form(notifier)
34
+
35
+ %p.submit
36
+ %button.positive{ :type => "submit" }= @project.new_record? ? "Create Project" : "Update Project"
37
+
38
+ - unless @project.new_record?
39
+ %h2 Push URL
40
+ %p
41
+ You can use this Push URL with your GitHub project to enable automated continuous integration.
42
+ %p
43
+ %code#push_url= push_url_for(@project)
44
+
45
+ %form{ :method => "post", :action => project_path(@project) }
46
+ .hidden
47
+ %input{ :name => "_method", :type => "hidden", :value => "delete" }
48
+ %h2 Delete this project
49
+ %p.submit.destroy
50
+ This will delete the project and all the builds in the system
51
+ %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, :id => "enabled_notifiers_#{notifier.downcase}") }
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,21 @@
1
+ xml.instruct!
2
+ xml.feed :xmlns => "http://www.w3.org/2005/Atom" do
3
+ xml.title "Build history for #{@project.name}"
4
+ xml.subtitle @project.uri
5
+ xml.updated @project.builds.first.created_at
6
+ xml.link :href => "#{project_url(@project)}.atom", :rel => "self"
7
+ xml.id "#{project_url(@project)}.atom"
8
+
9
+ @project.builds.each do |build|
10
+ xml.entry do
11
+ xml.id build_url(build)
12
+ xml.link :href => build_url(build), :rel => "alternate", :type => "text/html"
13
+ xml.updated build.created_at
14
+ xml.published build.created_at
15
+
16
+ xml.title "Built #{build.short_commit_identifier} #{build.successful? ? "successfully" : "and failed"}"
17
+ xml.author { xml.name(build.commit_author.name) }
18
+ xml.content("<div>#{partial(:build_info, :build => build)}</div>", :type => "html")
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,28 @@
1
+ #administrative
2
+ %a{ :href => project_path(@project, :edit) } Edit Project
3
+
4
+ - if @project.builds.empty?
5
+ %form.blank_slate{ :action => project_path(@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
+ = partial(:build_info, :build => @build)
14
+
15
+ %form{ :action => project_path(@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_path(build) }
25
+ %strong.build<
26
+ &== Build #{build.short_commit_identifier}
27
+ %span.attribution<
28
+ == by #{build.commit_author.name}, #{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
metadata ADDED
@@ -0,0 +1,243 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: brycethornton-integrity
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.7.1
5
+ platform: ruby
6
+ authors:
7
+ - "Nicol\xC3\xA1s Sanguinetti"
8
+ - Simon Rozet
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2009-01-31 00:00:00 -08:00
14
+ default_executable: integrity
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: sinatra
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.9.0.3
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: haml
27
+ version_requirement:
28
+ version_requirements: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: "0"
33
+ version:
34
+ - !ruby/object:Gem::Dependency
35
+ name: dm-core
36
+ version_requirement:
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 0.9.5
42
+ version:
43
+ - !ruby/object:Gem::Dependency
44
+ name: dm-validations
45
+ version_requirement:
46
+ version_requirements: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 0.9.5
51
+ version:
52
+ - !ruby/object:Gem::Dependency
53
+ name: dm-types
54
+ version_requirement:
55
+ version_requirements: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 0.9.5
60
+ version:
61
+ - !ruby/object:Gem::Dependency
62
+ name: dm-timestamps
63
+ version_requirement:
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 0.9.5
69
+ version:
70
+ - !ruby/object:Gem::Dependency
71
+ name: dm-aggregates
72
+ version_requirement:
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: 0.9.5
78
+ version:
79
+ - !ruby/object:Gem::Dependency
80
+ name: dm-migrations
81
+ version_requirement:
82
+ version_requirements: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 0.9.5
87
+ version:
88
+ - !ruby/object:Gem::Dependency
89
+ name: data_objects
90
+ version_requirement:
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: 0.9.5
96
+ version:
97
+ - !ruby/object:Gem::Dependency
98
+ name: do_sqlite3
99
+ version_requirement:
100
+ version_requirements: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: 0.9.5
105
+ version:
106
+ - !ruby/object:Gem::Dependency
107
+ name: json
108
+ version_requirement:
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: "0"
114
+ version:
115
+ - !ruby/object:Gem::Dependency
116
+ name: foca-sinatra-diddies
117
+ version_requirement:
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 0.0.2
123
+ version:
124
+ - !ruby/object:Gem::Dependency
125
+ name: thor
126
+ version_requirement:
127
+ version_requirements: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: "0"
132
+ version:
133
+ - !ruby/object:Gem::Dependency
134
+ name: uuidtools
135
+ version_requirement:
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: "0"
141
+ version:
142
+ - !ruby/object:Gem::Dependency
143
+ name: bcrypt-ruby
144
+ version_requirement:
145
+ version_requirements: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: "0"
150
+ version:
151
+ description: Your Friendly Continuous Integration server. Easy, fun and painless!
152
+ email: contacto@nicolassanguinetti.info
153
+ executables:
154
+ - integrity
155
+ extensions: []
156
+
157
+ extra_rdoc_files: []
158
+
159
+ files:
160
+ - README.markdown
161
+ - Rakefile
162
+ - VERSION.yml
163
+ - app.rb
164
+ - bin/integrity
165
+ - config/config.sample.ru
166
+ - config/config.sample.yml
167
+ - config/thin.sample.yml
168
+ - integrity.gemspec
169
+ - lib/integrity.rb
170
+ - lib/integrity/build.rb
171
+ - lib/integrity/core_ext/object.rb
172
+ - lib/integrity/core_ext/string.rb
173
+ - lib/integrity/helpers.rb
174
+ - lib/integrity/helpers/authorization.rb
175
+ - lib/integrity/helpers/breadcrumbs.rb
176
+ - lib/integrity/helpers/forms.rb
177
+ - lib/integrity/helpers/pretty_output.rb
178
+ - lib/integrity/helpers/rendering.rb
179
+ - lib/integrity/helpers/resources.rb
180
+ - lib/integrity/helpers/urls.rb
181
+ - lib/integrity/installer.rb
182
+ - lib/integrity/migrations.rb
183
+ - lib/integrity/notifier.rb
184
+ - lib/integrity/notifier/base.rb
185
+ - lib/integrity/project.rb
186
+ - lib/integrity/project_builder.rb
187
+ - lib/integrity/scm.rb
188
+ - lib/integrity/scm/git.rb
189
+ - lib/integrity/scm/git/uri.rb
190
+ - public/buttons.css
191
+ - public/reset.css
192
+ - public/spinner.gif
193
+ - test/helpers.rb
194
+ - test/helpers/acceptance.rb
195
+ - test/helpers/acceptance/git_helper.rb
196
+ - test/helpers/acceptance/textfile_notifier.rb
197
+ - test/helpers/expectations.rb
198
+ - test/helpers/expectations/be_a.rb
199
+ - test/helpers/expectations/change.rb
200
+ - test/helpers/expectations/have.rb
201
+ - test/helpers/expectations/have_tag.rb
202
+ - test/helpers/expectations/predicates.rb
203
+ - test/helpers/fixtures.rb
204
+ - views/_build_info.haml
205
+ - views/build.haml
206
+ - views/error.haml
207
+ - views/home.haml
208
+ - views/integrity.sass
209
+ - views/layout.haml
210
+ - views/new.haml
211
+ - views/not_found.haml
212
+ - views/notifier.haml
213
+ - views/project.builder
214
+ - views/project.haml
215
+ - views/unauthorized.haml
216
+ has_rdoc: false
217
+ homepage: http://integrityapp.com
218
+ post_install_message: Run `integrity help` for information on how to setup Integrity.
219
+ rdoc_options: []
220
+
221
+ require_paths:
222
+ - lib
223
+ required_ruby_version: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - ">="
226
+ - !ruby/object:Gem::Version
227
+ version: "0"
228
+ version:
229
+ required_rubygems_version: !ruby/object:Gem::Requirement
230
+ requirements:
231
+ - - ">="
232
+ - !ruby/object:Gem::Version
233
+ version: "0"
234
+ version:
235
+ requirements: []
236
+
237
+ rubyforge_project: integrity
238
+ rubygems_version: 1.2.0
239
+ signing_key:
240
+ specification_version: 2
241
+ summary: The easy and fun Continuous Integration server
242
+ test_files: []
243
+