public
Rubygem
Fork of defunkt/github-gem
Description: The official `github` command line helper for simplifying your GitHub experience.
Homepage: http://github.com
Clone URL: git://github.com/rubyist/github-gem.git
Added a bunch of specs and fixed lots of bugs
halorgium (author)
Sat Mar 01 07:24:08 -0800 2008
commit  ce5a65276a3dafc97bdedc435f119a672ae57e72
tree    ec8f58dc871ee8699b2423441841a0c1bf0e6921
parent  082707661553f7ef17411e02d5257617d579f9b6
...
1
2
3
 
 
...
1
2
3
4
5
0
@@ -1,3 +1,5 @@
0
 #!/usr/bin/env ruby
0
 
0
 require File.dirname(__FILE__) + '/../lib/github'
0
+
0
+GitHub.activate ARGV
...
1
 
2
3
4
5
6
7
8
9
 
 
10
11
12
13
 
 
 
 
 
14
15
16
17
 
18
19
20
...
24
25
26
27
 
28
29
30
...
 
1
2
3
4
5
6
7
 
 
8
9
10
11
12
 
13
14
15
16
17
18
19
20
 
21
22
23
24
...
28
29
30
 
31
32
33
34
0
@@ -1,20 +1,24 @@
0
-GitHub.helper :user_and_project_from do |url|
0
+GitHub.helper :user_and_repo_from do |url|
0
   case url
0
   when %r|^git://github\.com/(.*)$|: $1.split('/')
0
   when %r|^git@github\.com:(.*)$|: $1.split('/')
0
   end
0
 end
0
 
0
-GitHub.helper :user_and_project_for do |remote|
0
- user_and_project_from(url_for(remote))
0
+GitHub.helper :user_and_repo_for do |remote|
0
+ user_and_repo_from(url_for(remote))
0
 end
0
 
0
 GitHub.helper :user_for do |remote|
0
- user_and_project_for(remote).first
0
+ user_and_repo_for(remote).first
0
+end
0
+
0
+GitHub.helper :repo_for do |remote|
0
+ user_and_repo_for(remote).last
0
 end
0
 
0
 GitHub.helper :project do
0
- user_and_project_for(:origin).last.chomp('.git')
0
+ repo_for(:origin).chomp('.git')
0
 end
0
 
0
 GitHub.helper :url_for do |remote|
0
@@ -24,7 +28,7 @@ end
0
 GitHub.helper :following do
0
   `git config --get-regexp '^remote\..+\.url$'`.split(/\n/).map do |line|
0
     _, url = line.split(/ /, 2)
0
- user_and_project_from(url).first
0
+ user_and_repo_from(url).first
0
   end
0
 end
0
 
...
70
71
72
73
74
...
70
71
72
 
 
0
@@ -70,5 +70,3 @@ GitHub.register :default do
0
   end
0
   puts
0
 end
0
-
0
-GitHub.activate ARGV

Comments

    No one has commented yet.