Class: Circler::BrowseCommand

Inherits:
BaseCommand show all
Defined in:
lib/circler/command/browse_command.rb

Class Method Summary collapse

Methods inherited from BaseCommand

build_number, project_name, reponame, setup_token

Class Method Details

.run(options) ⇒ Object



4
5
6
7
8
9
# File 'lib/circler/command/browse_command.rb', line 4

def run(options)
  setup_token
  project = project_name(options)
  number = options.build
  Launchy.open url(project, number)
end

.url(project, number) ⇒ Object



11
12
13
14
# File 'lib/circler/command/browse_command.rb', line 11

def url(project, number)
  return "https://circleci.com/gh/#{project}" unless number
  return "https://circleci.com/gh/#{project}/#{number}"
end