Skip to content

Commit

Permalink
add version
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed Oct 8, 2022
1 parent e117a10 commit 2d22272
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/html_proofer/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ def parse_cli_options(args)
private def define_options
OptionParser.new do |opts|
opts.banner = "Usage: htmlproofer [options] PATH/LINK"
# p.version(HTMLProofer::VERSION)
# p.description %(Test your rendered HTML files to make sure they're accurate.)
# p.syntax 'htmlproofer PATH [options]'

# p.description 'Runs the HTML-Proofer suite on the files in PATH. For more details, see the README.'

section(opts, "Input Options") do
set_option(opts, "--as-links") do |long_opt_symbol, arg|
Expand Down Expand Up @@ -206,6 +201,13 @@ def parse_cli_options(args)
@options[long_opt_symbol] = arg.to_sym
end
end

section(opts, "General Configuration") do
set_option(opts, "--version") do
puts HTMLProofer::VERSION
exit(0)
end
end
end
end

Expand Down Expand Up @@ -311,6 +313,8 @@ module ConfigurationHelp

log_level: ["Sets the logging level. One of `:debug`, `:info`, ",
"`:warn`, `:error`, or `:fatal`. (default: `:info`)",],

version: ["Prints the version of html-proofer."],
}.freeze
end
end
Expand Down

0 comments on commit 2d22272

Please sign in to comment.