require 'clamp' module Gisha class AuthCommand < Clamp::Command parameter 'USER', 'username that was provided to the server' parameter 'KEY', 'public key that was provided to the server' def execute puts "authenticate #{user} with #{key}" end end class ReceiveCommand < Clamp::Command parameter 'PATH', 'path of the repo that was pushed to' parameter 'COMMIT', 'SHA of the commit that was pushed to master' def execute puts "received #{commit} for repository #{path}" end end class CLI < Clamp::Command subcommand 'auth', 'Authenticate user', AuthCommand subcommand 'receive', 'Receive what is pushed into the repository', ReceiveCommand end end