Class: QaAtMigration::Generator
- Inherits:
-
Object
- Object
- QaAtMigration::Generator
- Defined in:
- lib/qa_at_migration/generator.rb
Constant Summary collapse
- CONFIG_FILE =
'config.yml'.freeze
- CONFIG_IGNORE_KEY =
'ignore'.freeze
- TEST_FILE_PATTERN =
'**/*.md'.freeze
- CSV_HEADERS =
%w(Title Description Preconditions Steps Status).freeze
Instance Method Summary collapse
Instance Method Details
#generate(sourcepath, targetpath, output_filename = 'master.csv') ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/qa_at_migration/generator.rb', line 8 def generate sourcepath, targetpath, output_filename = 'master.csv' @sourcepath = sourcepath ? sourcepath : Dir.pwd output_path_filename = targetpath ? File.join(targetpath, output_filename) : output_filename CSV.open(output_path_filename, 'w', headers: CSV_HEADERS, write_headers: true) do |csv| paths.each { |path| csv << TestFile.new(path).content } end end |