damagecontrol 0.5.0 → 0.5.0.1391
Sign up to get free protection for your applications and to get access to all the features.
- data/README +67 -11
- data/Rakefile +15 -6
- data/app/controllers/admin_controller.rb +0 -3
- data/app/controllers/application.rb +42 -163
- data/app/controllers/build_controller.rb +33 -0
- data/app/controllers/files_controller.rb +1 -1
- data/app/controllers/project_controller.rb +23 -65
- data/app/controllers/rails_ext.rb +247 -0
- data/app/controllers/rscm_ext.rb +52 -0
- data/app/helpers/build_helper.rb +2 -0
- data/app/views/build/email.rhtml +18 -0
- data/app/views/build/status.rhtml +20 -0
- data/app/views/build/tests.rhtml +2 -0
- data/app/views/layouts/{rscm.rhtml → default.rhtml} +10 -4
- data/app/views/project/_changesets_list.rhtml +2 -2
- data/app/views/project/_cvs.rhtml +4 -5
- data/app/views/project/_project.rhtml +9 -9
- data/app/views/project/_select_pane.rhtml +26 -0
- data/app/views/project/_tab_pane.rhtml +23 -0
- data/app/views/project/changeset.rhtml +35 -0
- data/app/views/project/view.rhtml +18 -32
- data/app/views/setup/welcome.rhtml +118 -0
- data/config/database.yml +20 -20
- data/config/environment.rb +66 -60
- data/config/environments/development.rb +3 -2
- data/config/environments/production.rb +3 -2
- data/config/environments/test.rb +3 -2
- data/config/routes.rb +15 -0
- data/lib/damagecontrol/app.rb +11 -40
- data/lib/damagecontrol/build.rb +50 -8
- data/lib/damagecontrol/directories.rb +7 -6
- data/lib/damagecontrol/poller.rb +11 -20
- data/lib/damagecontrol/project.rb +83 -16
- data/lib/damagecontrol/publisher/ambient_orb.rb +16 -0
- data/lib/damagecontrol/publisher/archive.rb +16 -0
- data/lib/damagecontrol/publisher/base.rb +25 -0
- data/lib/damagecontrol/publisher/build_duration.rb +16 -0
- data/lib/damagecontrol/publisher/email.rb +59 -0
- data/lib/damagecontrol/publisher/execute.rb +49 -0
- data/lib/damagecontrol/publisher/ftp.rb +16 -0
- data/lib/damagecontrol/publisher/growl.rb +44 -0
- data/lib/damagecontrol/publisher/irc.rb +31 -0
- data/lib/damagecontrol/publisher/jabber.rb +68 -0
- data/lib/damagecontrol/publisher/scp.rb +16 -0
- data/lib/damagecontrol/publisher/x10cm11a.rb +17 -0
- data/lib/damagecontrol/publisher/x10cm17a.rb +17 -0
- data/lib/damagecontrol/publisher/yahoo.rb +16 -0
- data/lib/damagecontrol/standard_persister.rb +2 -2
- data/lib/damagecontrol/tracker.rb +48 -6
- data/lib/damagecontrol/visitor/rss_writer.rb +1 -1
- data/lib/damagecontrol/visitor/yaml_persister.rb +10 -1
- data/public/404.html +5 -5
- data/public/500.html +5 -5
- data/public/dispatch.cgi +2 -2
- data/public/dispatch.fcgi +1 -1
- data/public/dispatch.rb +2 -2
- data/public/images/growlicon.png +0 -0
- data/public/images/megaphone.png +0 -0
- data/public/images/monotone-logo.png +0 -0
- data/public/images/publisher/ambient_orb.png +0 -0
- data/public/images/publisher/build_duration.png +0 -0
- data/public/images/publisher/email.png +0 -0
- data/public/images/publisher/execute.png +0 -0
- data/public/images/publisher/growl.png +0 -0
- data/public/images/publisher/irc.png +0 -0
- data/public/images/publisher/jabber.png +0 -0
- data/public/images/publisher/x10cm11a.png +0 -0
- data/public/images/publisher/x10cm17a.png +0 -0
- data/public/images/publisher/yahoo.png +0 -0
- data/public/index.html +70 -1
- data/public/javascripts/dateFormat.js +283 -0
- data/public/javascripts/jscalendar/ChangeLog +500 -0
- data/public/javascripts/jscalendar/README +33 -0
- data/public/javascripts/jscalendar/bugtest-hidden-selects.html +108 -0
- data/public/javascripts/jscalendar/calendar-blue.css +231 -0
- data/public/javascripts/jscalendar/calendar-blue2.css +235 -0
- data/public/javascripts/jscalendar/calendar-brown.css +224 -0
- data/public/javascripts/jscalendar/calendar-green.css +228 -0
- data/public/javascripts/jscalendar/calendar-setup.js +181 -0
- data/public/javascripts/jscalendar/calendar-setup_stripped.js +21 -0
- data/public/javascripts/jscalendar/calendar-system.css +250 -0
- data/public/javascripts/jscalendar/calendar-tas.css +238 -0
- data/public/javascripts/jscalendar/calendar-win2k-1.css +270 -0
- data/public/javascripts/jscalendar/calendar-win2k-2.css +270 -0
- data/public/javascripts/jscalendar/calendar-win2k-cold-1.css +264 -0
- data/public/javascripts/jscalendar/calendar-win2k-cold-2.css +270 -0
- data/public/javascripts/jscalendar/calendar.js +1715 -0
- data/public/javascripts/jscalendar/calendar.php +119 -0
- data/public/javascripts/jscalendar/calendar_stripped.js +12 -0
- data/public/javascripts/jscalendar/doc/html/reference-Z-S.css +0 -0
- data/public/javascripts/jscalendar/doc/html/reference.css +34 -0
- data/public/javascripts/jscalendar/doc/html/reference.html +1316 -0
- data/public/javascripts/jscalendar/doc/reference.pdf +0 -0
- data/public/javascripts/jscalendar/img.gif +0 -0
- data/public/javascripts/jscalendar/index.html +333 -0
- data/public/javascripts/jscalendar/lang/calendar-af.js +39 -0
- data/public/javascripts/jscalendar/lang/calendar-br.js +45 -0
- data/public/javascripts/jscalendar/lang/calendar-ca.js +45 -0
- data/public/javascripts/jscalendar/lang/calendar-cs-win.js +34 -0
- data/public/javascripts/jscalendar/lang/calendar-da.js +63 -0
- data/public/javascripts/jscalendar/lang/calendar-de.js +100 -0
- data/public/javascripts/jscalendar/lang/calendar-du.js +45 -0
- data/public/javascripts/jscalendar/lang/calendar-el.js +89 -0
- data/public/javascripts/jscalendar/lang/calendar-en.js +123 -0
- data/public/javascripts/jscalendar/lang/calendar-es.js +114 -0
- data/public/javascripts/jscalendar/lang/calendar-fi.js +98 -0
- data/public/javascripts/jscalendar/lang/calendar-fr.js +86 -0
- data/public/javascripts/jscalendar/lang/calendar-hr-utf8.js +49 -0
- data/public/javascripts/jscalendar/lang/calendar-hr.js +0 -0
- data/public/javascripts/jscalendar/lang/calendar-hu.js +45 -0
- data/public/javascripts/jscalendar/lang/calendar-it.js +79 -0
- data/public/javascripts/jscalendar/lang/calendar-jp.js +45 -0
- data/public/javascripts/jscalendar/lang/calendar-ko-utf8.js +120 -0
- data/public/javascripts/jscalendar/lang/calendar-ko.js +120 -0
- data/public/javascripts/jscalendar/lang/calendar-lt-utf8.js +114 -0
- data/public/javascripts/jscalendar/lang/calendar-lt.js +114 -0
- data/public/javascripts/jscalendar/lang/calendar-nl.js +45 -0
- data/public/javascripts/jscalendar/lang/calendar-no.js +45 -0
- data/public/javascripts/jscalendar/lang/calendar-pl-utf8.js +93 -0
- data/public/javascripts/jscalendar/lang/calendar-pl.js +56 -0
- data/public/javascripts/jscalendar/lang/calendar-pt.js +45 -0
- data/public/javascripts/jscalendar/lang/calendar-ro.js +66 -0
- data/public/javascripts/jscalendar/lang/calendar-ru.js +45 -0
- data/public/javascripts/jscalendar/lang/calendar-si.js +94 -0
- data/public/javascripts/jscalendar/lang/calendar-sk.js +99 -0
- data/public/javascripts/jscalendar/lang/calendar-sp.js +63 -0
- data/public/javascripts/jscalendar/lang/calendar-sv.js +93 -0
- data/public/javascripts/jscalendar/lang/calendar-tr.js +58 -0
- data/public/javascripts/jscalendar/lang/calendar-zh.js +45 -0
- data/public/javascripts/jscalendar/menuarrow.gif +0 -0
- data/public/javascripts/jscalendar/menuarrow2.gif +0 -0
- data/public/javascripts/jscalendar/release-notes.html +334 -0
- data/public/javascripts/jscalendar/simple-1.html +244 -0
- data/public/javascripts/jscalendar/simple-2.html +108 -0
- data/public/javascripts/jscalendar/simple-3.html +130 -0
- data/public/javascripts/jscalendar/test-position.html +40 -0
- data/public/javascripts/jscalendar/test.php +116 -0
- data/public/javascripts/toggle_div.js +18 -0
- data/public/stylesheets/niceones.txt +1 -0
- data/public/stylesheets/style.css +8 -1
- data/script/breakpointer +4 -5
- data/script/console +19 -27
- data/script/console_sandbox.rb +7 -0
- data/script/destroy +5 -0
- data/script/generate +3 -68
- data/script/server +6 -16
- data/test/damagecontrol/build_test.rb +8 -8
- data/test/damagecontrol/poller_test.rb +10 -18
- data/test/damagecontrol/project_test.rb +49 -13
- data/test/damagecontrol/publisher/base_test.rb +26 -0
- data/test/damagecontrol/publisher/build/email.rhtml +0 -0
- data/test/damagecontrol/publisher/email_test.rb +26 -0
- data/test/damagecontrol/publisher/fixture.rb +34 -0
- data/test/damagecontrol/publisher/growl_test.rb +15 -0
- data/test/damagecontrol/publisher/jabber_test.rb +15 -0
- data/test/damagecontrol/scm_web_test.rb +1 -1
- data/test/damagecontrol/visitor/changesets.rss +1 -1
- data/test/damagecontrol/visitor/diff_persister_test.rb +4 -4
- data/test/functional/build_controller_test.rb +17 -0
- data/test/test_helper.rb +13 -13
- metadata +185 -24
- data/app/views/project/_bugzilla.rhtml +0 -13
- data/app/views/project/_jira.rhtml +0 -19
- data/app/views/project/_mooky.rhtml +0 -23
- data/app/views/project/_rubyforge.rhtml +0 -19
- data/app/views/project/_scarab.rhtml +0 -19
- data/app/views/project/_scms.rhtml +0 -15
- data/app/views/project/_sourceforge.rhtml +0 -19
- data/app/views/project/_starteam.rhtml +0 -43
- data/app/views/project/_svn.rhtml +0 -22
- data/app/views/project/_trac.rhtml +0 -13
- data/app/views/project/_trackers.rhtml +0 -18
- data/app/views/project/changesets.rhtml +0 -31
@@ -11,17 +11,16 @@ module DamageControl
|
|
11
11
|
def setup
|
12
12
|
MockIt::setup
|
13
13
|
@p = Project.new
|
14
|
-
@p.description = "bla bla"
|
15
14
|
@p.name = "blabla"
|
16
15
|
end
|
17
16
|
|
18
|
-
def
|
19
|
-
ENV["DAMAGECONTROL_HOME"] = RSCM.new_temp_dir("
|
17
|
+
def test_poll_should_get_changesets_from_start_time_if_last_change_time_unknown
|
18
|
+
ENV["DAMAGECONTROL_HOME"] = RSCM.new_temp_dir("start_time")
|
20
19
|
@p.scm = new_mock
|
21
20
|
changesets = new_mock
|
22
21
|
changesets.__expect(:empty?) {true}
|
23
22
|
@p.scm.__expect(:changesets) do |checkout_dir, from|
|
24
|
-
assert_equal(
|
23
|
+
assert_equal(@p.start_time, from)
|
25
24
|
changesets
|
26
25
|
end
|
27
26
|
@p.poll do |cs|
|
@@ -36,16 +35,16 @@ module DamageControl
|
|
36
35
|
@p.scm = new_mock
|
37
36
|
@p.scm.__setup(:name) {"mooky"}
|
38
37
|
@p.scm.__expect(:changesets) do |checkout_dir, from|
|
39
|
-
assert_equal(
|
38
|
+
assert_equal(@p.start_time, from)
|
40
39
|
"foo"
|
41
40
|
end
|
42
41
|
@p.scm.__expect(:transactional?) {false}
|
43
42
|
@p.scm.__expect(:changesets) do |checkout_dir, from|
|
44
|
-
assert_equal(
|
43
|
+
assert_equal(@p.start_time, from)
|
45
44
|
"bar"
|
46
45
|
end
|
47
46
|
@p.scm.__expect(:changesets) do |checkout_dir, from|
|
48
|
-
assert_equal(
|
47
|
+
assert_equal(@p.start_time, from)
|
49
48
|
"bar"
|
50
49
|
end
|
51
50
|
@p.poll do |cs|
|
@@ -104,13 +103,13 @@ module DamageControl
|
|
104
103
|
end
|
105
104
|
|
106
105
|
before = Time.new
|
107
|
-
p.
|
106
|
+
p.execute_build("boo", "Test") do |build|
|
108
107
|
now = Time.new
|
109
108
|
assert(before <= build.time)
|
110
109
|
assert(build.time <= now)
|
111
110
|
build.execute("some command")
|
112
111
|
|
113
|
-
assert_equal("some command", File.open("#{home}/mooky/changesets/boo/builds/#{build.time.to_s}/command").read)
|
112
|
+
assert_equal("some command", File.open("#{home}/projects/mooky/changesets/boo/builds/#{build.time.to_s}/command").read)
|
114
113
|
end
|
115
114
|
|
116
115
|
end
|
@@ -123,9 +122,9 @@ module DamageControl
|
|
123
122
|
changeset_identifier = Time.new.utc
|
124
123
|
build_1_time = changeset_identifier + 10
|
125
124
|
build_2_time = changeset_identifier + 20
|
126
|
-
FileUtils.mkdir_p("#{home}/mooky/changesets/#{changeset_identifier.ymdHMS}/builds/#{build_1_time.ymdHMS}")
|
127
|
-
FileUtils.touch("#{home}/mooky/changesets/#{changeset_identifier.ymdHMS}/builds/#{build_1_time.ymdHMS}/command")
|
128
|
-
FileUtils.mkdir_p("#{home}/mooky/changesets/#{changeset_identifier.ymdHMS}/builds/#{build_2_time.ymdHMS}")
|
125
|
+
FileUtils.mkdir_p("#{home}/projects/mooky/changesets/#{changeset_identifier.ymdHMS}/builds/#{build_1_time.ymdHMS}")
|
126
|
+
FileUtils.touch("#{home}/projects/mooky/changesets/#{changeset_identifier.ymdHMS}/builds/#{build_1_time.ymdHMS}/command")
|
127
|
+
FileUtils.mkdir_p("#{home}/projects/mooky/changesets/#{changeset_identifier.ymdHMS}/builds/#{build_2_time.ymdHMS}")
|
129
128
|
|
130
129
|
builds = p.builds(changeset_identifier)
|
131
130
|
assert_equal(2, builds.length)
|
@@ -134,11 +133,48 @@ module DamageControl
|
|
134
133
|
assert_raises(BuildException, "shouldn't be able to execute persisted build") do
|
135
134
|
builds[0].execute("this should fail because command file exists")
|
136
135
|
end
|
137
|
-
builds[1].execute("this should pass since command doesn't exist")
|
136
|
+
builds[1].execute("echo \"this should pass since command doesn't exist\"")
|
138
137
|
assert_raises(BuildException, "shouldn't be able to execute persisted build") do
|
139
138
|
builds[1].execute("this should fail because command file exists")
|
140
139
|
end
|
141
140
|
end
|
142
141
|
|
142
|
+
def test_should_tell_each_publisher_to_publish_build
|
143
|
+
p = Project.new("mooky")
|
144
|
+
p.publishers = []
|
145
|
+
|
146
|
+
build = new_mock
|
147
|
+
|
148
|
+
enabled_publisher = new_mock
|
149
|
+
enabled_publisher.__setup(:name) {"I am enabled"}
|
150
|
+
enabled_publisher.__expect(:enabled) {true}
|
151
|
+
enabled_publisher.__expect(:publish) do |b|
|
152
|
+
assert_equal(build, b)
|
153
|
+
end
|
154
|
+
p.publishers << enabled_publisher
|
155
|
+
|
156
|
+
disabled_publisher = new_mock
|
157
|
+
disabled_publisher.__setup(:name) {"I am disabled"}
|
158
|
+
disabled_publisher.__expect(:enabled) {false}
|
159
|
+
p.publishers << disabled_publisher
|
160
|
+
|
161
|
+
p.publish(build)
|
162
|
+
end
|
163
|
+
|
164
|
+
def test_should_convert_start_time_string_to_time
|
165
|
+
p = Project.new
|
166
|
+
p.start_time = "19710228234533"
|
167
|
+
assert_equal(Time.utc(1971,2,28,23,45,33), p.start_time)
|
168
|
+
end
|
169
|
+
|
170
|
+
def test_should_support_template_cloning
|
171
|
+
# Create a template object
|
172
|
+
template_project = Project.new
|
173
|
+
template_project.home_page = "http://\#{unix_name}.codehaus.org"
|
174
|
+
|
175
|
+
# Create a duplicate from the template object
|
176
|
+
dupe = template_project.dupe("unix_name" => "mooky")
|
177
|
+
assert_equal("http://mooky.codehaus.org", dupe.home_page);
|
178
|
+
end
|
143
179
|
end
|
144
180
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'damagecontrol/publisher/base'
|
3
|
+
|
4
|
+
module DamageControl
|
5
|
+
module Publisher
|
6
|
+
class BaseTest < Test::Unit::TestCase
|
7
|
+
def test_should_load_all_scm_classes
|
8
|
+
expected = [
|
9
|
+
#AmbientOrb,
|
10
|
+
#BuildDuration,
|
11
|
+
Email,
|
12
|
+
#Execute,
|
13
|
+
Growl,
|
14
|
+
#Irc,
|
15
|
+
Jabber,
|
16
|
+
#X10Cm11A,
|
17
|
+
#X10Cm17A,
|
18
|
+
#Yahoo
|
19
|
+
]
|
20
|
+
assert_equal(
|
21
|
+
expected.collect{|c| c.name},
|
22
|
+
Base.classes.collect{|c| c.name}.sort)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
File without changes
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'damagecontrol/publisher/base'
|
3
|
+
require 'damagecontrol/publisher/fixture'
|
4
|
+
|
5
|
+
module DamageControl
|
6
|
+
module Publisher
|
7
|
+
class EmailTest < Test::Unit::TestCase
|
8
|
+
include Fixture
|
9
|
+
|
10
|
+
def test_should_send_email_on_publish
|
11
|
+
BuildMailer.template_root = File.expand_path(File.dirname(__FILE__) + "/../../../app/views")
|
12
|
+
publisher = Email.new
|
13
|
+
tmail = BuildMailer.create_email(mock_build(true), publisher)
|
14
|
+
body = tmail.body_port.ropen.read
|
15
|
+
assert(body.index("Successful build (by aslak)"))
|
16
|
+
assert(body.index("path/seven"))
|
17
|
+
to = ENV["DC_EMAIL_TEST"]
|
18
|
+
if(to)
|
19
|
+
publisher.to = to
|
20
|
+
puts "Sending mail to #{to} (for real)"
|
21
|
+
BuildMailer.deliver_email(mock_build(true), publisher)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rscm/mockit'
|
2
|
+
require 'rscm/changes_fixture'
|
3
|
+
|
4
|
+
module DamageControl
|
5
|
+
module Publisher
|
6
|
+
module Fixture
|
7
|
+
include MockIt
|
8
|
+
include RSCM::ChangesFixture
|
9
|
+
|
10
|
+
# Creates a mock build that can be used in other publisher tests.
|
11
|
+
def mock_build(successful)
|
12
|
+
project = new_mock
|
13
|
+
project.__setup(:name) {"TestProject"}
|
14
|
+
|
15
|
+
setup_changes
|
16
|
+
changesets = RSCM::ChangeSets.new
|
17
|
+
changesets.add(@change1)
|
18
|
+
changesets.add(@change2)
|
19
|
+
changesets.add(@change3)
|
20
|
+
changesets.add(@change4)
|
21
|
+
changesets.add(@change5)
|
22
|
+
changesets.add(@change6)
|
23
|
+
changesets.add(@change7)
|
24
|
+
|
25
|
+
build = new_mock
|
26
|
+
build.__setup(:project) {project}
|
27
|
+
build.__setup(:successful?) {successful}
|
28
|
+
build.__setup(:changeset) {changesets[3]}
|
29
|
+
build.__setup(:status_message) {successful ? "Successful" : "Failed"}
|
30
|
+
build
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'damagecontrol/publisher/base'
|
3
|
+
require 'damagecontrol/publisher/fixture'
|
4
|
+
|
5
|
+
module DamageControl
|
6
|
+
module Publisher
|
7
|
+
class GrowlTest < Test::Unit::TestCase
|
8
|
+
include Fixture
|
9
|
+
|
10
|
+
def test_should_send_message_on_publish
|
11
|
+
Growl.new.publish(mock_build(false))
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'damagecontrol/publisher/base'
|
3
|
+
require 'damagecontrol/publisher/fixture'
|
4
|
+
|
5
|
+
module DamageControl
|
6
|
+
module Publisher
|
7
|
+
class JabberTest < Test::Unit::TestCase
|
8
|
+
include Fixture
|
9
|
+
|
10
|
+
def test_should_send_message_on_publish
|
11
|
+
Jabber.new.publish(mock_build(false))
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -9,7 +9,7 @@ module DamageControl
|
|
9
9
|
class SCMWebTest < Test::Unit::TestCase
|
10
10
|
|
11
11
|
def setup
|
12
|
-
@change = RSCM::Change.new("path/one", "aslak", "Fixed CATCH-22", "2.4", Time.utc(2004,7,5,12,0,2))
|
12
|
+
@change = RSCM::Change.new("path/one", RSCM::Change::MODIFIED, "aslak", "Fixed CATCH-22", "2.4", Time.utc(2004,7,5,12,0,2))
|
13
13
|
end
|
14
14
|
|
15
15
|
def test_view_cvs
|
@@ -34,13 +34,13 @@ module DamageControl
|
|
34
34
|
diff2 = "This\ris\na\r\ndiff for 2"
|
35
35
|
diff3 = "This\ris\na\r\ndiff for 3"
|
36
36
|
|
37
|
-
scm = MockSCM.new("#{basedir}/mooky/checkout", [diff1, diff2, diff3])
|
37
|
+
scm = MockSCM.new("#{basedir}/projects/mooky/checkout", [diff1, diff2, diff3])
|
38
38
|
dp = DiffPersister.new(scm, "mooky")
|
39
39
|
|
40
40
|
changesets.accept(dp)
|
41
|
-
assert_equal(diff1, File.open("#{basedir}/mooky/changesets/20040705120004/diffs/path/one.diff").read)
|
42
|
-
assert_equal(diff2, File.open("#{basedir}/mooky/changesets/20040705120004/diffs/path/two.diff").read)
|
43
|
-
assert_equal(diff3, File.open("#{basedir}/mooky/changesets/20040705120006/diffs/path/three.diff").read)
|
41
|
+
assert_equal(diff1, File.open("#{basedir}/projects/mooky/changesets/20040705120004/diffs/path/one.diff").read)
|
42
|
+
assert_equal(diff2, File.open("#{basedir}/projects/mooky/changesets/20040705120004/diffs/path/two.diff").read)
|
43
|
+
assert_equal(diff3, File.open("#{basedir}/projects/mooky/changesets/20040705120006/diffs/path/three.diff").read)
|
44
44
|
|
45
45
|
end
|
46
46
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require 'build_controller'
|
3
|
+
|
4
|
+
# Re-raise errors caught by the controller.
|
5
|
+
class BuildController; def rescue_action(e) raise e end; end
|
6
|
+
|
7
|
+
class BuildControllerTest < Test::Unit::TestCase
|
8
|
+
def setup
|
9
|
+
@controller = BuildController.new
|
10
|
+
@request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new
|
11
|
+
end
|
12
|
+
|
13
|
+
# Replace this with your real tests.
|
14
|
+
def test_truth
|
15
|
+
assert true
|
16
|
+
end
|
17
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
ENV["RAILS_ENV"]
|
2
|
-
require File.dirname(__FILE__) + "/../config/environment"
|
3
|
-
require 'application'
|
4
|
-
|
5
|
-
require 'test/unit'
|
6
|
-
require 'active_record/fixtures'
|
7
|
-
require 'action_controller/test_process'
|
8
|
-
require 'breakpoint'
|
9
|
-
|
10
|
-
def create_fixtures(*table_names)
|
11
|
-
Fixtures.create_fixtures(File.dirname(__FILE__) + "/fixtures", table_names)
|
12
|
-
end
|
13
|
-
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
require File.dirname(__FILE__) + "/../config/environment"
|
3
|
+
require 'application'
|
4
|
+
|
5
|
+
require 'test/unit'
|
6
|
+
require 'active_record/fixtures'
|
7
|
+
require 'action_controller/test_process'
|
8
|
+
require 'breakpoint'
|
9
|
+
|
10
|
+
def create_fixtures(*table_names)
|
11
|
+
Fixtures.create_fixtures(File.dirname(__FILE__) + "/fixtures", table_names)
|
12
|
+
end
|
13
|
+
|
14
14
|
Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/"
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.6
|
3
3
|
specification_version: 1
|
4
4
|
name: damagecontrol
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.0
|
7
|
-
date: 2005-
|
6
|
+
version: 0.5.0.1391
|
7
|
+
date: 2005-03-09
|
8
8
|
summary: DamageControl
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -32,49 +32,52 @@ files:
|
|
32
32
|
- README.license
|
33
33
|
- bin/damagecontrol
|
34
34
|
- bin/damagecontrol-webrick
|
35
|
+
- app/apis
|
35
36
|
- app/controllers
|
36
37
|
- app/helpers
|
37
38
|
- app/models
|
38
39
|
- app/views
|
39
40
|
- app/controllers/admin_controller.rb
|
40
41
|
- app/controllers/application.rb
|
42
|
+
- app/controllers/build_controller.rb
|
41
43
|
- app/controllers/files_controller.rb
|
42
44
|
- app/controllers/project_controller.rb
|
45
|
+
- app/controllers/rails_ext.rb
|
46
|
+
- app/controllers/rscm_ext.rb
|
43
47
|
- app/controllers/scm_controller.rb
|
44
48
|
- app/helpers/admin_helper.rb
|
45
49
|
- app/helpers/application_helper.rb
|
50
|
+
- app/helpers/build_helper.rb
|
46
51
|
- app/helpers/project_helper.rb
|
52
|
+
- app/views/build
|
47
53
|
- app/views/dhtml_sites.txt
|
48
54
|
- app/views/files
|
49
55
|
- app/views/layouts
|
50
56
|
- app/views/project
|
51
57
|
- app/views/scm
|
58
|
+
- app/views/setup
|
59
|
+
- app/views/build/email.rhtml
|
60
|
+
- app/views/build/status.rhtml
|
61
|
+
- app/views/build/tests.rhtml
|
52
62
|
- app/views/files/list.rhtml
|
53
|
-
- app/views/layouts/
|
54
|
-
- app/views/project/_bugzilla.rhtml
|
63
|
+
- app/views/layouts/default.rhtml
|
55
64
|
- app/views/project/_changesets_list.rhtml
|
56
65
|
- app/views/project/_cvs.rhtml
|
57
|
-
- app/views/project/_jira.rhtml
|
58
|
-
- app/views/project/_mooky.rhtml
|
59
66
|
- app/views/project/_null.rhtml
|
60
67
|
- app/views/project/_project.rhtml
|
61
|
-
- app/views/project/
|
62
|
-
- app/views/project/
|
63
|
-
- app/views/project/
|
64
|
-
- app/views/project/_sourceforge.rhtml
|
65
|
-
- app/views/project/_starteam.rhtml
|
66
|
-
- app/views/project/_svn.rhtml
|
67
|
-
- app/views/project/_trac.rhtml
|
68
|
-
- app/views/project/_trackers.rhtml
|
69
|
-
- app/views/project/changesets.rhtml
|
68
|
+
- app/views/project/_select_pane.rhtml
|
69
|
+
- app/views/project/_tab_pane.rhtml
|
70
|
+
- app/views/project/changeset.rhtml
|
70
71
|
- app/views/project/index.rhtml
|
71
72
|
- app/views/project/view.rhtml
|
72
73
|
- app/views/scm/checkout_status.rhtml
|
73
74
|
- app/views/scm/diff.rhtml
|
74
75
|
- app/views/scm/scroll.html
|
76
|
+
- app/views/setup/welcome.rhtml
|
75
77
|
- config/database.yml
|
76
78
|
- config/environment.rb
|
77
79
|
- config/environments
|
80
|
+
- config/routes.rb
|
78
81
|
- config/environments/development.rb
|
79
82
|
- config/environments/production.rb
|
80
83
|
- config/environments/test.rb
|
@@ -87,10 +90,25 @@ files:
|
|
87
90
|
- lib/damagecontrol/poller.rb
|
88
91
|
- lib/damagecontrol/project.rb
|
89
92
|
- lib/damagecontrol/project_dependencies.rb
|
93
|
+
- lib/damagecontrol/publisher
|
90
94
|
- lib/damagecontrol/scm_web.rb
|
91
95
|
- lib/damagecontrol/standard_persister.rb
|
92
96
|
- lib/damagecontrol/tracker.rb
|
93
97
|
- lib/damagecontrol/visitor
|
98
|
+
- lib/damagecontrol/publisher/ambient_orb.rb
|
99
|
+
- lib/damagecontrol/publisher/archive.rb
|
100
|
+
- lib/damagecontrol/publisher/base.rb
|
101
|
+
- lib/damagecontrol/publisher/build_duration.rb
|
102
|
+
- lib/damagecontrol/publisher/email.rb
|
103
|
+
- lib/damagecontrol/publisher/execute.rb
|
104
|
+
- lib/damagecontrol/publisher/ftp.rb
|
105
|
+
- lib/damagecontrol/publisher/growl.rb
|
106
|
+
- lib/damagecontrol/publisher/irc.rb
|
107
|
+
- lib/damagecontrol/publisher/jabber.rb
|
108
|
+
- lib/damagecontrol/publisher/scp.rb
|
109
|
+
- lib/damagecontrol/publisher/x10cm11a.rb
|
110
|
+
- lib/damagecontrol/publisher/x10cm17a.rb
|
111
|
+
- lib/damagecontrol/publisher/yahoo.rb
|
94
112
|
- lib/damagecontrol/visitor/build_executor.rb
|
95
113
|
- lib/damagecontrol/visitor/diff_persister.rb
|
96
114
|
- lib/damagecontrol/visitor/rss_writer.rb
|
@@ -117,7 +135,11 @@ files:
|
|
117
135
|
- public/images/green-32.gif
|
118
136
|
- public/images/grey-16.gif
|
119
137
|
- public/images/grey-32.gif
|
138
|
+
- public/images/growlicon.png
|
120
139
|
- public/images/jira.gif
|
140
|
+
- public/images/megaphone.png
|
141
|
+
- public/images/monotone-logo.png
|
142
|
+
- public/images/publisher
|
121
143
|
- public/images/README.license
|
122
144
|
- public/images/red-16.gif
|
123
145
|
- public/images/red-32.gif
|
@@ -166,22 +188,110 @@ files:
|
|
166
188
|
- public/images/24x24/scroll_information.png
|
167
189
|
- public/images/24x24/stop.png
|
168
190
|
- public/images/24x24/wrench.png
|
191
|
+
- public/images/publisher/ambient_orb.png
|
192
|
+
- public/images/publisher/build_duration.png
|
193
|
+
- public/images/publisher/email.png
|
194
|
+
- public/images/publisher/execute.png
|
195
|
+
- public/images/publisher/growl.png
|
196
|
+
- public/images/publisher/irc.png
|
197
|
+
- public/images/publisher/jabber.png
|
198
|
+
- public/images/publisher/x10cm11a.png
|
199
|
+
- public/images/publisher/x10cm17a.png
|
200
|
+
- public/images/publisher/yahoo.png
|
201
|
+
- public/javascripts/dateFormat.js
|
169
202
|
- public/javascripts/dw_event.js
|
170
203
|
- public/javascripts/dw_tooltip.js
|
171
204
|
- public/javascripts/dw_viewport.js
|
205
|
+
- public/javascripts/jscalendar
|
172
206
|
- public/javascripts/pngfix.js
|
173
207
|
- public/javascripts/toggle_diff.js
|
208
|
+
- public/javascripts/toggle_div.js
|
209
|
+
- public/javascripts/jscalendar/bugtest-hidden-selects.html
|
210
|
+
- public/javascripts/jscalendar/calendar-blue.css
|
211
|
+
- public/javascripts/jscalendar/calendar-blue2.css
|
212
|
+
- public/javascripts/jscalendar/calendar-brown.css
|
213
|
+
- public/javascripts/jscalendar/calendar-green.css
|
214
|
+
- public/javascripts/jscalendar/calendar-setup.js
|
215
|
+
- public/javascripts/jscalendar/calendar-setup_stripped.js
|
216
|
+
- public/javascripts/jscalendar/calendar-system.css
|
217
|
+
- public/javascripts/jscalendar/calendar-tas.css
|
218
|
+
- public/javascripts/jscalendar/calendar-win2k-1.css
|
219
|
+
- public/javascripts/jscalendar/calendar-win2k-2.css
|
220
|
+
- public/javascripts/jscalendar/calendar-win2k-cold-1.css
|
221
|
+
- public/javascripts/jscalendar/calendar-win2k-cold-2.css
|
222
|
+
- public/javascripts/jscalendar/calendar.js
|
223
|
+
- public/javascripts/jscalendar/calendar.php
|
224
|
+
- public/javascripts/jscalendar/calendar_stripped.js
|
225
|
+
- public/javascripts/jscalendar/ChangeLog
|
226
|
+
- public/javascripts/jscalendar/doc
|
227
|
+
- public/javascripts/jscalendar/img.gif
|
228
|
+
- public/javascripts/jscalendar/index.html
|
229
|
+
- public/javascripts/jscalendar/lang
|
230
|
+
- public/javascripts/jscalendar/menuarrow.gif
|
231
|
+
- public/javascripts/jscalendar/menuarrow2.gif
|
232
|
+
- public/javascripts/jscalendar/README
|
233
|
+
- public/javascripts/jscalendar/release-notes.html
|
234
|
+
- public/javascripts/jscalendar/simple-1.html
|
235
|
+
- public/javascripts/jscalendar/simple-2.html
|
236
|
+
- public/javascripts/jscalendar/simple-3.html
|
237
|
+
- public/javascripts/jscalendar/test-position.html
|
238
|
+
- public/javascripts/jscalendar/test.php
|
239
|
+
- public/javascripts/jscalendar/doc/html
|
240
|
+
- public/javascripts/jscalendar/doc/reference.pdf
|
241
|
+
- public/javascripts/jscalendar/doc/html/reference-Z-S.css
|
242
|
+
- public/javascripts/jscalendar/doc/html/reference.css
|
243
|
+
- public/javascripts/jscalendar/doc/html/reference.html
|
244
|
+
- public/javascripts/jscalendar/lang/calendar-af.js
|
245
|
+
- public/javascripts/jscalendar/lang/calendar-br.js
|
246
|
+
- public/javascripts/jscalendar/lang/calendar-ca.js
|
247
|
+
- public/javascripts/jscalendar/lang/calendar-cs-win.js
|
248
|
+
- public/javascripts/jscalendar/lang/calendar-da.js
|
249
|
+
- public/javascripts/jscalendar/lang/calendar-de.js
|
250
|
+
- public/javascripts/jscalendar/lang/calendar-du.js
|
251
|
+
- public/javascripts/jscalendar/lang/calendar-el.js
|
252
|
+
- public/javascripts/jscalendar/lang/calendar-en.js
|
253
|
+
- public/javascripts/jscalendar/lang/calendar-es.js
|
254
|
+
- public/javascripts/jscalendar/lang/calendar-fi.js
|
255
|
+
- public/javascripts/jscalendar/lang/calendar-fr.js
|
256
|
+
- public/javascripts/jscalendar/lang/calendar-hr-utf8.js
|
257
|
+
- public/javascripts/jscalendar/lang/calendar-hr.js
|
258
|
+
- public/javascripts/jscalendar/lang/calendar-hu.js
|
259
|
+
- public/javascripts/jscalendar/lang/calendar-it.js
|
260
|
+
- public/javascripts/jscalendar/lang/calendar-jp.js
|
261
|
+
- public/javascripts/jscalendar/lang/calendar-ko-utf8.js
|
262
|
+
- public/javascripts/jscalendar/lang/calendar-ko.js
|
263
|
+
- public/javascripts/jscalendar/lang/calendar-lt-utf8.js
|
264
|
+
- public/javascripts/jscalendar/lang/calendar-lt.js
|
265
|
+
- public/javascripts/jscalendar/lang/calendar-nl.js
|
266
|
+
- public/javascripts/jscalendar/lang/calendar-no.js
|
267
|
+
- public/javascripts/jscalendar/lang/calendar-pl-utf8.js
|
268
|
+
- public/javascripts/jscalendar/lang/calendar-pl.js
|
269
|
+
- public/javascripts/jscalendar/lang/calendar-pt.js
|
270
|
+
- public/javascripts/jscalendar/lang/calendar-ro.js
|
271
|
+
- public/javascripts/jscalendar/lang/calendar-ru.js
|
272
|
+
- public/javascripts/jscalendar/lang/calendar-si.js
|
273
|
+
- public/javascripts/jscalendar/lang/calendar-sk.js
|
274
|
+
- public/javascripts/jscalendar/lang/calendar-sp.js
|
275
|
+
- public/javascripts/jscalendar/lang/calendar-sv.js
|
276
|
+
- public/javascripts/jscalendar/lang/calendar-tr.js
|
277
|
+
- public/javascripts/jscalendar/lang/calendar-zh.js
|
174
278
|
- public/licenses/DAMAGECONTROL.license
|
175
279
|
- public/licenses/INCORS.license
|
176
280
|
- public/stylesheets/diff.css
|
281
|
+
- public/stylesheets/niceones.txt
|
177
282
|
- public/stylesheets/style.css
|
178
283
|
- script/breakpointer
|
179
284
|
- script/console
|
285
|
+
- script/console_sandbox.rb
|
286
|
+
- script/destroy
|
180
287
|
- script/generate
|
181
288
|
- script/server
|
182
289
|
- test/damagecontrol
|
290
|
+
- test/fixtures
|
183
291
|
- test/functional
|
292
|
+
- test/mocks
|
184
293
|
- test/test_helper.rb
|
294
|
+
- test/unit
|
185
295
|
- test/damagecontrol/a_program.rb
|
186
296
|
- test/damagecontrol/a_slow_program.rb
|
187
297
|
- test/damagecontrol/build_test.rb
|
@@ -190,17 +300,28 @@ files:
|
|
190
300
|
- test/damagecontrol/file_ext.rb
|
191
301
|
- test/damagecontrol/poller_test.rb
|
192
302
|
- test/damagecontrol/project_test.rb
|
303
|
+
- test/damagecontrol/publisher
|
193
304
|
- test/damagecontrol/scm_web_test.rb
|
194
305
|
- test/damagecontrol/test.diff
|
195
306
|
- test/damagecontrol/test.html
|
196
307
|
- test/damagecontrol/tracker_test.rb
|
197
308
|
- test/damagecontrol/visitor
|
309
|
+
- test/damagecontrol/publisher/base_test.rb
|
310
|
+
- test/damagecontrol/publisher/build
|
311
|
+
- test/damagecontrol/publisher/email_test.rb
|
312
|
+
- test/damagecontrol/publisher/fixture.rb
|
313
|
+
- test/damagecontrol/publisher/growl_test.rb
|
314
|
+
- test/damagecontrol/publisher/jabber_test.rb
|
315
|
+
- test/damagecontrol/publisher/build/email.rhtml
|
198
316
|
- test/damagecontrol/visitor/changesets.rss
|
199
317
|
- test/damagecontrol/visitor/diff_persister_test.rb
|
200
318
|
- test/damagecontrol/visitor/rss_writer_test.rb
|
201
319
|
- test/damagecontrol/visitor/yaml_persister_test.rb
|
202
320
|
- test/functional/admin_controller_test.rb
|
321
|
+
- test/functional/build_controller_test.rb
|
203
322
|
- test/functional/project_controller_test.rb
|
323
|
+
- test/mocks/development
|
324
|
+
- test/mocks/testing
|
204
325
|
test_files: []
|
205
326
|
rdoc_options:
|
206
327
|
- "--line-numbers"
|
@@ -214,24 +335,34 @@ extensions: []
|
|
214
335
|
requirements: []
|
215
336
|
dependencies:
|
216
337
|
- !ruby/object:Gem::Dependency
|
217
|
-
name:
|
338
|
+
name: rscm
|
218
339
|
version_requirement:
|
219
340
|
version_requirements: !ruby/object:Gem::Version::Requirement
|
220
341
|
requirements:
|
221
342
|
-
|
222
|
-
- "
|
343
|
+
- "="
|
223
344
|
- !ruby/object:Gem::Version
|
224
|
-
version:
|
345
|
+
version: 0.2.0
|
225
346
|
version:
|
226
347
|
- !ruby/object:Gem::Dependency
|
227
|
-
name:
|
348
|
+
name: rails
|
349
|
+
version_requirement:
|
350
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
351
|
+
requirements:
|
352
|
+
-
|
353
|
+
- "="
|
354
|
+
- !ruby/object:Gem::Version
|
355
|
+
version: 0.10.0
|
356
|
+
version:
|
357
|
+
- !ruby/object:Gem::Dependency
|
358
|
+
name: log4r
|
228
359
|
version_requirement:
|
229
360
|
version_requirements: !ruby/object:Gem::Version::Requirement
|
230
361
|
requirements:
|
231
362
|
-
|
232
|
-
- "
|
363
|
+
- "="
|
233
364
|
- !ruby/object:Gem::Version
|
234
|
-
version:
|
365
|
+
version: 1.0.5
|
235
366
|
version:
|
236
367
|
- !ruby/object:Gem::Dependency
|
237
368
|
name: needle
|
@@ -239,7 +370,37 @@ dependencies:
|
|
239
370
|
version_requirements: !ruby/object:Gem::Version::Requirement
|
240
371
|
requirements:
|
241
372
|
-
|
242
|
-
- "
|
373
|
+
- "="
|
374
|
+
- !ruby/object:Gem::Version
|
375
|
+
version: 1.2.0
|
376
|
+
version:
|
377
|
+
- !ruby/object:Gem::Dependency
|
378
|
+
name: jabber4r
|
379
|
+
version_requirement:
|
380
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
381
|
+
requirements:
|
382
|
+
-
|
383
|
+
- "="
|
384
|
+
- !ruby/object:Gem::Version
|
385
|
+
version: 0.7.0
|
386
|
+
version:
|
387
|
+
- !ruby/object:Gem::Dependency
|
388
|
+
name: rake
|
389
|
+
version_requirement:
|
390
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
391
|
+
requirements:
|
392
|
+
-
|
393
|
+
- "="
|
394
|
+
- !ruby/object:Gem::Version
|
395
|
+
version: 0.4.5
|
396
|
+
version:
|
397
|
+
- !ruby/object:Gem::Dependency
|
398
|
+
name: ruby-growl
|
399
|
+
version_requirement:
|
400
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
401
|
+
requirements:
|
402
|
+
-
|
403
|
+
- "="
|
243
404
|
- !ruby/object:Gem::Version
|
244
|
-
version:
|
405
|
+
version: 1.0.0
|
245
406
|
version:
|