Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
github
hub
提交
871faf9c
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,发现更多精彩内容 >>
提交
871faf9c
编写于
12月 08, 2009
作者:
C
Chris Wanstrath
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rake and readme updates
上级
4780ede0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
40 deletion
+27
-40
README.md
README.md
+13
-15
Rakefile
Rakefile
+13
-25
lib/hub/standalone.rb
lib/hub/standalone.rb
+1
-0
未找到文件。
README.md
浏览文件 @
871faf9c
hub: git + hub = github
=======================
`hub`
is a command line utility which injects
`git`
with GitHub
knowledge.
`hub`
is a command line utility which adds GitHub knowledge to
`git`
.
It can used on its own or can serve as a complete, backwards
compatible replacement for the
`git`
script.
It can used on its own or as a
`git`
wrapper.
Normal:
...
...
@@ -17,7 +15,7 @@ Normal:
Receiving objects: 100% (307/307), 48.91 KiB, done.
Resolving deltas: 100% (175/175), done.
Aliased
:
Wrapping
`git`
:
$ git clone rack/rack
Initialized empty Git repository in /Users/chris/sandbox/rack/.git/
...
...
@@ -33,22 +31,21 @@ Install
### Standalone
`hub`
can be installed most easily as a stand
alone script:
`hub`
can be installed most easily as a standalone script:
curl http://defunkt.github.com/hub/standalone > ~/bin/hub && chmod 0755 !$
If ~/bin/hub is in your path, you're ready to roll!
Assuming
`~/bin/`
is in your path, you're ready to roll:
### Rubygem
$ hub version
git version 1.6.4.2
hub version 0.1.0
It also can be installed using Rubygems:
### Rubygems
$ gem install hub -s http://gemcutter.org/
Once you have the gem installed you will probably want to install the
standalone script, to avoid the Rubygems startup tax:
Though not recommended,
`hub`
can also be installed as a Rubygem:
$
hub install standalone
$
gem install hub -s http://gemcutter.org/
### Source
...
...
@@ -56,7 +53,8 @@ You can also install from source:
$ git clone git://github.com/defunkt/hub.git
$ cd hub
$ rake install_standalone
$ rake standalone
$ cp hub /usr/local/bin/
Aliasing
...
...
Rakefile
浏览文件 @
871faf9c
...
...
@@ -17,21 +17,14 @@ end
desc
"Build a gem"
task
:gem
=>
[
:gemspec
,
:build
]
desc
"Install `hub`"
task
:setup
=>
:standalone
do
path
=
ENV
[
'BINPATH'
]
||
%w( ~/bin /usr/local/bin /usr/bin )
.
detect
do
|
dir
|
File
.
directory?
File
.
expand_path
(
dir
)
end
desc
"Build standalone script"
task
:standalone
=>
[
:test
,
:load_hub
]
do
Hub
::
Standalone
.
save
(
'hub'
)
end
if
path
puts
"Installing into
#{
path
}
"
cp
"standalone"
,
hub
=
File
.
expand_path
(
File
.
join
(
path
,
'hub'
))
chmod
0755
,
hub
puts
"Done. Type `hub version` to see if it worked!"
else
puts
"** Can't find a suitable installation location."
abort
"** Please set the BINPATH env variable and try again."
end
task
:load_hub
do
$LOAD_PATH
.
unshift
'lib'
require
'hub'
end
begin
...
...
@@ -54,13 +47,14 @@ begin
If you are a heavy user of `git` on the command
line you may want to install `hub` the old
fashioned way
!
Faster startup time, you see.
fashioned way
.
Faster startup time, you see.
Check out the installation instructions at
http://github.com/defunkt/hub#readme
or simply
use the `install` command:
http://github.com/defunkt/hub#readme
under the
"Standalone" section.
$ hub install
Cheers,
defunkt
------------------------------------------------------------
...
...
@@ -83,6 +77,7 @@ end
desc
"Publish to GitHub Pages"
task
:pages
=>
[
:check_dirty
,
:standalone
]
do
`mv hub standalone`
`git checkout gh-pages`
`md5 -q standalone > standalone.md5`
`git add standalone*`
...
...
@@ -97,10 +92,3 @@ task :check_dirty do
abort
"dirty index - not publishing!"
end
end
desc
"Build standalone script"
task
:standalone
=>
:test
do
$LOAD_PATH
.
unshift
'lib'
require
'hub'
Hub
::
Standalone
.
save
(
'standalone'
)
end
lib/hub/standalone.rb
浏览文件 @
871faf9c
...
...
@@ -22,6 +22,7 @@ premable
target
=
File
.
join
(
File
.
expand_path
(
path
),
filename
)
File
.
open
(
target
,
'w'
)
do
|
f
|
f
.
puts
build
f
.
chmod
0755
end
rescue
Errno
::
EACCES
,
Errno
::
ENOENT
puts
"** can't write to
#{
target
}
"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录