lib/macros4cuke/cli/cmd-line.rb in macros4cuke-0.5.15 vs lib/macros4cuke/cli/cmd-line.rb in macros4cuke-0.5.16
- old
+ new
@@ -21,11 +21,11 @@
class CmdLine
ShortHelpMsg = <<-END_MSG
For help about the command-line syntax, do:
macros4cuke --help
END_MSG
-
+ .freeze
# A Hash with the result of the command-line parse.
attr_reader(:options)
# OptionParser object
attr_reader(:parser)
@@ -75,15 +75,13 @@
begin
parser.parse!(theCmdLineArgs.dup)
rescue Macros4Cuke::CmdLineError => exc
$stderr.puts exc.message
exit
-
rescue OptionParser::InvalidOption => exc
$stderr.puts exc.message
exit
-
rescue OptionParser::MissingArgument => exc
err_msg = ''
exc.args.each do |arg|
err_msg << "No argument provided with command line option: #{arg}\n"
end
@@ -110,9 +108,10 @@
feature_path = dirs.reduce(Pathname.getwd) do |path, dir_name|
path += dir_name
unless path.exist?
raise DirectoryNotFound.new(path.relative_path_from(Pathname.getwd))
end
+
path
end
return feature_path
end