Class: BuildAction
Direct Known Subclasses
CodeChangeAction, CodeCoverageAction, CodeDuplicationAction, CycleDetectionAction, CyclomaticComplexityAction, DeadCodeAction, ExecutableFilesCheckAction, FlaggedCommentsAction, GemPluginAction, LocCountAction, OutsideLinksAction, RailsMigrateAction, StrangeRequires, SyntaxCheckAction, UnitTestBuildAction
Class Method Summary
collapse
Instance Method Summary
collapse
get_implementors
Class Method Details
.command_line_action_name ⇒ Object
25
26
27
|
# File 'lib/kwala/build_action.rb', line 25
def self.command_line_action_name
self.name.gsub(/BuildAction|Action/, '').kwala_underscore
end
|
.command_line_action_names ⇒ Object
.create_action_from_command_line_name(name) ⇒ Object
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/kwala/build_action.rb', line 37
def BuildAction.create_action_from_command_line_name(name)
imp = BuildAction.get_implementors.find do |imp|
imp.command_line_action_name == name
end
if imp
imp.new
else
nil
end
end
|
.detailed_template_file ⇒ Object
33
34
35
|
# File 'lib/kwala/build_action.rb', line 33
def self.detailed_template_file
"#{TEMPLATE_DIR}/#{command_line_action_name}_detailed.html"
end
|
.summary_template_file ⇒ Object
29
30
31
|
# File 'lib/kwala/build_action.rb', line 29
def self.summary_template_file
"#{TEMPLATE_DIR}/#{command_line_action_name}_summary.html"
end
|
Instance Method Details
#build_action(context) ⇒ Object
4
5
6
|
# File 'lib/kwala/build_action.rb', line 4
def build_action(context)
raise "Must be implemented by subclass."
end
|
#detailed_display(context) ⇒ Object
12
13
14
|
# File 'lib/kwala/build_action.rb', line 12
def detailed_display(context)
[nil, nil]
end
|
#score ⇒ Object
a number from 1 - 10 that represents some type of rating that will help determine if the koala’s expression. For now if nil, then not scorable. This might be better as an additional method called scoreable? Default is unscoreable
21
22
23
|
# File 'lib/kwala/build_action.rb', line 21
def score
nil
end
|
#summary_display(context) ⇒ Object
8
9
10
|
# File 'lib/kwala/build_action.rb', line 8
def summary_display(context)
raise "Must be implemented by subclass."
end
|