Sha256: 0669c9823f249dd974a17e8ad1faaaca34f8f2928f2649fda977a0495aa4f6b4

Contents?: true

Size: 1.42 KB

Versions: 3

Compression:

Stored size: 1.42 KB

Contents

# encoding: utf-8

require 'yaml'
require 'pathname'
require 'thor'
require 'thor/group'
require 'github_api'
require 'github_cli/thor_ext'
require 'github_cli/version'
require 'github_cli/errors'

# Base module which adds Github API to the command line
module GithubCLI
  autoload :DSL,       'github_cli/dsl'
  autoload :Config,    'github_cli/config'
  autoload :CLI,       'github_cli/cli'
  autoload :Command,   'github_cli/command'
  autoload :API,       'github_cli/api'
  autoload :Terminal,  'github_cli/terminal'
  autoload :System,    'github_cli/system'
  autoload :Pager,     'github_cli/pager'
  autoload :Commands,  'github_cli/commands'
  autoload :Helpers,   'github_cli/helpers'
  autoload :Formatter, 'github_cli/formatter'
  autoload :Formatters,'github_cli/formatters'
  autoload :UI,        'github_cli/ui'
  autoload :Util,      'github_cli/util'

  require 'github_cli/apis'
  require 'github_cli/command/completion'
  require 'github_cli/command/usage'
  require 'github_cli/command/arguments'

  extend DSL

  program_name 'GitHub API v3 CLI client'

  class << self
    attr_writer :ui, :config

    def ui
      @ui ||= UI.new
    end

    def default_configfile
      Helpers.default_configfile
    end

    def root
      default_configfile.expand_path
    end

    def config
      @config ||= GithubCLI::Config.new root
    end

    def commands
      @commands ||= GithubCLI::Command.all
    end
  end
end # GithubCLI

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
github_cli-0.4.4 lib/github_cli.rb
github_cli-0.4.3 lib/github_cli.rb
github_cli-0.4.2 lib/github_cli.rb