lib/safe_pusher/cli.rb in safe_pusher-0.2.2 vs lib/safe_pusher/cli.rb in safe_pusher-0.3.0

- old
+ new

@@ -5,10 +5,12 @@ def initialize(arguments:) @arguments = arguments end def start + return version if arguments.first == '--version' + unless arguments_valid? help return end @@ -77,15 +79,20 @@ end def help puts "Usage:\n"\ " help (h) # show this usage message\n"\ + " --version # print SafePusher version\n"\ " ##########################################################\n"\ " # you can use any combination of theese commands \n"\ " ##########################################################\n"\ " test (t) # run the test suite\n"\ " lint (l) # run the linters\n"\ " push (p) # push on distant repository\n"\ ' open (o) # open a pull request on the distant repository' + end + + def version + puts SafePusher::VERSION end end end