damagecontrol 0.5.0.1393 → 0.5.0.1404
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/Rakefile +2 -2
- data/app/controllers/project_controller.rb +0 -1
- data/app/controllers/rails_ext.rb +10 -0
- data/app/views/project/view.rhtml +5 -0
- data/config/environment.rb +12 -7
- data/config/routes.rb +6 -2
- data/lib/damagecontrol/app.rb +1 -0
- data/lib/damagecontrol/directories.rb +1 -1
- data/lib/damagecontrol/project.rb +2 -2
- data/lib/damagecontrol/tracker.rb +5 -2
- metadata +6 -7
- data/config/database.yml +0 -20
data/Rakefile
CHANGED
@@ -70,8 +70,8 @@ else
|
|
70
70
|
|
71
71
|
#### Dependencies and requirements.
|
72
72
|
|
73
|
-
s.add_dependency('rscm', '0.2.
|
74
|
-
s.add_dependency('rails', '0.10.
|
73
|
+
s.add_dependency('rscm', '>= 0.2.1.1404')
|
74
|
+
s.add_dependency('rails', '>= 0.10.1')
|
75
75
|
s.add_dependency('log4r', '1.0.5')
|
76
76
|
s.add_dependency('needle', '1.2.0')
|
77
77
|
s.add_dependency('jabber4r', '0.7.0')
|
@@ -30,6 +30,13 @@ class ActionController::Base
|
|
30
30
|
array = instantiate_array_from_hashes(@params[name])
|
31
31
|
selected = @params["#{name}_selected"]
|
32
32
|
selected_object = array.find { |o| o.class.name == selected }
|
33
|
+
unless selected_object
|
34
|
+
Log.error "No selected object among '#{name}'"
|
35
|
+
Log.error "params: #{@params[name].inspect}"
|
36
|
+
Log.error "array: #{array.inspect}"
|
37
|
+
Log.error "selected: #{selected}"
|
38
|
+
raise "No selected object found. See log for details."
|
39
|
+
end
|
33
40
|
def selected_object.selected?
|
34
41
|
true
|
35
42
|
end
|
@@ -200,6 +207,9 @@ module ActionView
|
|
200
207
|
r << " </tr>\n"
|
201
208
|
end
|
202
209
|
end
|
210
|
+
# workaround for RoR bug. 'hash' form params must have at least one value.
|
211
|
+
r << "<tr><td></td><td><input type='hidden' name ='#{collection_name}[#{o.class.name}][__dummy]'></td></tr>" if o.instance_variables.empty?
|
212
|
+
|
203
213
|
r << "</table>"
|
204
214
|
r
|
205
215
|
end
|
@@ -46,6 +46,11 @@ Publishers give feedback of the results of a build. Publishers run after a build
|
|
46
46
|
</div>
|
47
47
|
|
48
48
|
<div id="trackers" style="display:none">
|
49
|
+
For every changeset, DamageControl looks for issue/bug numbers in the changeset messages.
|
50
|
+
If it finds an issue number, it creates a link to the external issue tracker.
|
51
|
+
|
52
|
+
By specifying an issue tracker, you're giving DamageControl a hint about the format of the bugs to
|
53
|
+
look for, as well as a base url of the bug tracker, so it can create a full link.
|
49
54
|
<%= select_pane("Issue Trackers", "trackers", @trackers) %>
|
50
55
|
</div>
|
51
56
|
|
data/config/environment.rb
CHANGED
@@ -29,7 +29,7 @@ ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(di
|
|
29
29
|
# Require Rails gems.
|
30
30
|
require 'rubygems'
|
31
31
|
require_gem 'activesupport'
|
32
|
-
require_gem 'activerecord'
|
32
|
+
#require_gem 'activerecord'
|
33
33
|
require_gem 'actionpack'
|
34
34
|
require_gem 'actionmailer'
|
35
35
|
require_gem 'actionwebservice'
|
@@ -37,15 +37,19 @@ require_gem 'rails'
|
|
37
37
|
|
38
38
|
|
39
39
|
# Environment-specific configuration.
|
40
|
-
require_dependency "environments/#{RAILS_ENV}"
|
41
|
-
ActiveRecord::Base.configurations = YAML::load(File.open("#{RAILS_ROOT}/config/database.yml"))
|
42
|
-
ActiveRecord::Base.establish_connection
|
40
|
+
#require_dependency "environments/#{RAILS_ENV}"
|
41
|
+
#ActiveRecord::Base.configurations = YAML::load(File.open("#{RAILS_ROOT}/config/database.yml"))
|
42
|
+
#ActiveRecord::Base.establish_connection
|
43
43
|
|
44
44
|
|
45
45
|
# Configure defaults if the included environment did not.
|
46
46
|
begin
|
47
|
-
RAILS_DEFAULT_LOGGER = Logger.new("#{RAILS_ROOT}/log/#{RAILS_ENV}.log")
|
48
|
-
|
47
|
+
# RAILS_DEFAULT_LOGGER = Logger.new("#{RAILS_ROOT}/log/#{RAILS_ENV}.log")
|
48
|
+
require 'damagecontrol/directories'
|
49
|
+
LOG_DIR = File.expand_path("#{DamageControl::Directories.basedir}/log")
|
50
|
+
FileUtils.mkdir_p(LOG_DIR)
|
51
|
+
RAILS_DEFAULT_LOGGER = Logger.new("#{LOG_DIR}/#{RAILS_ENV}.log")
|
52
|
+
rescue StandardError => e
|
49
53
|
RAILS_DEFAULT_LOGGER = Logger.new(STDERR)
|
50
54
|
RAILS_DEFAULT_LOGGER.level = Logger::WARN
|
51
55
|
RAILS_DEFAULT_LOGGER.warn(
|
@@ -54,7 +58,8 @@ rescue StandardError
|
|
54
58
|
)
|
55
59
|
end
|
56
60
|
|
57
|
-
[ActiveRecord, ActionController, ActionMailer].each { |mod| mod::Base.logger ||= RAILS_DEFAULT_LOGGER }
|
61
|
+
#[ActiveRecord, ActionController, ActionMailer].each { |mod| mod::Base.logger ||= RAILS_DEFAULT_LOGGER }
|
62
|
+
[ActionController, ActionMailer].each { |mod| mod::Base.logger ||= RAILS_DEFAULT_LOGGER }
|
58
63
|
[ActionController, ActionMailer].each { |mod| mod::Base.template_root ||= "#{RAILS_ROOT}/app/views/" }
|
59
64
|
ActionController::Routing::Routes.reload
|
60
65
|
|
data/config/routes.rb
CHANGED
@@ -6,10 +6,14 @@ ActionController::Routing::Routes.draw do |map|
|
|
6
6
|
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
7
7
|
# Keep in mind you can assign values other than :controller and :action
|
8
8
|
|
9
|
+
# default route
|
10
|
+
#map.connect '', :controller => 'project', :action => 'index'
|
11
|
+
|
9
12
|
# Allow downloading Web Service WSDL as a file with an extension
|
10
13
|
# instead of a file named 'wsdl'
|
11
|
-
|
14
|
+
|
15
|
+
# map.connect ':controller/service.wsdl', :action => 'wsdl'
|
12
16
|
|
13
17
|
# Install the default route as the lowest priority.
|
14
18
|
map.connect ':controller/:action/:id'
|
15
|
-
end
|
19
|
+
end
|
data/lib/damagecontrol/app.rb
CHANGED
@@ -28,6 +28,7 @@ REGISTRY = Needle::Registry.define do |b|
|
|
28
28
|
project.publish(build)
|
29
29
|
end
|
30
30
|
# TODO: do this in a publisher that can be turned off if an other SCMWeb is used.
|
31
|
+
# Disable by default if other SCMWeb is specified.
|
31
32
|
# This may take a while, so we do it after the build.
|
32
33
|
b.persister.save_diffs(project, changesets)
|
33
34
|
end
|
@@ -80,8 +80,8 @@ module DamageControl
|
|
80
80
|
@name = name
|
81
81
|
@publishers = Publisher::Base.classes.collect{|cls| cls.new}
|
82
82
|
@scm = nil
|
83
|
-
@tracker = Tracker::
|
84
|
-
@scm_web = SCMWeb::
|
83
|
+
@tracker = Tracker::None.new
|
84
|
+
# @scm_web = SCMWeb::None.new
|
85
85
|
# Default start time is 2 weeks ago
|
86
86
|
@start_time = Time.now.utc - (3600*24*14)
|
87
87
|
@quiet_period = DEFAULT_QUIET_PERIOD
|
@@ -21,7 +21,7 @@ module DamageControl
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
class
|
24
|
+
class None < Base
|
25
25
|
register self
|
26
26
|
|
27
27
|
def name
|
@@ -35,8 +35,11 @@ module DamageControl
|
|
35
35
|
def url
|
36
36
|
"#"
|
37
37
|
end
|
38
|
-
|
39
38
|
end
|
39
|
+
# For bwc only.
|
40
|
+
class Null < None
|
41
|
+
end
|
42
|
+
|
40
43
|
|
41
44
|
class Bugzilla < Base
|
42
45
|
register self
|
metadata
CHANGED
@@ -3,8 +3,8 @@ 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-03-
|
6
|
+
version: 0.5.0.1404
|
7
|
+
date: 2005-03-10
|
8
8
|
summary: DamageControl
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -74,7 +74,6 @@ files:
|
|
74
74
|
- app/views/scm/diff.rhtml
|
75
75
|
- app/views/scm/scroll.html
|
76
76
|
- app/views/setup/welcome.rhtml
|
77
|
-
- config/database.yml
|
78
77
|
- config/environment.rb
|
79
78
|
- config/environments
|
80
79
|
- config/routes.rb
|
@@ -340,9 +339,9 @@ dependencies:
|
|
340
339
|
version_requirements: !ruby/object:Gem::Version::Requirement
|
341
340
|
requirements:
|
342
341
|
-
|
343
|
-
- "
|
342
|
+
- ">="
|
344
343
|
- !ruby/object:Gem::Version
|
345
|
-
version: 0.2.
|
344
|
+
version: 0.2.1.1404
|
346
345
|
version:
|
347
346
|
- !ruby/object:Gem::Dependency
|
348
347
|
name: rails
|
@@ -350,9 +349,9 @@ dependencies:
|
|
350
349
|
version_requirements: !ruby/object:Gem::Version::Requirement
|
351
350
|
requirements:
|
352
351
|
-
|
353
|
-
- "
|
352
|
+
- ">="
|
354
353
|
- !ruby/object:Gem::Version
|
355
|
-
version: 0.10.
|
354
|
+
version: 0.10.1
|
356
355
|
version:
|
357
356
|
- !ruby/object:Gem::Dependency
|
358
357
|
name: log4r
|
data/config/database.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
development:
|
2
|
-
adapter: mysql
|
3
|
-
database: rails_development
|
4
|
-
host: localhost
|
5
|
-
username: root
|
6
|
-
password:
|
7
|
-
|
8
|
-
test:
|
9
|
-
adapter: mysql
|
10
|
-
database: rails_test
|
11
|
-
host: localhost
|
12
|
-
username: root
|
13
|
-
password:
|
14
|
-
|
15
|
-
production:
|
16
|
-
adapter: mysql
|
17
|
-
database: rails_production
|
18
|
-
host: localhost
|
19
|
-
username: root
|
20
|
-
password:
|