Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
github
hub
提交
00b846af
H
hub
项目概览
github
/
hub
10 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
00b846af
编写于
12月 24, 2014
作者:
M
Mislav Marohnić
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Backport cukes from 1.12-stable branch
上级
a0835d44
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
58 addition
and
17 deletion
+58
-17
features/compare.feature
features/compare.feature
+12
-0
features/create.feature
features/create.feature
+11
-0
features/pull_request.feature
features/pull_request.feature
+6
-6
features/remote_add.feature
features/remote_add.feature
+14
-11
features/submodule_add.feature
features/submodule_add.feature
+5
-0
features/support/env.rb
features/support/env.rb
+10
-0
未找到文件。
features/compare.feature
浏览文件 @
00b846af
...
...
@@ -13,6 +13,11 @@ Feature: hub compare
Then
there should be no output
And "open https
:
//github.com/mislav/dotfiles/compare/feature/foo"
should
be
run
Scenario
:
Compare branch with funky characters
When
I successfully run `hub compare 'my#branch!with.special+chars'`
Then
there should be no output
And "open https
:
//github.com/mislav/dotfiles/compare/my%23branch!with.special%2Bchars"
should
be
run
Scenario
:
No
args, no upstream
When
I run `hub compare`
Then
the exit status should be 1
...
...
@@ -38,6 +43,13 @@ Feature: hub compare
Then
there should be no output
And "open https
:
//github.com/mislav/dotfiles/compare/experimental"
should
be
run
Scenario
:
Current branch has funky characters
Given
I am on the
"feature"
branch with upstream
"origin/my#branch!with.special+chars"
And
git
"push.default"
is set to
"upstream"
When
I successfully run `hub compare`
Then
there should be no output
And "open https
:
//github.com/mislav/dotfiles/compare/my%23branch!with.special%2Bchars"
should
be
run
Scenario
:
Compare range
When
I successfully run `hub compare 1.0...fix`
Then
there should be no output
...
...
features/create.feature
浏览文件 @
00b846af
...
...
@@ -98,6 +98,17 @@ Feature: hub create
When
I successfully run `hub create`
Then the url for "origin" should be "git
:
//github.com/mislav/dotfiles.git"
Scenario
:
Another remote already exists
Given the GitHub API server
:
"""
post('/user/repos') {
json :full_name => 'mislav/dotfiles'
}
"""
And the "github" remote has url "git
:
//github.com/mislav/dotfiles.git"
When
I successfully run `hub create`
Then the url for "origin" should be "git@github.com
:
mislav/dotfiles.git"
Scenario
:
GitHub repo already exists
Given the GitHub API server
:
"""
...
...
features/pull_request.feature
浏览文件 @
00b846af
...
...
@@ -587,11 +587,11 @@ Feature: hub pull-request
Scenario
:
Branch with quotation mark in name
Given
I am on the
"feat'ure"
branch with upstream
"origin/feat'ure"
Given the GitHub API server
:
"""
post('/repos/mislav/coral/pulls') {
assert :head => "mislav:feat'ure"
json :html_url => "the://url"
}
"""
"""
post('/repos/mislav/coral/pulls') {
assert :head => "mislav:feat'ure"
json :html_url => "the://url"
}
"""
When
I successfully run `hub pull-request -m hereyougo`
Then the output should contain exactly "the
:
//url\n"
features/remote_add.feature
浏览文件 @
00b846af
Feature
:
hub remote add
Background
:
Given
I am in
"dotfiles"
git repo
Given
I am
"EvilChelu"
on GitHub.com
And
I am in
"dotfiles"
git repo
Scenario
:
Add origin remote for my own repo
Given
I am
"mislav"
on GitHub.com
And
there are no remotes
Given
there are no remotes
When
I successfully run `hub remote add origin`
Then the url for "origin" should be "git
:
//github.com/mislav/dotfiles.git"
And
there should be no output
Scenario
:
Add private origin remote for my own repo
Given
I am
"mislav"
on GitHub.com
And
there are no remotes
When
I successfully run `hub remote add -p origin`
Then the url for "origin" should be "git@github.com
:
mislav/dotfiles.git"
Then the url for "origin" should be "git@github.com
:
EvilChelu/dotfiles.git"
And
there should be no output
Scenario
:
Unchanged public remote add
...
...
@@ -58,6 +51,11 @@ Feature: hub remote add
Then the url for "mislav" should be "git@github.com
:
mislav/dotfiles.git"
And
there should be no output
Scenario
:
Remote for my own repo is automatically private
When
I successfully run `hub remote add evilchelu`
Then the url for "evilchelu" should be "git@github.com
:
EvilChelu/dotfiles.git"
And
there should be no output
Scenario
:
Add remote with arguments
When
I successfully run `hub remote add -f mislav`
Then "git remote add -f mislav git
:
//github.com/mislav/dotfiles.git"
should
be
run
...
...
@@ -104,3 +102,8 @@ Feature: hub remote add
When
I successfully run `hub remote add -p mm mislav/dotfilez.js`
Then the url for "mm" should be "git@github.com
:
mislav/dotfilez.js.git"
And
there should be no output
Scenario
:
Add named private remote for my own repo including repo name
When
I successfully run `hub remote add ec evilchelu/dotfilez.js`
Then the url for "ec" should be "git@github.com
:
EvilChelu/dotfilez.js.git"
And
there should be no output
features/submodule_add.feature
浏览文件 @
00b846af
...
...
@@ -16,6 +16,11 @@ Feature: hub submodule add
When
I successfully run `hub submodule add -p mojombo/grit vendor/grit`
Then the "vendor/grit" submodule url should be "git@github.com
:
mojombo/grit.git"
Scenario
:
A
submodule for my own repo is public nevertheless
Given
I am
"EvilChelu"
on GitHub.com
When
I successfully run `hub submodule add grit vendor/grit`
Then the "vendor/grit" submodule url should be "git
:
//github.com/EvilChelu/grit.git"
Scenario
:
Add submodule with arguments
When
I successfully run `hub submodule add -b foo --name grit mojombo/grit vendor/grit`
Then "git submodule add -b foo --name grit git
:
//github.com/mojombo/grit.git
vendor/grit"
should
be
run
...
...
features/support/env.rb
浏览文件 @
00b846af
...
...
@@ -3,6 +3,16 @@ require 'fileutils'
require
'forwardable'
require
'tmpdir'
# Ruby 2.2.0 compat
Cucumber
::
Ast
::
Step
.
class_eval
do
undef_method
:text_length
def
text_length
(
name
=
name
())
self
.
class
::
INDENT
+
self
.
class
::
INDENT
+
keyword
.
unpack
(
'U*'
).
length
+
name
.
unpack
(
'U*'
).
length
end
end
system_git
=
`which git 2>/dev/null`
.
chomp
lib_dir
=
File
.
expand_path
(
'../../../lib'
,
__FILE__
)
bin_dir
=
File
.
expand_path
(
'../fakebin'
,
__FILE__
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录