lib/powify/client.rb in powify-0.8.5 vs lib/powify/client.rb in powify-0.9.1
- old
+ new
@@ -2,22 +2,26 @@
class Client
extend Powify
class << self
def run(args = [])
begin
- if args[0] && args[0].strip != 'help'
+ if (%w(version help) & args).empty?
return Powify::Server.run(args[1..-1]) if args[0].strip == 'server'
return Powify::Utils.run(args[1..-1]) if args[0].strip == 'utils'
return Powify::App.run(args)
end
rescue Exception => e
$stdout.puts e
end
- help
+ self.send (%w(version help) & args).first.to_sym
end
+ def version
+ $stdout.puts Powify::VERSION
+ end
+
def help
$stdout.puts ""
$stdout.puts " [SERVER COMMANDS]"
$stdout.puts " powify server install install pow server"
$stdout.puts " powify server reinstall reinstall pow server"
@@ -51,6 +55,6 @@
$stdout.puts " powify logs [NAME] tail the application logs"
$stdout.puts ""
end
end
end
-end
\ No newline at end of file
+end