Sha256: c597b0b8cb5307bb2a34aefa8488cc23f7a5757bd9edf20581cc8044154e5c00

Contents?: true

Size: 1.06 KB

Versions: 14

Compression:

Stored size: 1.06 KB

Contents

# encoding: utf-8

module GithubCLI
  class Commands::Keys < Command

    namespace :key

    desc 'list <user> <repo>', 'Lists keys'
    def list(user, repo)
      Key.all user, repo, options[:params], options[:format]
    end

    desc 'get <user> <repo> <id>', 'Get a key'
    def get(user, repo, id)
      Key.get user, repo, id, options[:params], options[:format]
    end

    desc 'create <user> <repo>', 'Create a new key'
    long_desc <<-DESC
      Inputs

      title - Required string. \n
      key - Required string.
    DESC
    def create(user, repo)
      Key.create user, repo, options[:params], options[:format]
    end

    desc 'edit <user> <repo> <id>', 'Edit a key'
    long_desc <<-DESC
      Inputs

      title - Required string. \n
      key - Required string.
    DESC
    def edit(user, repo, id)
      Key.edit user, repo, id, options[:params], options[:format]
    end

    desc 'delete <user> <repo> <id>', 'Delete a key'
    def delete(user, repo, id)
      Key.delete user, repo, id, options[:params], options[:format]
    end

  end # Keys
end # GithubCLI

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
github_cli-0.5.9 lib/github_cli/commands/keys.rb
github_cli-0.5.8 lib/github_cli/commands/keys.rb
github_cli-0.5.7 lib/github_cli/commands/keys.rb
github_cli-0.5.6 lib/github_cli/commands/keys.rb
github_cli-0.5.5 lib/github_cli/commands/keys.rb
github_cli-0.5.4 lib/github_cli/commands/keys.rb
github_cli-0.5.3 lib/github_cli/commands/keys.rb
github_cli-0.5.2 lib/github_cli/commands/keys.rb
github_cli-0.5.1 lib/github_cli/commands/keys.rb
github_cli-0.5.0 lib/github_cli/commands/keys.rb
github_cli-0.4.4 lib/github_cli/commands/keys.rb
github_cli-0.4.3 lib/github_cli/commands/keys.rb
github_cli-0.4.2 lib/github_cli/commands/keys.rb
github_cli-0.4.1 lib/github_cli/commands/keys.rb