Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
github
hub
提交
8d87891a
H
hub
项目概览
github
/
hub
12 个月 前同步成功
通知
3
Star
22523
Fork
2406
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hub
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8d87891a
编写于
1月 23, 2010
作者:
C
Chris Wanstrath
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add `hub standalone` for installation of standalone via RubyGems
上级
fd63f9b4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
0 deletion
+27
-0
README.md
README.md
+8
-0
lib/hub/commands.rb
lib/hub/commands.rb
+14
-0
test/hub_test.rb
test/hub_test.rb
+5
-0
未找到文件。
README.md
浏览文件 @
8d87891a
...
...
@@ -60,6 +60,14 @@ Though not recommended, `hub` can also be installed as a RubyGem:
(It's not recommended because of the RubyGems startup time. See
[
this
gist
][
speed
]
for information.)
### Standalone via RubyGems
Yes, the gem name is still
`git-hub`
:
$ gem install git-hub
$ hub hub standalone > ~/bin/hub && chmod 755 ~/bin/hub
$ gem uninstall git-hub
### Source
You can also install from source:
...
...
lib/hub/commands.rb
浏览文件 @
8d87891a
...
...
@@ -161,6 +161,20 @@ module Hub
exec
"
#{
browser
}
#{
protocol
}
://github.com/
#{
user
}
/
#{
repo
}
"
end
# $ hub hub standalone
# Prints the "standalone" version of hub for an easy, memorable
# installation sequence:
#
# $ gem install git-hub
# $ hub standalone > ~/bin/standalone
# $ gem uninstall git-hub
def
hub
(
args
)
return
help
(
args
)
unless
args
[
1
]
==
'standalone'
require
'hub/standalone'
puts
Hub
::
Standalone
.
build
exit
end
def
alias
(
args
)
shells
=
{
'sh'
=>
'alias git=hub'
,
...
...
test/hub_test.rb
浏览文件 @
8d87891a
...
...
@@ -147,6 +147,11 @@ config
assert_equal
"** Can't find groff(1)
\n
"
,
help_manpage
end
def
test_hub_standalone
help_standalone
=
hub
(
"hub standalone"
)
assert_equal
Hub
::
Standalone
.
build
,
help_standalone
end
def
test_hub_open
input
=
"browse mojombo/bert"
command
=
"http://github.com/mojombo/bert
\n
"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录