Sha256: fcc66d6ff5337febd8529bcea06412f4be79a68e10ab33c1b0c9b6e73996b30d

Contents?: true

Size: 721 Bytes

Versions: 1

Compression:

Stored size: 721 Bytes

Contents

require 'clamp'
require 'tempfile'
require 'shellwords'

module Gisha

  class ReceiveCommand < Clamp::Command
    parameter 'KEY_ID', 'id to identify the key'

    def execute
      Commands::Receive.new(key_id).exec
    end
  end


  class DeployCommand < Clamp::Command
    parameter 'URL', 'url to deploy'
    parameter 'KEY_ID', 'id to identify the key'
    parameter 'PATH', 'repository path'
    parameter 'REVISION', 'repository path'

    def execute
      Commands::Deploy.new(url, key_id, path, revision).exec
    end
  end

  class CLI < Clamp::Command
    subcommand 'receive', 'receive what is pushed into the repository', ReceiveCommand
    subcommand 'deploy', 'deploy to spass', DeployCommand
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gisha-0.1.1 lib/gisha/cli.rb