Skip to content

Commit

Permalink
Add show version & edit help, version in banner
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Jul 20, 2019
1 parent 5a0f92e commit c5f5ebb
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 61 deletions.
130 changes: 73 additions & 57 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions exe/XSpear
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,17 @@ class Parser
puts opts
exit
end

opts.on('--version', 'Show XSpear version') do
puts XSpear::VERSION
exit
end
opts.on('--update', 'Update with online') do
puts opts
puts "[RubyGem user] : $ gem update XSpear"
puts "[Soft | Developer & Git clone user] : $ git pull -v "
puts "[Hard | Developer & Git clone user] : $ git reset --hard HEAD; git pull -v "
exit
end
end

opt_parser.parse!(options)
args
end
Expand Down
2 changes: 1 addition & 1 deletion lib/XSpear/banner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ def banner;
|_| \\ /<
{\\\\\\\\\\\\\\\\\\\\\\\\\\BYHAHWUL\\\\\\\\\\\\\\\\\\\\\\(0):::<======================-
/ \\<
\\>"
\\> [ v#{XSpear::VERSION} ]"
end

0 comments on commit c5f5ebb

Please sign in to comment.