BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
0c6f0442
Commit
0c6f0442
authored
May 30, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Performance/TimesMap Rubocop cop
Use Array.new with a block instead of `.times.collect` / `.times.map`. See #17478
parent
43c35b0f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
.rubocop.yml
.rubocop.yml
+1
-2
bulk_update_service_spec.rb
spec/services/issues/bulk_update_service_spec.rb
+2
-7
No files found.
.rubocop.yml
View file @
0c6f0442
...
...
@@ -1027,10 +1027,9 @@ Performance/StartWith:
Performance/StringReplacement
:
Enabled
:
true
# TODO: Enable TimesMap Cop.
# Checks for `.times.map` calls.
Performance/TimesMap
:
Enabled
:
fals
e
Enabled
:
tru
e
##################### Rails ##################################
...
...
spec/services/issues/bulk_update_service_spec.rb
View file @
0c6f0442
...
...
@@ -15,9 +15,7 @@ describe Issues::BulkUpdateService, services: true do
describe
:close_issue
do
before
do
@issues
=
5
.
times
.
collect
do
create
(
:issue
,
project:
@project
)
end
@issues
=
create_list
(
:issue
,
5
,
project:
@project
)
@params
=
{
state_event:
'close'
,
issues_ids:
@issues
.
map
(
&
:id
)
...
...
@@ -36,11 +34,8 @@ describe Issues::BulkUpdateService, services: true do
end
describe
:reopen_issues
do
before
do
@issues
=
5
.
times
.
collect
do
create
(
:closed_issue
,
project:
@project
)
end
@issues
=
create_list
(
:closed_issue
,
5
,
project:
@project
)
@params
=
{
state_event:
'reopen'
,
issues_ids:
@issues
.
map
(
&
:id
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment