Class: Cp8Cli::Main

Inherits:
Object
  • Object
show all
Defined in:
lib/cp8_cli/main.rb

Instance Method Summary collapse

Constructor Details

#initialize(global_config = GlobalConfig.new) ⇒ Main

Returns a new instance of Main.



9
10
11
12
# File 'lib/cp8_cli/main.rb', line 9

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

Instance Method Details

#ci ⇒ Object



26
27
28
# File 'lib/cp8_cli/main.rb', line 26

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

#open ⇒ Object



18
19
20
# File 'lib/cp8_cli/main.rb', line 18

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

#start(name) ⇒ Object



14
15
16
# File 'lib/cp8_cli/main.rb', line 14

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

#submit(options = {}) ⇒ Object



22
23
24
# File 'lib/cp8_cli/main.rb', line 22

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

#suggest ⇒ Object



30
31
32
# File 'lib/cp8_cli/main.rb', line 30

def suggest
  Commands::Suggest.new.run
end