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.



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

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

#ciObject



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

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

#cleanupObject



35
36
37
# File 'lib/cp8_cli/main.rb', line 35

def cleanup
  Commands::Cleanup.new.run
end

#openObject



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

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

#start(name) ⇒ Object



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

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

#submit(options = {}) ⇒ Object



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

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

#suggestObject



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

def suggest
  Commands::Suggest.new.run
end