Class: Vpr::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/vpr/cli.rb

Instance Method Summary collapse

Constructor Details

#initialize(args = [], local_options = {}, config = {}) ⇒ CLI

Returns a new instance of CLI.



9
10
11
12
13
# File 'lib/vpr/cli.rb', line 9

def initialize(args = [], local_options = {}, config = {})
  super
  select_remote
  @url = Url.new
end

Instance Method Details

#branchObject



39
40
41
# File 'lib/vpr/cli.rb', line 39

def branch
  Launchy.open(url.branch_url)
end

#branchesObject



34
35
36
# File 'lib/vpr/cli.rb', line 34

def branches
  Launchy.open(url.branches_url)
end

#homeObject



19
20
21
# File 'lib/vpr/cli.rb', line 19

def home
  Launchy.open(url.home_url)
end

#issuesObject



29
30
31
# File 'lib/vpr/cli.rb', line 29

def issues
  Launchy.open(url.issues_url)
end

#pull(branch = nil) ⇒ Object



50
51
52
# File 'lib/vpr/cli.rb', line 50

def pull(branch = nil)
  Launchy.open(url.pull_url(branch))
end

#pullsObject



24
25
26
# File 'lib/vpr/cli.rb', line 24

def pulls
  Launchy.open(url.pulls_url)
end

#search(commit) ⇒ Object



60
61
62
# File 'lib/vpr/cli.rb', line 60

def search(commit)
  Launchy.open(url.search_url(commit))
end

#versionObject



65
66
67
# File 'lib/vpr/cli.rb', line 65

def version
  puts Vpr::VERSION
end

#visit(commit) ⇒ Object



55
56
57
# File 'lib/vpr/cli.rb', line 55

def visit(commit)
  Launchy.open(url.commit_url(commit))
end