Class: GithubLaunch

Inherits:
Thor
  • Object
show all
Defined in:
lib/githublaunch.rb,
lib/githublaunch/version.rb

Constant Summary collapse

VERSION =
"0.1.1"

Instance Method Summary collapse

Instance Method Details

#branch(b = nil) ⇒ Object



17
18
19
# File 'lib/githublaunch.rb', line 17

def branch(b=nil)
  launch "/tree/#{b || repo.head.name}"
end

#branchesObject



11
# File 'lib/githublaunch.rb', line 11

def branches; launch "/branches"; end

#commits(b = nil) ⇒ Object



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

def commits(b=nil)
  launch "/commits/#{b || repo.head.name}"
end

#compare(base, head = nil) ⇒ Object



27
28
29
30
31
32
33
34
# File 'lib/githublaunch.rb', line 27

def compare(base, head=nil)
  if head.nil?
    head = base
    base = repo.head.name
  end

  launch "/compare/#{base}...#{head}"
end

#networkObject



8
# File 'lib/githublaunch.rb', line 8

def network; launch "/network"; end

#pull(base, head = nil) ⇒ Object



42
43
44
# File 'lib/githublaunch.rb', line 42

def pull(base, head=nil)
  launch "/pull/new/#{base}...#{head || repo.head.name}"
end

#pullsObject



14
# File 'lib/githublaunch.rb', line 14

def pulls; launch "/pulls"; end

#show(sha = nil) ⇒ Object



37
38
39
# File 'lib/githublaunch.rb', line 37

def show(sha=nil)
  launch "/commit/#{sha || repo.head.commit.sha}"
end