Class: Publisher::ReportGenerator
- Inherits:
-
Object
- Object
- Publisher::ReportGenerator
- Includes:
- Helpers
- Defined in:
- lib/allure_report_publisher/lib/report_generator.rb
Overview
Allure report generator
Instance Attribute Summary collapse
-
#report_path ⇒ String
readonly
Report path.
Instance Method Summary collapse
-
#common_info_path ⇒ String
(also: #create_common_path)
Common path for history and executor info.
-
#generate(extra_args = []) ⇒ void
Generate allure report.
-
#initialize(result_paths, report_name, report_path) ⇒ ReportGenerator
constructor
A new instance of ReportGenerator.
Methods included from Helpers
allure_cli?, colorize, debug_io, #env, #env_int, error, execute_shell, log, log_debug, logger, pastel, path, reset_debug_io!
Constructor Details
#initialize(result_paths, report_name, report_path) ⇒ ReportGenerator
Returns a new instance of ReportGenerator.
13 14 15 16 17 |
# File 'lib/allure_report_publisher/lib/report_generator.rb', line 13 def initialize(result_paths, report_name, report_path) @result_paths = result_paths.join(" ") @report_name = report_name @report_path = report_path end |
Instance Attribute Details
#report_path ⇒ String (readonly)
Returns report path.
40 41 42 |
# File 'lib/allure_report_publisher/lib/report_generator.rb', line 40 def report_path @report_path end |
Instance Method Details
#common_info_path ⇒ String Also known as: create_common_path
Common path for history and executor info
32 33 34 35 36 |
# File 'lib/allure_report_publisher/lib/report_generator.rb', line 32 def common_info_path @common_info_path ||= Dir.mktmpdir("allure-results").tap do |path| log_debug("Created tmp folder for common data: '#{path}'") end end |
#generate(extra_args = []) ⇒ void
This method returns an undefined value.
Generate allure report
23 24 25 26 27 |
# File 'lib/allure_report_publisher/lib/report_generator.rb', line 23 def generate(extra_args = []) create_common_path generate_report(extra_args) end |