From e732e7cc29a035b34657316530f94627ba24f816 Mon Sep 17 00:00:00 2001 From: Danilo Sousa Date: Wed, 17 Feb 2016 14:45:54 -0200 Subject: create `-v` and `--version` options --- lib/oxidized/cli.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/oxidized') diff --git a/lib/oxidized/cli.rb b/lib/oxidized/cli.rb index d35eab3..0594dcb 100644 --- a/lib/oxidized/cli.rb +++ b/lib/oxidized/cli.rb @@ -43,6 +43,10 @@ module Oxidized opts = Slop.new(:help=>true) do on 'd', 'debug', 'turn on debugging' on 'daemonize', 'Daemonize/fork the process' + on 'v', 'version', 'show version' do + puts Oxidized::VERSION + Kernel.exit + end end [opts.parse!, opts] end -- cgit v1.2.1