Открыть боковую панель
GitLab.org
Gitlab
Коммиты
2766226a
Коммит
2766226a
создал
Июл 28, 2020
по автору
Vitali Tatarintev
Просмотр файлов
Move InternalIdEnums to Enums::InternalId
Moves enums modules into a separate directory
владелец
8dc5e1ed
Изменения
4
Скрыть пробелы
Построчно
Рядом
app/models/internal_id
_enums
.rb
→
app/models/
concerns/enums/
internal_id.rb
Просмотр файла @
2766226a
# frozen_string_literal: true
module
InternalIdEnums
def
self
.
usage_resources
# when adding new resource, make sure it doesn't conflict with EE usage_resources
{
module
Enums
module
InternalId
def
self
.
usage_resources
# when adding new resource, make sure it doesn't conflict with EE usage_resources
{
issues:
0
,
merge_requests:
1
,
deployments:
2
,
...
...
@@ -14,8 +15,9 @@ def self.usage_resources
operations_user_lists:
7
,
alert_management_alerts:
8
,
sprints:
9
# iterations
}
}
end
end
end
InternalId
Enums
.
prepend_if_ee
(
'EE::InternalId
Enums
'
)
Enums
::
InternalId
.
prepend_if_ee
(
'EE::
Enums::
InternalId'
)
app/models/internal_id.rb
Просмотр файла @
2766226a
...
...
@@ -21,7 +21,7 @@ class InternalId < ApplicationRecord
belongs_to
:project
belongs_to
:namespace
enum
usage:
::
InternalId
Enums
.
usage_resources
enum
usage:
Enums
::
InternalId
.
usage_resources
validates
:usage
,
presence:
true
...
...
ee/app/models/concerns/ee/enums/internal_id.rb
0 → 100644
Просмотр файла @
2766226a
# frozen_string_literal: true
module
EE
module
Enums
module
InternalId
extend
ActiveSupport
::
Concern
class_methods
do
extend
::
Gitlab
::
Utils
::
Override
override
:usage_resources
def
usage_resources
super
.
merge
(
requirements:
1000
)
end
end
end
end
end
ee/app/models/ee/internal_id_enums.rb
удалено
100644 → 0
Просмотр файла @
8dc5e1ed
# frozen_string_literal: true
module
EE
module
InternalIdEnums
extend
ActiveSupport
::
Concern
class_methods
do
extend
::
Gitlab
::
Utils
::
Override
override
:usage_resources
def
usage_resources
super
.
merge
(
requirements:
1000
)
end
end
end
end
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать