Class: CircleCIReporter::Reporters::Base
Abstract
- Inherits:
-
Object
- Object
- CircleCIReporter::Reporters::Base
show all
- Defined in:
- lib/circleci_reporter/reporters/base.rb
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
22
23
24
|
# File 'lib/circleci_reporter/reporters/base.rb', line 22
def initialize(options = {})
@options = options
end
|
Class Method Details
.default_dir ⇒ Object
10
11
12
|
# File 'lib/circleci_reporter/reporters/base.rb', line 10
def self.default_dir
raise NotImplementedError
end
|
.default_html_file_name ⇒ Object
14
15
16
|
# File 'lib/circleci_reporter/reporters/base.rb', line 14
def self.default_html_file_name
raise NotImplementedError
end
|
.default_json_file_name ⇒ Object
18
19
20
|
# File 'lib/circleci_reporter/reporters/base.rb', line 18
def self.default_json_file_name
raise NotImplementedError
end
|
Instance Method Details
#active? ⇒ Boolean
27
28
29
|
# File 'lib/circleci_reporter/reporters/base.rb', line 27
def active?
File.directory?(File.join(configuration.artifacts_dir, dir))
end
|
#name ⇒ String
46
47
48
|
# File 'lib/circleci_reporter/reporters/base.rb', line 46
def name
self.class.name.split('::').last
end
|
#report(base_build, previous_build) ⇒ Report
34
35
36
37
38
39
40
41
|
# File 'lib/circleci_reporter/reporters/base.rb', line 34
def report(base_build, previous_build)
Report.new(
self,
create_current_result,
base: base_build ? create_build_result(base_build) : nil,
previous: previous_build ? create_build_result(previous_build) : nil
)
end
|