Class: Gaptool::VersionCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/gaptool_client/commands.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



382
383
384
385
386
387
388
# File 'lib/gaptool_client/commands.rb', line 382

def execute
  version = File.read(File.realpath(File.join(File.dirname(__FILE__), '..', '..', 'VERSION'))).strip
  puts "gaptool-client #{version} using gaptool-api #{Gaptool::API.client.version}"
  return 0 unless remote?
  vinfo = Gaptool::API.client.api_version
  puts "gaptool-server #{vinfo['server_version']}"
end