git-hub 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +5 -0
- data/lib/hub/commands.rb +6 -4
- data/lib/hub/version.rb +1 -1
- data/test/alias_test.rb +1 -1
- data/test/helper.rb +3 -0
- data/test/hub_test.rb +6 -0
- metadata +2 -2
data/HISTORY.md
CHANGED
data/lib/hub/commands.rb
CHANGED
@@ -119,7 +119,9 @@ module Hub
|
|
119
119
|
|
120
120
|
if args.words[-2] == args.words[1]
|
121
121
|
# rtomayko/tilt => rtomayko
|
122
|
-
|
122
|
+
# Make sure you dance around flags.
|
123
|
+
idx = args.index( args.words[-1] )
|
124
|
+
args[idx] = user
|
123
125
|
else
|
124
126
|
# They're specifying the remote name manually (e.g.
|
125
127
|
# git remote add blah rtomayko/tilt), so just drop the last
|
@@ -129,7 +131,7 @@ module Hub
|
|
129
131
|
|
130
132
|
args << url % [ user, repo ]
|
131
133
|
elsif args.last !~ /:|\//
|
132
|
-
if args[2] == 'origin' && args[3].nil?
|
134
|
+
if args.words[2] == 'origin' && args.words[3].nil?
|
133
135
|
# Origin special case.
|
134
136
|
user = github_user
|
135
137
|
else
|
@@ -137,7 +139,7 @@ module Hub
|
|
137
139
|
user = args.last
|
138
140
|
end
|
139
141
|
|
140
|
-
if args[-2] != args[1]
|
142
|
+
if args.words[-2] != args.words[1]
|
141
143
|
# They're specifying the remote name manually (e.g.
|
142
144
|
# git remote add blah rtomayko), so just drop the last
|
143
145
|
# argument.
|
@@ -238,7 +240,7 @@ module Hub
|
|
238
240
|
shells = {
|
239
241
|
'sh' => 'alias git=hub',
|
240
242
|
'bash' => 'alias git=hub',
|
241
|
-
'zsh' => 'function git(){hub $@}',
|
243
|
+
'zsh' => 'function git(){hub "$@"}',
|
242
244
|
'csh' => 'alias git hub',
|
243
245
|
'fish' => 'alias git hub'
|
244
246
|
}
|
data/lib/hub/version.rb
CHANGED
data/test/alias_test.rb
CHANGED
data/test/helper.rb
CHANGED
@@ -3,6 +3,9 @@ $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
|
3
3
|
require 'hub'
|
4
4
|
require 'hub/standalone'
|
5
5
|
|
6
|
+
# We're looking for `open` in the tests.
|
7
|
+
ENV['BROWSER'] = 'open'
|
8
|
+
|
6
9
|
class Test::Unit::TestCase
|
7
10
|
# Shortcut for creating a `Hub` instance. Pass it what you would
|
8
11
|
# normally pass `hub` on the command line, e.g.
|
data/test/hub_test.rb
CHANGED
@@ -117,6 +117,12 @@ class HubTest < Test::Unit::TestCase
|
|
117
117
|
assert_command input, command
|
118
118
|
end
|
119
119
|
|
120
|
+
def test_public_remote_f
|
121
|
+
input = "remote add -f rtomayko"
|
122
|
+
command = "git remote add -f rtomayko git://github.com/rtomayko/hub.git"
|
123
|
+
assert_command input, command
|
124
|
+
end
|
125
|
+
|
120
126
|
def test_named_public_remote
|
121
127
|
input = "remote add origin rtomayko"
|
122
128
|
command = "git remote add origin git://github.com/rtomayko/hub.git"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-hub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Wanstrath
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-07 00:00:00 -08:00
|
13
13
|
default_executable: hub
|
14
14
|
dependencies: []
|
15
15
|
|