Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
4a191c83
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,体验更适合开发者的 AI 搜索 >>
提交
4a191c83
编写于
10月 03, 2016
作者:
R
Robert Speicher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Enable Lint/StringConversionInInterpolation cop and autocorrect offenses
上级
dfb9cab8
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
13 addition
and
14 deletion
+13
-14
.rubocop.yml
.rubocop.yml
+4
-0
.rubocop_todo.yml
.rubocop_todo.yml
+0
-5
app/controllers/concerns/spammable_actions.rb
app/controllers/concerns/spammable_actions.rb
+1
-1
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-1
app/models/commit_range.rb
app/models/commit_range.rb
+1
-1
app/services/system_hooks_service.rb
app/services/system_hooks_service.rb
+1
-1
app/services/system_note_service.rb
app/services/system_note_service.rb
+1
-1
spec/finders/access_requests_finder_spec.rb
spec/finders/access_requests_finder_spec.rb
+1
-1
spec/lib/gitlab/import_export/attribute_configuration_spec.rb
.../lib/gitlab/import_export/attribute_configuration_spec.rb
+1
-1
spec/services/members/approve_access_request_service_spec.rb
spec/services/members/approve_access_request_service_spec.rb
+1
-1
spec/services/members/request_access_service_spec.rb
spec/services/members/request_access_service_spec.rb
+1
-1
未找到文件。
.rubocop.yml
浏览文件 @
4a191c83
...
...
@@ -639,6 +639,10 @@ Lint/RescueException:
Lint/ShadowedException
:
Enabled
:
false
# Checks for Object#to_s usage in string interpolation.
Lint/StringConversionInInterpolation
:
Enabled
:
true
# Do not use prefix `_` for a variable that is used.
Lint/UnderscorePrefixedVariableName
:
Enabled
:
true
...
...
.rubocop_todo.yml
浏览文件 @
4a191c83
...
...
@@ -27,11 +27,6 @@ Lint/Loop:
Lint/ShadowingOuterLocalVariable
:
Enabled
:
false
# Offense count: 6
# Cop supports --auto-correct.
Lint/StringConversionInInterpolation
:
Enabled
:
false
# Offense count: 49
# Cop supports --auto-correct.
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
...
...
app/controllers/concerns/spammable_actions.rb
浏览文件 @
4a191c83
...
...
@@ -7,7 +7,7 @@ module SpammableActions
def
mark_as_spam
if
SpamService
.
new
(
spammable
).
mark_as_spam!
redirect_to
spammable
,
notice:
"
#{
spammable
.
class
.
to_s
}
was submitted to Akismet successfully."
redirect_to
spammable
,
notice:
"
#{
spammable
.
class
}
was submitted to Akismet successfully."
else
redirect_to
spammable
,
alert:
'Error with Akismet. Please check the logs for more info.'
end
...
...
app/helpers/projects_helper.rb
浏览文件 @
4a191c83
...
...
@@ -139,7 +139,7 @@ module ProjectsHelper
end
options
=
options_for_select
(
options
,
selected:
highest_available_option
||
@project
.
project_feature
.
public_send
(
field
))
content_tag
(
:select
,
options
,
name:
"project[project_feature_attributes][
#{
field
.
to_s
}
]"
,
id:
"project_project_feature_attributes_
#{
field
.
to_s
}
"
,
class:
"pull-right form-control"
,
data:
{
field:
field
}).
html_safe
content_tag
(
:select
,
options
,
name:
"project[project_feature_attributes][
#{
field
}
]"
,
id:
"project_project_feature_attributes_
#{
field
}
"
,
class:
"pull-right form-control"
,
data:
{
field:
field
}).
html_safe
end
private
...
...
app/models/commit_range.rb
浏览文件 @
4a191c83
...
...
@@ -80,7 +80,7 @@ class CommitRange
end
def
inspect
%(#<#{self.class}:#{object_id} #{
to_s
}>)
%(#<#{self.class}:#{object_id} #{
self
}>)
end
def
to_s
...
...
app/services/system_hooks_service.rb
浏览文件 @
4a191c83
...
...
@@ -72,7 +72,7 @@ class SystemHooksService
return
'user_add_to_group'
if
event
==
:create
return
'user_remove_from_group'
if
event
==
:destroy
else
"
#{
model
.
class
.
name
.
downcase
}
_
#{
event
.
to_s
}
"
"
#{
model
.
class
.
name
.
downcase
}
_
#{
event
}
"
end
end
...
...
app/services/system_note_service.rb
浏览文件 @
4a191c83
...
...
@@ -246,7 +246,7 @@ module SystemNoteService
'deleted'
end
body
=
"
#{
verb
}
#{
branch_type
.
to_s
}
branch `
#{
branch
}
`"
.
capitalize
body
=
"
#{
verb
}
#{
branch_type
}
branch `
#{
branch
}
`"
.
capitalize
create_note
(
noteable:
noteable
,
project:
project
,
author:
author
,
note:
body
)
end
...
...
spec/finders/access_requests_finder_spec.rb
浏览文件 @
4a191c83
...
...
@@ -16,7 +16,7 @@ describe AccessRequestsFinder, services: true do
access_requesters
=
described_class
.
new
(
source
).
public_send
(
method_name
,
user
)
expect
(
access_requesters
.
size
).
to
eq
(
1
)
expect
(
access_requesters
.
first
).
to
be_a
"
#{
source
.
class
.
to_s
}
Member"
.
constantize
expect
(
access_requesters
.
first
).
to
be_a
"
#{
source
.
class
}
Member"
.
constantize
expect
(
access_requesters
.
first
.
user
).
to
eq
(
access_requester
)
end
end
...
...
spec/lib/gitlab/import_export/attribute_configuration_spec.rb
浏览文件 @
4a191c83
...
...
@@ -27,7 +27,7 @@ describe 'Import/Export attribute configuration', lib: true do
relation_names
.
each
do
|
relation_name
|
relation_class
=
relation_class_for_name
(
relation_name
)
expect
(
safe_model_attributes
[
relation_class
.
to_s
]).
not_to
be_nil
,
"Expected exported class
#{
relation_class
.
to_s
}
to exist in safe_model_attributes"
expect
(
safe_model_attributes
[
relation_class
.
to_s
]).
not_to
be_nil
,
"Expected exported class
#{
relation_class
}
to exist in safe_model_attributes"
current_attributes
=
parsed_attributes
(
relation_name
,
relation_class
.
attribute_names
)
safe_attributes
=
safe_model_attributes
[
relation_class
.
to_s
]
...
...
spec/services/members/approve_access_request_service_spec.rb
浏览文件 @
4a191c83
...
...
@@ -26,7 +26,7 @@ describe Members::ApproveAccessRequestService, services: true do
it
'returns a <Source>Member'
do
member
=
described_class
.
new
(
source
,
user
,
params
).
execute
expect
(
member
).
to
be_a
"
#{
source
.
class
.
to_s
}
Member"
.
constantize
expect
(
member
).
to
be_a
"
#{
source
.
class
}
Member"
.
constantize
expect
(
member
.
requested_at
).
to
be_nil
end
...
...
spec/services/members/request_access_service_spec.rb
浏览文件 @
4a191c83
...
...
@@ -19,7 +19,7 @@ describe Members::RequestAccessService, services: true do
it
'returns a <Source>Member'
do
member
=
described_class
.
new
(
source
,
user
).
execute
expect
(
member
).
to
be_a
"
#{
source
.
class
.
to_s
}
Member"
.
constantize
expect
(
member
).
to
be_a
"
#{
source
.
class
}
Member"
.
constantize
expect
(
member
.
requested_at
).
to
be_present
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录