File: cucumber-html-formatter

package info (click to toggle)
ruby-cucumber-html-formatter 23.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,000 kB
  • sloc: ruby: 122; makefile: 4; javascript: 1
file content (20 lines) | stat: -rwxr-xr-x 501 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'optparse'
require 'cucumber/messages'
require 'cucumber/html_formatter'

formatter = Cucumber::HTMLFormatter::Formatter.new($stdout)

option_parser = OptionParser.new do |opts|
  opts.on_tail('-h', '--help', 'Show this message') do
    puts opts
    exit
  end
end
options = {}
option_parser.parse!(into: options)
message_enumerator = Cucumber::Messages::NdjsonToMessageEnumerator.new($stdin)

formatter.process_messages(message_enumerator)