Class: Circler::BrowseCommand
Class Method Summary
collapse
Methods inherited from BaseCommand
build_number, project_name, reponame, setup_token, should_be_pretty
Class Method Details
.run(options) ⇒ Object
6
7
8
9
10
11
|
# File 'lib/circler/command/browse_command.rb', line 6
def run(options)
setup_token
project = project_name(options)
number = options.build
Launchy.open url(project, number)
end
|
.url(project, number) ⇒ Object
13
14
15
16
17
|
# File 'lib/circler/command/browse_command.rb', line 13
def url(project, number)
return "https://circleci.com/gh/#{project}" unless number
"https://circleci.com/gh/#{project}/#{number}"
end
|