Sha256: 5cbb8a9e2de6a4fd4f6910c995bae6d1df5b0ba658b3e7fde4c1481953ffe8f2

Contents?: true

Size: 784 Bytes

Versions: 1

Compression:

Stored size: 784 Bytes

Contents

require "cp8_cli/version"
require "cp8_cli/global_config"
require "cp8_cli/commands/start"
require "cp8_cli/commands/submit"
require "cp8_cli/commands/suggest"

module Cp8Cli
  class Main
    def initialize(global_config = GlobalConfig.new)
      Trello::Base.configure(key: global_config.trello_key, token: global_config.trello_token)
      Github::Base.configure(token: global_config.github_token)
    end

    def start(name)
      Commands::Start.new(name).run
    end

    def open
      Branch.current.open_story_in_browser # TODO: move to /commands
    end

    def submit(options = {})
      Commands::Submit.new(options).run
    end

    def ci
      Branch.current.open_ci # TODO: move to /commands
    end

    def suggest
      Commands::Suggest.new.run
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cp8_cli-6.0.0 lib/cp8_cli/main.rb