Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
5b44097c
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5b44097c
编写于
4月 23, 2018
作者:
R
Rémy Coutable
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Address latest feedback
Signed-off-by:
N
Rémy Coutable
<
remy@rymai.me
>
上级
c286c66f
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
11 addition
and
11 deletion
+11
-11
config/initializers/2_app.rb
config/initializers/2_app.rb
+0
-1
doc/development/testing_guide/best_practices.md
doc/development/testing_guide/best_practices.md
+1
-1
lib/gitlab.rb
lib/gitlab.rb
+5
-4
lib/settings.rb
lib/settings.rb
+2
-0
spec/fast_spec_helper.rb
spec/fast_spec_helper.rb
+3
-5
未找到文件。
config/initializers/2_app.rb
浏览文件 @
5b44097c
...
...
@@ -5,6 +5,5 @@ module Gitlab
Settings
end
VERSION
=
File
.
read
(
Gitlab
.
root
.
join
(
"VERSION"
)).
strip
.
freeze
REVISION
=
Gitlab
::
Popen
.
popen
(
%W(
#{
config
.
git
.
bin_path
}
log --pretty=format:%h -n 1)
).
first
.
chomp
.
freeze
end
doc/development/testing_guide/best_practices.md
浏览文件 @
5b44097c
...
...
@@ -100,7 +100,7 @@ really fast since:
-
Gems loading is skipped
-
Rails app boot is skipped
-
Gitlab::S
hell and Gitaly setup are skipped
-
gitlab-s
hell and Gitaly setup are skipped
-
Test repositories setup are skipped
Note that in some cases, you might have to add some
`require_dependency 'foo'`
...
...
lib/gitlab.rb
浏览文件 @
5b44097c
require_dependency
'gitlab/git'
module
Gitlab
COM_URL
=
'https://gitlab.com'
.
freeze
APP_DIRS_PATTERN
=
%r{^/?(app|config|ee|lib|spec|
\(\w
*
\)
)}
SUBDOMAIN_REGEX
=
%r{
\A
https://[a-z0-9]+
\.
gitlab
\.
com
\z
}
def
self
.
root
Pathname
.
new
(
File
.
expand_path
(
'..'
,
__dir__
))
end
COM_URL
=
'https://gitlab.com'
.
freeze
APP_DIRS_PATTERN
=
%r{^/?(app|config|ee|lib|spec|
\(\w
*
\)
)}
SUBDOMAIN_REGEX
=
%r{
\A
https://[a-z0-9]+
\.
gitlab
\.
com
\z
}
VERSION
=
File
.
read
(
root
.
join
(
"VERSION"
)).
strip
.
freeze
def
self
.
com?
# Check `gl_subdomain?` as well to keep parity with gitlab.com
Gitlab
.
config
.
gitlab
.
url
==
COM_URL
||
gl_subdomain?
...
...
lib/settings.rb
浏览文件 @
5b44097c
require
'settingslogic'
require_dependency
'gitlab'
class
Settings
<
Settingslogic
...
...
spec/fast_spec_helper.rb
浏览文件 @
5b44097c
require
'bundler/setup'
require
'settingslogic'
ENV
[
'GITLAB_ENV'
]
=
'test'
ENV
[
'RAILS_ENV'
]
=
'test'
ENV
[
'IN_MEMORY_APPLICATION_SETTINGS'
]
=
'true'
unless
Kernel
.
respond_to?
(
:require_dependency
)
module
Kernel
unless
Object
.
respond_to?
(
:require_dependency
)
class
Object
alias_method
:require_dependency
,
:require
end
end
# Defines Gitlab and Gitlab.config which are at the center of the app
unless
defined?
(
Gitlab
)
&&
Gitlab
.
respond_to?
(
:
config
)
unless
defined?
(
Gitlab
.
config
)
require_relative
'../lib/settings'
require_relative
'../config/initializers/2_app'
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录