lib/github_cli/cli.rb in github_cli-0.1.0 vs lib/github_cli/cli.rb in github_cli-0.1.1
- old
+ new
@@ -4,18 +4,14 @@
class CLI < ::Thor
include Thor::Actions
def initialize(*args)
super
- say <<-TEXT
-
-Github CLI client
-
- TEXT
the_shell = (options["no-color"] ? Thor::Shell::Basic.new : shell)
GithubCLI.ui = UI.new(the_shell)
GithubCLi.ui.debug! if options["verbose"]
+ Terminal.print_program_name
end
map "repository" => :repo,
"is" => :issue,
"-v" => :version,
@@ -64,23 +60,26 @@
def list(pattern="")
pattern = /^#{pattern}.*$/i
Terminal.print_commands pattern
end
- desc "blob <command>", "leverage Blobs API"
- subcommand "blob", GithubCLI::Blobs
+ desc "blob <command>", "Leverage Blobs API"
+ subcommand "blob", GithubCLI::Commands::Blobs
- desc "repo <command>", "leverage Repositories API"
- subcommand "repo", GithubCLI::Repositories
+ desc "repo <command>", "Leverage Repositories API"
+ subcommand "repo", GithubCLI::Commands::Repositories
- desc "issue <command>", "leverage Issues API"
- subcommand "issue", GithubCLI::Issues
+ desc "issue <command>", "Leverage Issues API"
+ subcommand "issue", GithubCLI::Commands::Issues
- desc "label <command>", "leverage Labels API"
- subcommand "label", GithubCLI::Labels
+ desc "label <command>", "Leverage Labels API"
+ subcommand "label", GithubCLI::Commands::Labels
- desc "tree <command>", "leverage Trees API"
- subcommand "tree", GithubCLI::Trees
+ 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
puts "#{GithubCLI.config['oauth_token']}"
say "Github CLI #{GithubCLI::VERSION}"