Class: GithubLaunch
- Inherits:
-
Thor
- Object
- Thor
- GithubLaunch
- Defined in:
- lib/githublaunch.rb
Constant Summary collapse
- VERSION =
"0.1.4"
Instance Method Summary collapse
- #branch(b = nil) ⇒ Object
- #branches ⇒ Object
- #commits(b = nil) ⇒ Object
- #compare(base, head = nil) ⇒ Object
- #network ⇒ Object
- #pull(base, head = nil) ⇒ Object
- #pulls ⇒ Object
- #show(sha = nil) ⇒ Object
- #version ⇒ Object
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 |
#branches ⇒ Object
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 |
#network ⇒ Object
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 |
#pulls ⇒ Object
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 |
#version ⇒ Object
43 |
# File 'lib/githublaunch.rb', line 43 def version; puts VERSION; end |