alphasights-integrity 0.1.9.8 → 0.1.10
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.
- data/.gitignore +0 -1
- data/AUTHORS +35 -0
- data/CHANGES +21 -3
- data/LICENSE +20 -0
- data/README.md +10 -52
- data/config/config.sample.yml +4 -0
- data/config/heroku/.gems +1 -1
- data/config/heroku/integrity-config.rb +1 -0
- data/integrity.gemspec +6 -11
- data/lib/integrity.rb +4 -4
- data/lib/integrity/app.rb +1 -1
- data/lib/integrity/build.rb +8 -18
- data/lib/integrity/commit.rb +13 -8
- data/lib/integrity/helpers/pretty_output.rb +8 -0
- data/lib/integrity/helpers/urls.rb +3 -3
- data/lib/integrity/installer.rb +20 -11
- data/lib/integrity/migrations.rb +43 -13
- data/lib/integrity/notifier.rb +1 -1
- data/lib/integrity/notifier/base.rb +2 -2
- data/lib/integrity/notifier/test/fixtures.rb +12 -6
- data/lib/integrity/project.rb +34 -38
- data/lib/integrity/project/push.rb +4 -5
- data/test/acceptance/api_test.rb +1 -1
- data/test/acceptance/browse_project_test.rb +12 -6
- data/test/acceptance/build_notifications_test.rb +26 -2
- data/test/acceptance/installer_test.rb +1 -1
- data/test/acceptance/manual_build_project_test.rb +2 -2
- data/test/acceptance/notifier_test_test.rb +37 -0
- data/test/acceptance/stylesheet_test.rb +2 -1
- data/test/helpers.rb +3 -2
- data/test/unit/build_test.rb +11 -46
- data/test/unit/commit_test.rb +37 -28
- data/test/unit/helpers_test.rb +16 -0
- data/test/unit/migrations_test.rb +6 -4
- data/test/unit/project_test.rb +64 -95
- data/views/_commit_info.haml +6 -10
- data/views/home.haml +3 -2
- data/views/integrity.sass +24 -4
- data/views/project.haml +5 -4
- metadata +6 -20
- data/lib/integrity/helpers/gravatar.rb +0 -16
- data/lib/integrity/project_builder.rb +0 -56
- data/lib/integrity/scm.rb +0 -19
- data/lib/integrity/scm/git.rb +0 -84
- data/lib/integrity/scm/git/uri.rb +0 -57
- data/test/unit/project_builder_test.rb +0 -118
- data/test/unit/scm_test.rb +0 -54
data/.gitignore
CHANGED
data/AUTHORS
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
Integrity is maintained by Nicolás Sanguinetti and Simon Rozet.
|
2
|
+
|
3
|
+
Thanks to the following people for their feedbacks, ideas and patches :
|
4
|
+
|
5
|
+
* Bodaniel Jeanes
|
6
|
+
* James Golick
|
7
|
+
* Wilson Bilkovich
|
8
|
+
* Mislav Marohnić
|
9
|
+
* Miles Z. Sterrett
|
10
|
+
* Kyle Hargraves
|
11
|
+
* Josh Nichols
|
12
|
+
* Jeremy Hinegardner
|
13
|
+
* Chris Wanstrath
|
14
|
+
* Will Leinweber
|
15
|
+
* Pier-Hugues Pellerin
|
16
|
+
* Justin Knowlden
|
17
|
+
* Elliott Cable
|
18
|
+
* dbr
|
19
|
+
* Scott Taylor
|
20
|
+
* Jeff Whitmire
|
21
|
+
* Diego Algorta
|
22
|
+
* Eric Mill
|
23
|
+
* Pat Nakajima
|
24
|
+
* Nick Quaranto
|
25
|
+
* Levent Ali
|
26
|
+
* Jeff Schoolcraft
|
27
|
+
* James Adam
|
28
|
+
* Harry Vangberg
|
29
|
+
* Guilherme Chapiewski
|
30
|
+
* David Dollar
|
31
|
+
* Corey Donohoe
|
32
|
+
* Christopher Redinger
|
33
|
+
* Alexander Lang
|
34
|
+
|
35
|
+
NOTE: Please let us know if your name is missing
|
data/CHANGES
CHANGED
@@ -1,8 +1,26 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.10 / 2009-05-14
|
2
2
|
====================
|
3
3
|
|
4
|
-
*
|
5
|
-
|
4
|
+
* Bundle the NULL commit author/message fix as a migration
|
5
|
+
|
6
|
+
* Fix issue with stale notifier. See 693c95e for details
|
7
|
+
|
8
|
+
* Rename the "Build the last commit" button to "Fetch and build"
|
9
|
+
|
10
|
+
* Fix the rebuild button (Eric Mill)
|
11
|
+
|
12
|
+
* Various improvements to the Heroku install (Miles Z. Sterrett)
|
13
|
+
|
14
|
+
* Documentation to the default config.yml for the
|
15
|
+
:build_all_commits option. (Jeff Whitmire)
|
16
|
+
|
17
|
+
* `integrity launch` now saves the database into $HOME/.integrity.sqlite3
|
18
|
+
|
19
|
+
* Changed the Notifier::Test API. Notifiers tests are expected
|
20
|
+
to break. That API is still not defined and might change at
|
21
|
+
any time. See [#130] to discuss this.
|
22
|
+
|
23
|
+
* Send notifications to enabled notifiers only
|
6
24
|
|
7
25
|
0.1.9.3 / 2009-04-06
|
8
26
|
====================
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2008, 2009 Nicolás Sanguinetti <http://nicolassanguinetti.info>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
'Software'), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
17
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
18
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
19
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
20
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -11,9 +11,9 @@ Integrity
|
|
11
11
|
Try it!
|
12
12
|
-------
|
13
13
|
|
14
|
-
$ git clone git://github.com/
|
14
|
+
$ git clone git://github.com/integrity/integrity.git
|
15
15
|
$ rake launch
|
16
|
-
|
16
|
+
$ open http://0.0.0.0:4567/
|
17
17
|
|
18
18
|
Run the test suite
|
19
19
|
------------------
|
@@ -24,59 +24,17 @@ Run the test suite
|
|
24
24
|
`gem build integrity.gemspec && gem install *.gem --development`.
|
25
25
|
3. Run the test suite: `rake test`
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
Why we don't `require "rubygems"`
|
28
|
+
---------------------------------
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
* [Elliott Cable][ec]
|
34
|
-
* [Corey Donohoe][atmos]
|
35
|
-
* [Kyle Hargraves][kyle]
|
36
|
-
* [Pier-Hugues Pellerin][ph]
|
37
|
-
* [Simon Rozet][sr]
|
38
|
-
* [Scott Taylor][scott]
|
39
|
-
|
40
|
-
License
|
41
|
-
-------
|
42
|
-
|
43
|
-
(The MIT License)
|
44
|
-
|
45
|
-
Copyright (c) 2008 [Nicolás Sanguinetti][foca], [entp][]
|
46
|
-
|
47
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
48
|
-
a copy of this software and associated documentation files (the
|
49
|
-
'Software'), to deal in the Software without restriction, including
|
50
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
51
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
52
|
-
permit persons to whom the Software is furnished to do so, subject to
|
53
|
-
the following conditions:
|
54
|
-
|
55
|
-
The above copyright notice and this permission notice shall be
|
56
|
-
included in all copies or substantial portions of the Software.
|
57
|
-
|
58
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
59
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
60
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
61
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
62
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
63
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
64
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
30
|
+
We decided to leave that choice up to the user. For more information, please
|
31
|
+
see [Why "require 'rubygems'" In Your Library/App/Tests Is Wrong][rubygems]
|
32
|
+
by [Ryan Tomayko][rtomayko].
|
65
33
|
|
66
34
|
[website]: http://integrityapp.com
|
67
35
|
[demo]: http://builder.integrityapp.com
|
68
|
-
[repo]: http://github.com/
|
36
|
+
[repo]: http://github.com/integrity/integrity
|
69
37
|
[lighthouse]: http://integrity.lighthouseapp.com/projects/14308-integrity
|
70
38
|
[irc-channel]: irc://irc.freenode.net/integrity
|
71
|
-
|
72
|
-
[
|
73
|
-
[entp]: http://entp.com
|
74
|
-
|
75
|
-
[james]: http://github.com/lazyatom
|
76
|
-
[ec]: http://github.com/elliotcabble
|
77
|
-
[atmos]: http://github.com/atmos
|
78
|
-
[kyle]: http://github.com/pd
|
79
|
-
[ph]: http://github.com/ph
|
80
|
-
[sr]: http://purl.org/net/sr/
|
81
|
-
[scott]: http://github.com/smtlaissezfaire
|
82
|
-
|
39
|
+
[rubygems]: http://gist.github.com/54177
|
40
|
+
[rtomayko]: http://tomayko.com/about
|
data/config/config.sample.yml
CHANGED
@@ -23,6 +23,10 @@
|
|
23
23
|
# Path to the integrity log file
|
24
24
|
:log: /var/log/integrity.log
|
25
25
|
|
26
|
+
# If set to true integrity will do a build for each commit. Otherwise
|
27
|
+
# it will only do a build for each set of commits (i.e. each push)
|
28
|
+
:build_all_commits: true
|
29
|
+
|
26
30
|
# Enable or disable HTTP authentication for the app. BE AWARE that if you
|
27
31
|
# disable this anyone can delete and alter projects, so do it only if your
|
28
32
|
# app is running in a controlled environment (ie, behind your company's
|
data/config/heroku/.gems
CHANGED
@@ -1 +1 @@
|
|
1
|
-
integrity --version 0.1.9.
|
1
|
+
integrity --version 0.1.9.3
|
@@ -3,6 +3,7 @@ gem "integrity"
|
|
3
3
|
require "integrity"
|
4
4
|
|
5
5
|
Integrity.config = {
|
6
|
+
:base_uri => nil, # Edit this! Like :base_uri => 'http://awesome-subdomain-13.heroku.com'
|
6
7
|
:database_uri => ENV["DATABASE_URL"],
|
7
8
|
:export_directory => File.dirname(__FILE__) + "/tmp",
|
8
9
|
:log => File.dirname(__FILE__) + "/log/integrity.log",
|
data/integrity.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "integrity"
|
3
|
-
s.version = "0.1.
|
4
|
-
s.date = "2009-
|
3
|
+
s.version = "0.1.10"
|
4
|
+
s.date = "2009-05-14"
|
5
5
|
|
6
6
|
s.description = "Your Friendly Continuous Integration server. Easy, fun and painless!"
|
7
7
|
s.summary = "The easy and fun Continuous Integration server"
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.has_rdoc = false
|
19
19
|
s.rubygems_version = "1.3.1"
|
20
20
|
|
21
|
-
s.add_dependency "sinatra", ["
|
21
|
+
s.add_dependency "sinatra", ["= 0.9.1.1"]
|
22
22
|
s.add_dependency "sinatra-authorization"
|
23
23
|
s.add_dependency "haml", [">= 2.0.0"]
|
24
24
|
s.add_dependency "data_mapper", ["= 0.9.11"]
|
@@ -29,7 +29,6 @@ Gem::Specification.new do |s|
|
|
29
29
|
|
30
30
|
if s.respond_to?(:add_development_dependency)
|
31
31
|
s.add_development_dependency "rr"
|
32
|
-
s.add_development_dependency "mocha"
|
33
32
|
s.add_development_dependency "webrat"
|
34
33
|
s.add_development_dependency "do_sqlite3"
|
35
34
|
s.add_development_dependency "dm-sweatshop"
|
@@ -42,7 +41,9 @@ Gem::Specification.new do |s|
|
|
42
41
|
|
43
42
|
s.files = %w[
|
44
43
|
.gitignore
|
44
|
+
AUTHORS
|
45
45
|
CHANGES
|
46
|
+
LICENSE
|
46
47
|
README.md
|
47
48
|
Rakefile
|
48
49
|
bin/integrity
|
@@ -67,7 +68,6 @@ lib/integrity/helpers/pretty_output.rb
|
|
67
68
|
lib/integrity/helpers/rendering.rb
|
68
69
|
lib/integrity/helpers/resources.rb
|
69
70
|
lib/integrity/helpers/urls.rb
|
70
|
-
lib/integrity/helpers/gravatar.rb
|
71
71
|
lib/integrity/installer.rb
|
72
72
|
lib/integrity/migrations.rb
|
73
73
|
lib/integrity/notifier.rb
|
@@ -78,10 +78,6 @@ lib/integrity/notifier/test/hpricot_matcher.rb
|
|
78
78
|
lib/integrity/project.rb
|
79
79
|
lib/integrity/project/notifiers.rb
|
80
80
|
lib/integrity/project/push.rb
|
81
|
-
lib/integrity/project_builder.rb
|
82
|
-
lib/integrity/scm.rb
|
83
|
-
lib/integrity/scm/git.rb
|
84
|
-
lib/integrity/scm/git/uri.rb
|
85
81
|
public/buttons.css
|
86
82
|
public/reset.css
|
87
83
|
public/spinner.gif
|
@@ -96,6 +92,7 @@ test/acceptance/error_page_test.rb
|
|
96
92
|
test/acceptance/installer_test.rb
|
97
93
|
test/acceptance/manual_build_project_test.rb
|
98
94
|
test/acceptance/not_found_page_test.rb
|
95
|
+
test/acceptance/notifier_test_test.rb
|
99
96
|
test/acceptance/project_syndication_test.rb
|
100
97
|
test/acceptance/stylesheet_test.rb
|
101
98
|
test/acceptance/unauthorized_page_test.rb
|
@@ -118,9 +115,7 @@ test/unit/integrity_test.rb
|
|
118
115
|
test/unit/migrations_test.rb
|
119
116
|
test/unit/notifier/base_test.rb
|
120
117
|
test/unit/notifier_test.rb
|
121
|
-
test/unit/project_builder_test.rb
|
122
118
|
test/unit/project_test.rb
|
123
|
-
test/unit/scm_test.rb
|
124
119
|
views/_commit_info.haml
|
125
120
|
views/build.haml
|
126
121
|
views/error.haml
|
data/lib/integrity.rb
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
$:.unshift File.expand_path(File.dirname(__FILE__))
|
2
2
|
|
3
|
+
require "bob"
|
4
|
+
require "sinatra/base"
|
3
5
|
require "json"
|
4
6
|
require "haml"
|
7
|
+
require "sass"
|
8
|
+
require "builder"
|
5
9
|
require "dm-core"
|
6
10
|
require "dm-validations"
|
7
11
|
require "dm-types"
|
8
12
|
require "dm-timestamps"
|
9
13
|
require "dm-aggregates"
|
10
|
-
require "sinatra/base"
|
11
14
|
|
12
15
|
require "yaml"
|
13
16
|
require "logger"
|
@@ -22,9 +25,6 @@ require "integrity/project"
|
|
22
25
|
require "integrity/author"
|
23
26
|
require "integrity/commit"
|
24
27
|
require "integrity/build"
|
25
|
-
require "integrity/project_builder"
|
26
|
-
require "integrity/scm"
|
27
|
-
require "integrity/scm/git"
|
28
28
|
require "integrity/notifier"
|
29
29
|
require "integrity/helpers"
|
30
30
|
require "integrity/app"
|
data/lib/integrity/app.rb
CHANGED
data/lib/integrity/build.rb
CHANGED
@@ -2,15 +2,15 @@ module Integrity
|
|
2
2
|
class Build
|
3
3
|
include DataMapper::Resource
|
4
4
|
|
5
|
-
property :id,
|
5
|
+
property :id, Serial
|
6
6
|
property :output, Text, :default => "", :lazy => false
|
7
7
|
property :successful, Boolean, :default => false
|
8
8
|
property :commit_id, Integer, :nullable => false
|
9
|
-
property :created_at, DateTime
|
10
|
-
property :updated_at, DateTime
|
11
9
|
property :started_at, DateTime
|
12
10
|
property :completed_at, DateTime
|
13
11
|
|
12
|
+
timestamps :at
|
13
|
+
|
14
14
|
belongs_to :commit, :class_name => "Integrity::Commit",
|
15
15
|
:child_key => [:commit_id]
|
16
16
|
|
@@ -18,17 +18,14 @@ module Integrity
|
|
18
18
|
all(:started_at => nil)
|
19
19
|
end
|
20
20
|
|
21
|
-
def self.queue(commit)
|
22
|
-
commit.update_attributes(:build => new)
|
23
|
-
|
24
|
-
# Build on foreground (this will move away, I promise)
|
25
|
-
ProjectBuilder.build(commit)
|
26
|
-
end
|
27
|
-
|
28
21
|
def pending?
|
29
22
|
started_at.nil?
|
30
23
|
end
|
31
24
|
|
25
|
+
def building?
|
26
|
+
! started_at.nil? && completed_at.nil?
|
27
|
+
end
|
28
|
+
|
32
29
|
def failed?
|
33
30
|
!successful?
|
34
31
|
end
|
@@ -36,17 +33,10 @@ module Integrity
|
|
36
33
|
def status
|
37
34
|
case
|
38
35
|
when pending? then :pending
|
36
|
+
when building? then :building
|
39
37
|
when successful? then :success
|
40
38
|
when failed? then :failed
|
41
39
|
end
|
42
40
|
end
|
43
|
-
|
44
|
-
def start!(time=Time.now)
|
45
|
-
self.started_at = time
|
46
|
-
end
|
47
|
-
|
48
|
-
def complete!(time=Time.now)
|
49
|
-
self.completed_at = time
|
50
|
-
end
|
51
41
|
end
|
52
42
|
end
|
data/lib/integrity/commit.rb
CHANGED
@@ -2,14 +2,14 @@ module Integrity
|
|
2
2
|
class Commit
|
3
3
|
include DataMapper::Resource
|
4
4
|
|
5
|
-
property :id,
|
5
|
+
property :id, Serial
|
6
6
|
property :identifier, String, :nullable => false
|
7
7
|
property :message, String, :length => 255
|
8
8
|
property :author, Author, :length => 255
|
9
|
-
property :
|
9
|
+
property :uri, URI
|
10
10
|
property :committed_at, DateTime
|
11
|
-
|
12
|
-
|
11
|
+
|
12
|
+
timestamps :at
|
13
13
|
|
14
14
|
has 1, :build, :class_name => "Integrity::Build",
|
15
15
|
:order => [:created_at.desc]
|
@@ -46,23 +46,28 @@ module Integrity
|
|
46
46
|
status == :pending
|
47
47
|
end
|
48
48
|
|
49
|
+
def building?
|
50
|
+
status == :building
|
51
|
+
end
|
52
|
+
|
49
53
|
def human_readable_status
|
50
54
|
case status
|
51
55
|
when :success; "Built #{short_identifier} successfully"
|
52
56
|
when :failed; "Built #{short_identifier} and failed"
|
53
57
|
when :pending; "#{short_identifier} hasn't been built yet"
|
58
|
+
when :building; "#{short_identifier} is being build"
|
54
59
|
end
|
55
60
|
end
|
56
61
|
|
57
|
-
def output
|
58
|
-
build && build.output
|
59
|
-
end
|
60
|
-
|
61
62
|
def committed_at=(time_with_timezone)
|
62
63
|
unless time_with_timezone.respond_to?(:getlocal)
|
63
64
|
time_with_timezone = Time.parse(time_with_timezone)
|
64
65
|
end
|
65
66
|
attribute_set(:committed_at, time_with_timezone.getlocal)
|
66
67
|
end
|
68
|
+
|
69
|
+
def output
|
70
|
+
build && build.output
|
71
|
+
end
|
67
72
|
end
|
68
73
|
end
|
@@ -29,6 +29,14 @@ module Integrity
|
|
29
29
|
strftime_with_ordinal(date_time, "on %b %d%o")
|
30
30
|
end
|
31
31
|
end
|
32
|
+
|
33
|
+
def pretty_time(date_time)
|
34
|
+
date_time.strftime('%H:%M')
|
35
|
+
end
|
36
|
+
|
37
|
+
def pretty_date_time(datetime)
|
38
|
+
"#{pretty_date(datetime)} @ #{pretty_time(datetime)}"
|
39
|
+
end
|
32
40
|
|
33
41
|
def strftime_with_ordinal(date_time, format_string)
|
34
42
|
ordinal = case date_time.day
|
@@ -17,12 +17,12 @@ module Integrity
|
|
17
17
|
project_url(project, path).path
|
18
18
|
end
|
19
19
|
|
20
|
-
def commit_url(commit)
|
21
|
-
project_url(commit.project, "commits", commit.identifier)
|
20
|
+
def commit_url(commit, *path)
|
21
|
+
project_url(commit.project, ["commits", commit.identifier, *path].flatten)
|
22
22
|
end
|
23
23
|
|
24
24
|
def commit_path(commit, *path)
|
25
|
-
commit_url(commit).path
|
25
|
+
commit_url(commit, *path).path
|
26
26
|
end
|
27
27
|
|
28
28
|
def build_path(build, *path)
|