lib/uispecrunner/application.rb in uispecrunner-0.4.1 vs lib/uispecrunner/application.rb in uispecrunner-0.4.2

- old
+ new

@@ -9,12 +9,19 @@ if options[:invalid_argument] $stderr.puts options[:invalid_argument] options[:show_help] = true end - if options[:show_help] + if options[:command] == :help $stderr.puts options.opts return 1 + end + + if options[:command] == :version + version_path = File.join(File.dirname(__FILE__), '..', '..', 'VERSION') + version = File.read(version_path) + $stdout.puts version + return 0 end # Read standard arguments from uispec.opts options_file = File.join(Dir.getwd, 'uispec.opts') if File.exists?(options_file)