git-hub 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +60 -12
- data/Rakefile +72 -79
- data/lib/hub/commands.rb +134 -73
- data/lib/hub/context.rb +112 -0
- data/lib/hub/version.rb +1 -1
- data/lib/hub.rb +1 -0
- data/man/hub.1 +99 -92
- data/man/hub.1.html +68 -67
- data/man/{hub.1.ron → hub.1.ronn} +52 -25
- data/test/fakebin/git +7 -0
- data/test/fakebin/open +3 -0
- data/test/helper.rb +4 -0
- data/test/hub_test.rb +237 -37
- metadata +27 -25
- data/.gitignore +0 -2
- data/.kick +0 -26
- data/CONTRIBUTORS +0 -11
- data/HISTORY.md +0 -75
data/man/hub.1.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta http-equiv='content-type' value='text/html;charset=utf8'>
|
5
|
-
<meta name='generator' value='
|
5
|
+
<meta name='generator' value='Ronn/v0.5'>
|
6
6
|
<title>hub(1) -- git + hub = github</title>
|
7
7
|
<style type='text/css'>
|
8
8
|
body {margin:0}
|
@@ -64,18 +64,20 @@
|
|
64
64
|
|
65
65
|
<h2 id='NAME'>NAME</h2>
|
66
66
|
<p><code>hub</code> -- git + hub = github</p>
|
67
|
+
|
67
68
|
<h2>SYNOPSIS</h2>
|
68
69
|
|
69
|
-
<p><code>hub</code> <var>COMMAND</var> <var>OPTIONS</var
|
70
|
+
<p><code>hub</code> <var>COMMAND</var> <var>OPTIONS</var><br />
|
70
71
|
<code>hub alias</code> [<code>-s</code>] <var>SHELL</var></p>
|
71
72
|
|
72
|
-
<p><code>git init -g</code> <var>OPTIONS</var><br
|
73
|
-
<code>git clone</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var><br
|
74
|
-
<code>git remote add</code> [<code>-p</code>] <var>OPTIONS</var> <var>USER</var>[/<var>REPOSITORY</var>]<br
|
75
|
-
<code>git push</code> <var>REMOTE-1</var>,<var>REMOTE-2</var>,...,<var>REMOTE-N</var> <var>REF</var><br
|
76
|
-
<code>git
|
77
|
-
<code>git
|
78
|
-
<code>git submodule add</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var
|
73
|
+
<p><code>git init -g</code> <var>OPTIONS</var><br />
|
74
|
+
<code>git clone</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var><br />
|
75
|
+
<code>git remote add</code> [<code>-p</code>] <var>OPTIONS</var> <var>USER</var>[/<var>REPOSITORY</var>]<br />
|
76
|
+
<code>git push</code> <var>REMOTE-1</var>,<var>REMOTE-2</var>,...,<var>REMOTE-N</var> <var>REF</var><br />
|
77
|
+
<code>git browse</code> [<code>-p</code>] [<code>-u</code>] [[<var>USER</var><code>/</code>]<var>REPOSITORY</var>] [SUBPAGE]<br />
|
78
|
+
<code>git compare</code> [<code>-p</code>] [<code>-u</code>] [<var>USER</var>] [<var>START</var>...]<var>END</var><br />
|
79
|
+
<code>git submodule add</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var><br />
|
80
|
+
<code>git fork</code> [<code>--no-remote</code>]</p>
|
79
81
|
|
80
82
|
<h2>DESCRIPTION</h2>
|
81
83
|
|
@@ -83,68 +85,42 @@
|
|
83
85
|
alias command displays information on configuring your environment:</p>
|
84
86
|
|
85
87
|
<dl>
|
86
|
-
<dt>
|
87
|
-
<code>hub alias</code> [<code>-s</code>] <var>SHELL</var>:<br>
|
88
|
-
Writes shell aliasing code for <var>SHELL</var> (<code>bash</code>, <code>sh</code>, <code>zsh</code>,
|
88
|
+
<dt><code>hub alias</code> [<code>-s</code>] <var>SHELL</var></dt><dd><p>Writes shell aliasing code for <var>SHELL</var> (<code>bash</code>, <code>sh</code>, <code>zsh</code>,
|
89
89
|
<code>csh</code>) to standard output. With the <code>-s</code> option, the output of
|
90
|
-
this command can be evaluated directly within the shell
|
91
|
-
<
|
92
|
-
<dt>
|
93
|
-
|
94
|
-
|
95
|
-
"git
|
96
|
-
<var>REPOSITORY</var> is the current working directory's basename.</dt>
|
97
|
-
<dd><p></p></dd>
|
98
|
-
<dt>
|
99
|
-
<code>git clone</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var><code>/</code>]<var>REPOSITORY</var> <var>DIRECTORY</var>:<br>
|
100
|
-
Clone repository "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" into
|
90
|
+
this command can be evaluated directly within the shell:<br />
|
91
|
+
<code>eval $(hub alias -s bash)</code></p></dd>
|
92
|
+
<dt><code>git init</code> <code>-g</code> <var>OPTIONS</var></dt><dd><p>Create a git repository as with git-init(1) and add remote <code>origin</code> at
|
93
|
+
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git"; <var>USER</var> is your GitHub username and
|
94
|
+
<var>REPOSITORY</var> is the current working directory's basename.</p></dd>
|
95
|
+
<dt><code>git clone</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var><code>/</code>]<var>REPOSITORY</var> <var>DIRECTORY</var></dt><dd><p>Clone repository "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" into
|
101
96
|
<var>DIRECTORY</var> as with git-clone(1). When <var>USER</var>/ is omitted, assumes
|
102
97
|
your GitHub login. With <code>-p</code>, use private remote
|
103
|
-
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git".</
|
104
|
-
<dd><p
|
105
|
-
<dt>
|
106
|
-
<code>git remote add</code> [<code>-p</code>] <var>OPTIONS</var> <var>USER</var>[<code>/</code><var>REPOSITORY</var>]:<br>
|
107
|
-
Add remote "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" as with
|
98
|
+
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git".</p></dd>
|
99
|
+
<dt><code>git remote add</code> [<code>-p</code>] <var>OPTIONS</var> <var>USER</var>[<code>/</code><var>REPOSITORY</var>]</dt><dd><p>Add remote "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" as with
|
108
100
|
git-remote(1). When /<var>REPOSITORY</var> is omitted, the basename of the
|
109
101
|
current working directory is used. With <code>-p</code>, use private remote
|
110
102
|
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git". If <var>USER</var> is "origin"
|
111
|
-
then uses your GitHub login.</
|
112
|
-
<dd><p
|
113
|
-
<
|
114
|
-
<code>git
|
115
|
-
Push <var>REF</var> to each of <var>REMOTE-1</var> through <var>REMOTE-N</var> by executing
|
116
|
-
multiple <code>git push</code> commands.</dt>
|
117
|
-
<dd><p></p></dd>
|
118
|
-
<dt>
|
119
|
-
<code>git fork</code>:<br>
|
120
|
-
Forks the original repo on GitHub and adds the new remote under your
|
121
|
-
username. It requires your GitHub login and token to be present. See
|
122
|
-
CONFIGURATION below.</dt>
|
123
|
-
<dd><p></p></dd>
|
124
|
-
<dt>
|
125
|
-
<code>git browse</code> [<code>-p</code>] [[<var>USER</var><code>/</code>]<var>REPOSITORY</var>]:<br>
|
126
|
-
Open repository's GitHub page in the system's default web browser
|
103
|
+
then uses your GitHub login.</p></dd>
|
104
|
+
<dt><code>git push</code> <var>REMOTE-1</var>,<var>REMOTE-2</var>,...,<var>REMOTE-N</var> <var>REF</var></dt><dd><p>Push <var>REF</var> to each of <var>REMOTE-1</var> through <var>REMOTE-N</var> by executing
|
105
|
+
multiple <code>git push</code> commands.</p></dd>
|
106
|
+
<dt><code>git browse</code> [<code>-p</code>] [<code>-u</code>] [[<var>USER</var><code>/</code>]<var>REPOSITORY</var>] [SUBPAGE]</dt><dd><p>Open repository's GitHub page in the system's default web browser
|
127
107
|
using <code>open(1)</code> or the <code>BROWSER</code> env variable. Use <code>-p</code> to open a
|
128
108
|
page with https. If the repository isn't specified, <code>browse</code> opens
|
129
|
-
the page of the repository found in the current directory
|
130
|
-
|
131
|
-
|
132
|
-
<code>git
|
133
|
-
|
109
|
+
the page of the repository found in the current directory. If SUBPAGE
|
110
|
+
is specified, the browser will open on the specified subpage: one of
|
111
|
+
"wiki", "commits", "issues" or other (the default is "tree").</p></dd>
|
112
|
+
<dt><code>git compare</code> [<code>-p</code>] [<code>-u</code>] [<var>USER</var>] [<var>START</var>...]<var>END</var></dt><dd><p>Open a GitHub compare view page in the system's default web browser.
|
113
|
+
<var>START</var> to <var>END</var> are branch names, tag names, or commit SHA1s specifying
|
114
|
+
the range of history to compare. If <var>START</var> is omitted, GitHub will
|
115
|
+
compare against the base branch (the default is "master").</p></dd>
|
116
|
+
<dt><code>git submodule add</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var></dt><dd><p>Submodule repository "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" into
|
134
117
|
<var>DIRECTORY</var> as with git-submodule(1). When <var>USER</var>/ is omitted, assumes
|
135
118
|
your GitHub login. With <code>-p</code>, use private remote
|
136
|
-
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git".</
|
137
|
-
<dd><p
|
138
|
-
<
|
139
|
-
|
140
|
-
|
141
|
-
and adds a new remote named <var>USER</var> referencing the newly created repo.
|
142
|
-
Requires <code>github.token</code> to be set (see CONFIGURATION).</dt>
|
143
|
-
<dd><p></p></dd>
|
144
|
-
<dt>
|
145
|
-
<code>git help</code>:<br>
|
146
|
-
Display enhanced git-help(1).</dt>
|
147
|
-
<dd><p></p></dd>
|
119
|
+
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git".</p></dd>
|
120
|
+
<dt><code>git fork</code> [<code>--no-remote</code>]</dt><dd><p>Forks the original project (referenced by "origin" remote) on GitHub and
|
121
|
+
adds a new remote for it under your username. Requires <code>github.token</code> to
|
122
|
+
be set (see CONFIGURATION).</p></dd>
|
123
|
+
<dt><code>git help</code></dt><dd><p>Display enhanced git-help(1).</p></dd>
|
148
124
|
</dl>
|
149
125
|
|
150
126
|
|
@@ -157,8 +133,8 @@ Display enhanced git-help(1).</dt>
|
|
157
133
|
|
158
134
|
<p>Or, set the GitHub username and token with:</p>
|
159
135
|
|
160
|
-
<pre><code>$ git config --global github.user <username
|
161
|
-
$ git config --global github.token <token
|
136
|
+
<pre><code>$ git config --global github.user <username>
|
137
|
+
$ git config --global github.token <token>
|
162
138
|
</code></pre>
|
163
139
|
|
164
140
|
<p>See <a href="http://github.com/guides/local-github-config">http://github.com/guides/local-github-config</a> for more
|
@@ -167,7 +143,7 @@ information.</p>
|
|
167
143
|
<p>You can also tell <code>hub</code> to use <code>http://</code> rather than <code>git://</code> when
|
168
144
|
cloning:</p>
|
169
145
|
|
170
|
-
<pre><code>$ git config --global --
|
146
|
+
<pre><code>$ git config --global --bool hub.http-clone true
|
171
147
|
</code></pre>
|
172
148
|
|
173
149
|
<h2>EXAMPLES</h2>
|
@@ -223,17 +199,41 @@ $ git remote add origin
|
|
223
199
|
|
224
200
|
<h3>git browse</h3>
|
225
201
|
|
226
|
-
<pre><code>$ git browse
|
202
|
+
<pre><code>$ git browse
|
203
|
+
> open http://github.com/CURRENT_REPO
|
204
|
+
|
205
|
+
$ git browse -- issues
|
206
|
+
> open http://github.com/CURRENT_REPO/issues
|
207
|
+
|
208
|
+
$ git browse schacon/ticgit
|
227
209
|
> open http://github.com/schacon/ticgit
|
228
210
|
|
229
211
|
$ git browse -p schacon/ticgit
|
230
|
-
> open
|
212
|
+
> open https://github.com/schacon/ticgit
|
231
213
|
|
232
214
|
$ git browse resque
|
233
215
|
> open http://github.com/YOUR_USER/resque
|
234
216
|
|
217
|
+
$ git browse resque network
|
218
|
+
> open http://github.com/YOUR_USER/resque/network
|
219
|
+
|
235
220
|
$ git browse -p resque
|
236
|
-
> open https://github.com
|
221
|
+
> open https://github.com/YOUR_USER/resque
|
222
|
+
</code></pre>
|
223
|
+
|
224
|
+
<h3>git compare</h3>
|
225
|
+
|
226
|
+
<pre><code>$ git compare refactor
|
227
|
+
> open http://github.com/CURRENT_REPO/compare/refactor
|
228
|
+
|
229
|
+
$ git compare 1.0...1.1
|
230
|
+
> open http://github.com/CURRENT_REPO/compare/1.0...1.1
|
231
|
+
|
232
|
+
$ git compare -u fix
|
233
|
+
> (http://github.com/CURRENT_REPO/compare/fix)
|
234
|
+
|
235
|
+
$ git compare other-user patch
|
236
|
+
> open http://github.com/other-user/REPO/compare/patch
|
237
237
|
</code></pre>
|
238
238
|
|
239
239
|
<h3>git help</h3>
|
@@ -258,6 +258,7 @@ $ git help hub
|
|
258
258
|
<a href="http://github.com">http://github.com</a>,
|
259
259
|
<a href="http://github.com/defunkt/hub">http://github.com/defunkt/hub</a></p>
|
260
260
|
|
261
|
+
|
261
262
|
<ol class='foot man'>
|
262
263
|
<li class='tl'>DEFUNKT</li>
|
263
264
|
<li class='tc'>April 2010</li>
|
@@ -3,73 +3,77 @@ hub(1) -- git + hub = github
|
|
3
3
|
|
4
4
|
## SYNOPSIS
|
5
5
|
|
6
|
-
`hub` <COMMAND> <OPTIONS>
|
6
|
+
`hub` <COMMAND> <OPTIONS>
|
7
7
|
`hub alias` [`-s`] <SHELL>
|
8
8
|
|
9
9
|
`git init -g` <OPTIONS>
|
10
10
|
`git clone` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>
|
11
11
|
`git remote add` [`-p`] <OPTIONS> <USER>[/<REPOSITORY>]
|
12
12
|
`git push` <REMOTE-1>,<REMOTE-2>,...,<REMOTE-N> <REF>
|
13
|
-
`git
|
14
|
-
`git
|
13
|
+
`git browse` [`-p`] [`-u`] [[<USER>`/`]<REPOSITORY>] [SUBPAGE]
|
14
|
+
`git compare` [`-p`] [`-u`] [<USER>] [<START>...]<END>
|
15
15
|
`git submodule add` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>
|
16
|
+
`git fork` [`--no-remote`]
|
16
17
|
|
17
18
|
## DESCRIPTION
|
18
19
|
|
19
20
|
`hub` enhances various `git` commands with GitHub remote expansion. The
|
20
21
|
alias command displays information on configuring your environment:
|
21
22
|
|
22
|
-
* `hub alias` [`-s`] <SHELL>:
|
23
|
+
* `hub alias` [`-s`] <SHELL>:
|
23
24
|
Writes shell aliasing code for <SHELL> (`bash`, `sh`, `zsh`,
|
24
25
|
`csh`) to standard output. With the `-s` option, the output of
|
25
|
-
this command can be evaluated directly within the shell:
|
26
|
+
this command can be evaluated directly within the shell:
|
26
27
|
`eval $(hub alias -s bash)`
|
27
28
|
|
28
|
-
|
29
|
+
* `git init` `-g` <OPTIONS>:
|
29
30
|
Create a git repository as with git-init(1) and add remote `origin` at
|
30
31
|
"git@github.com:<USER>/<REPOSITORY>.git"; <USER> is your GitHub username and
|
31
32
|
<REPOSITORY> is the current working directory's basename.
|
32
33
|
|
33
|
-
* `git clone` [`-p`] <OPTIONS> [<USER>`/`]<REPOSITORY> <DIRECTORY>:
|
34
|
+
* `git clone` [`-p`] <OPTIONS> [<USER>`/`]<REPOSITORY> <DIRECTORY>:
|
34
35
|
Clone repository "git://github.com/<USER>/<REPOSITORY>.git" into
|
35
36
|
<DIRECTORY> as with git-clone(1). When <USER>/ is omitted, assumes
|
36
37
|
your GitHub login. With `-p`, use private remote
|
37
38
|
"git@github.com:<USER>/<REPOSITORY>.git".
|
38
39
|
|
39
|
-
* `git remote add` [`-p`] <OPTIONS> <USER>[`/`<REPOSITORY>]:
|
40
|
+
* `git remote add` [`-p`] <OPTIONS> <USER>[`/`<REPOSITORY>]:
|
40
41
|
Add remote "git://github.com/<USER>/<REPOSITORY>.git" as with
|
41
42
|
git-remote(1). When /<REPOSITORY> is omitted, the basename of the
|
42
43
|
current working directory is used. With `-p`, use private remote
|
43
44
|
"git@github.com:<USER>/<REPOSITORY>.git". If <USER> is "origin"
|
44
45
|
then uses your GitHub login.
|
45
46
|
|
46
|
-
* `git push` <REMOTE-1>,<REMOTE-2>,...,<REMOTE-N> <REF>:
|
47
|
+
* `git push` <REMOTE-1>,<REMOTE-2>,...,<REMOTE-N> <REF>:
|
47
48
|
Push <REF> to each of <REMOTE-1> through <REMOTE-N> by executing
|
48
49
|
multiple `git push` commands.
|
49
50
|
|
50
|
-
* `git
|
51
|
-
Forks the original repo on GitHub and adds the new remote under your
|
52
|
-
username. It requires your GitHub login and token to be present. See
|
53
|
-
CONFIGURATION below.
|
54
|
-
|
55
|
-
* `git browse` [`-p`] [[<USER>`/`]<REPOSITORY>]:
|
51
|
+
* `git browse` [`-p`] [`-u`] [[<USER>`/`]<REPOSITORY>] [SUBPAGE]:
|
56
52
|
Open repository's GitHub page in the system's default web browser
|
57
53
|
using `open(1)` or the `BROWSER` env variable. Use `-p` to open a
|
58
54
|
page with https. If the repository isn't specified, `browse` opens
|
59
|
-
the page of the repository found in the current directory.
|
55
|
+
the page of the repository found in the current directory. If SUBPAGE
|
56
|
+
is specified, the browser will open on the specified subpage: one of
|
57
|
+
"wiki", "commits", "issues" or other (the default is "tree").
|
58
|
+
|
59
|
+
* `git compare` [`-p`] [`-u`] [<USER>] [<START>...]<END>:
|
60
|
+
Open a GitHub compare view page in the system's default web browser.
|
61
|
+
<START> to <END> are branch names, tag names, or commit SHA1s specifying
|
62
|
+
the range of history to compare. If <START> is omitted, GitHub will
|
63
|
+
compare against the base branch (the default is "master").
|
60
64
|
|
61
|
-
* `git submodule add` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>:
|
65
|
+
* `git submodule add` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>:
|
62
66
|
Submodule repository "git://github.com/<USER>/<REPOSITORY>.git" into
|
63
67
|
<DIRECTORY> as with git-submodule(1). When <USER>/ is omitted, assumes
|
64
68
|
your GitHub login. With `-p`, use private remote
|
65
69
|
"git@github.com:<USER>/<REPOSITORY>.git".
|
66
70
|
|
67
|
-
* `git fork` [`--no-remote`]:
|
68
|
-
Forks the original project (
|
69
|
-
|
70
|
-
|
71
|
+
* `git fork` [`--no-remote`]:
|
72
|
+
Forks the original project (referenced by "origin" remote) on GitHub and
|
73
|
+
adds a new remote for it under your username. Requires `github.token` to
|
74
|
+
be set (see CONFIGURATION).
|
71
75
|
|
72
|
-
* `git help`:
|
76
|
+
* `git help`:
|
73
77
|
Display enhanced git-help(1).
|
74
78
|
|
75
79
|
## CONFIGURATION
|
@@ -89,7 +93,7 @@ information.
|
|
89
93
|
You can also tell `hub` to use `http://` rather than `git://` when
|
90
94
|
cloning:
|
91
95
|
|
92
|
-
$ git config --global --
|
96
|
+
$ git config --global --bool hub.http-clone true
|
93
97
|
|
94
98
|
## EXAMPLES
|
95
99
|
|
@@ -139,17 +143,40 @@ cloning:
|
|
139
143
|
|
140
144
|
### git browse
|
141
145
|
|
146
|
+
$ git browse
|
147
|
+
> open http://github.com/CURRENT_REPO
|
148
|
+
|
149
|
+
$ git browse -- issues
|
150
|
+
> open http://github.com/CURRENT_REPO/issues
|
151
|
+
|
142
152
|
$ git browse schacon/ticgit
|
143
153
|
> open http://github.com/schacon/ticgit
|
144
154
|
|
145
155
|
$ git browse -p schacon/ticgit
|
146
|
-
> open
|
156
|
+
> open https://github.com/schacon/ticgit
|
147
157
|
|
148
158
|
$ git browse resque
|
149
159
|
> open http://github.com/YOUR_USER/resque
|
150
160
|
|
161
|
+
$ git browse resque network
|
162
|
+
> open http://github.com/YOUR_USER/resque/network
|
163
|
+
|
151
164
|
$ git browse -p resque
|
152
|
-
> open https://github.com
|
165
|
+
> open https://github.com/YOUR_USER/resque
|
166
|
+
|
167
|
+
### git compare
|
168
|
+
|
169
|
+
$ git compare refactor
|
170
|
+
> open http://github.com/CURRENT_REPO/compare/refactor
|
171
|
+
|
172
|
+
$ git compare 1.0...1.1
|
173
|
+
> open http://github.com/CURRENT_REPO/compare/1.0...1.1
|
174
|
+
|
175
|
+
$ git compare -u fix
|
176
|
+
> (http://github.com/CURRENT_REPO/compare/fix)
|
177
|
+
|
178
|
+
$ git compare other-user patch
|
179
|
+
> open http://github.com/other-user/REPO/compare/patch
|
153
180
|
|
154
181
|
### git help
|
155
182
|
|
data/test/fakebin/git
ADDED
data/test/fakebin/open
ADDED
data/test/helper.rb
CHANGED
@@ -12,6 +12,10 @@ require 'hub/standalone'
|
|
12
12
|
# We're looking for `open` in the tests.
|
13
13
|
ENV['BROWSER'] = 'open'
|
14
14
|
|
15
|
+
# Setup path with fake executables in case a test hits them
|
16
|
+
fakebin_dir = File.expand_path('../fakebin', __FILE__)
|
17
|
+
ENV['PATH'] = "#{fakebin_dir}:#{ENV['PATH']}"
|
18
|
+
|
15
19
|
class Test::Unit::TestCase
|
16
20
|
# Shortcut for creating a `Hub` instance. Pass it what you would
|
17
21
|
# normally pass `hub` on the command line, e.g.
|