Class: GithubLaunch

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

Constant Summary collapse

VERSION =
"0.1.4"

Instance Method Summary collapse

Instance Method Details

#branch(b = nil) ⇒ Object



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

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

#branchesObject



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

def branches; launch "/branches"; end

#commits(b = nil) ⇒ Object



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

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

#compare(base, head = nil) ⇒ Object



28
29
30
# File 'lib/githublaunch.rb', line 28

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

#networkObject



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

def network; launch "/network"; end

#pull(base, head = nil) ⇒ Object



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

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

#pullsObject



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

def pulls; launch "/pulls"; end

#show(sha = nil) ⇒ Object



33
34
35
# File 'lib/githublaunch.rb', line 33

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

#versionObject



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

def version; puts VERSION; end