Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
becc6637
Commit
becc6637
authored
Nov 29, 2019
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify mutex pattern
parent
9d34272d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
app/models/concerns/ignorable_columns.rb
app/models/concerns/ignorable_columns.rb
+9
-7
No files found.
app/models/concerns/ignorable_columns.rb
View file @
becc6637
...
...
@@ -23,19 +23,21 @@ module IgnorableColumns
self
.
ignored_columns
+=
columns
.
flatten
# rubocop:disable Cop/IgnoredColumns
IGNORE_COLUMN_MUTEX
.
synchronize
do
@ignored_columns_details
||=
superclass
.
try
(
:ignored_columns_details
)
&
.
dup
||
{}
columns
.
flatten
.
each
do
|
column
|
@ignored_columns_details
[
column
.
to_sym
]
=
ColumnIgnore
.
new
(
Date
.
parse
(
remove_after
),
remove_with
)
end
columns
.
flatten
.
each
do
|
column
|
self
.
ignored_columns_details
[
column
.
to_sym
]
=
ColumnIgnore
.
new
(
Date
.
parse
(
remove_after
),
remove_with
)
end
end
alias_method
:ignore_column
,
:ignore_columns
def
ignored_columns_details
@ignored_columns_details
||
{}
unless
defined?
(
@ignored_columns_details
)
IGNORE_COLUMN_MUTEX
.
synchronize
do
@ignored_columns_details
||=
superclass
.
try
(
:ignored_columns_details
)
&
.
dup
||
{}
end
end
@ignored_columns_details
end
IGNORE_COLUMN_MUTEX
=
Mutex
.
new
...
...
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