public
Rubygem
Description: The official `github` command line helper for simplifying your GitHub experience.
Homepage: http://github.com
Clone URL: git://github.com/defunkt/github-gem.git
Use `start` instead of `open` on Windows.
vertiginous (author)
Thu Apr 24 23:30:09 -0700 2008
commit  07a33928e24a08335dc661b4e2cd31b8e631d158
tree    cfacdcf8d6d244d48abd3e8490d6adb9f44340bb
parent  961d2af0842aaf5f5c78b3e6d53daccef94121a5
...
6
7
8
9
 
10
11
12
13
14
15
16
 
17
18
19
...
6
7
8
 
9
10
11
12
13
14
15
 
16
17
18
19
0
@@ -6,14 +6,14 @@ end
0
 GitHub.describe :home => "Open this repo's master branch in a web browser."
0
 GitHub.register :home do
0
   if helper.project
0
- exec "open #{helper.homepage_for(helper.owner, 'master')}"
0
+ exec "#{helper.open} #{helper.homepage_for(helper.owner, 'master')}"
0
   end
0
 end
0
 
0
 GitHub.describe :browse => "Open this repo in a web browser."
0
 GitHub.register :browse do
0
   if helper.project
0
- exec "open #{helper.homepage_for(helper.branch_user, helper.branch_name)}"
0
+ exec "#{helper.open} #{helper.homepage_for(helper.branch_user, helper.branch_name)}"
0
   end
0
 end
0
 
...
76
77
78
79
80
 
 
 
 
 
 
81
...
76
77
78
 
79
80
81
82
83
84
85
86
0
@@ -76,4 +76,9 @@ end
0
 
0
 GitHub.helper :homepage_for do |user, branch|
0
   "https://github.com/#{user}/#{project}/tree/#{branch}"
0
-end
0
\ No newline at end of file
0
+end
0
+
0
+GitHub.helper :open do
0
+ WINDOZE ? 'start' : 'open'
0
+end
0
+
0
\ No newline at end of file
...
1
 
 
 
2
3
4
...
 
1
2
3
4
5
6
0
@@ -1,4 +1,6 @@
0
-if RUBY_PLATFORM =~ /mswin|mingw/
0
+WINDOZE = RUBY_PLATFORM =~ /mswin|mingw/
0
+
0
+if WINDOZE
0
   begin
0
     require 'win32/open3'
0
   rescue LoadError

Comments

    No one has commented yet.