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 Method Summary collapse
-
#common_info_path ⇒ String
(also: #create_common_path)
Common path for history and executor info.
-
#generate ⇒ void
Generate allure report.
-
#initialize(result_paths, report_name) ⇒ ReportGenerator
constructor
A new instance of ReportGenerator.
-
#report_path ⇒ String
Allure report directory.
Methods included from Helpers
allure_cli?, colorize, debug_io, #env, error, execute_shell, log, log_debug, logger, pastel, path, reset_debug_io!
Constructor Details
#initialize(result_paths, report_name) ⇒ ReportGenerator
Returns a new instance of ReportGenerator.
13 14 15 16 |
# File 'lib/allure_report_publisher/lib/report_generator.rb', line 13 def initialize(result_paths, report_name) @result_paths = result_paths.join(" ") @report_name = report_name end |
Instance Method Details
#common_info_path ⇒ String Also known as: create_common_path
Common path for history and executor info
30 31 32 33 34 |
# File 'lib/allure_report_publisher/lib/report_generator.rb', line 30 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 ⇒ void
This method returns an undefined value.
Generate allure report
21 22 23 24 25 |
# File 'lib/allure_report_publisher/lib/report_generator.rb', line 21 def generate create_common_path generate_report end |
#report_path ⇒ String
Allure report directory
40 41 42 |
# File 'lib/allure_report_publisher/lib/report_generator.rb', line 40 def report_path @report_path ||= File.join(Dir.tmpdir, "allure-report-#{Time.now.to_i}") end |