lib/github_cli/cli.rb in github_cli-0.1.3 vs lib/github_cli/cli.rb in github_cli-0.2.0

- old
+ new

@@ -1,10 +1,11 @@ # encoding: utf-8 module GithubCLI - class CLI < ::Thor + class CLI < Thor include Thor::Actions + require 'github_cli/subcommands' def initialize(*args) super the_shell = (options["no-color"] ? Thor::Shell::Basic.new : shell) GithubCLI.ui = UI.new(the_shell) @@ -60,39 +61,9 @@ desc 'list <pattern>', 'List all available commands limited by pattern' def list(pattern="") pattern = /^#{pattern}.*$/i Terminal.print_commands pattern end - - desc "blob <command>", "Leverage Blobs API" - subcommand "blob", GithubCLI::Commands::Blobs - - desc "commit <command>", "Leverage Commits API" - subcommand "commit", GithubCLI::Commands::Commits - - desc "fork <command>", "Leverage Forks API" - subcommand "fork", GithubCLI::Commands::Forks - - desc "issue <command>", "Leverage Issues API" - subcommand "issue", GithubCLI::Commands::Issues - - desc "label <command>", "Leverage Labels API" - subcommand "label", GithubCLI::Commands::Labels - - desc "pull <command>", "Leverage Pull Requests API" - subcommand "pull", GithubCLI::Commands::PullRequests - - desc "ref <command>", "Leverage References API" - subcommand "ref", GithubCLI::Commands::References - - desc "repo <command>", "Leverage Repositories API" - subcommand "repo", GithubCLI::Commands::Repositories - - desc "tag <command>", "Leverage Tags API" - subcommand "tag", GithubCLI::Commands::Tags - - desc "tree <command>", "Leverage Trees API" - subcommand "tree", GithubCLI::Commands::Trees desc 'version', 'Display Github CLI version.' def version say "Github CLI #{GithubCLI::VERSION}" end