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
2766226a
Commit
2766226a
authored
Jul 28, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move InternalIdEnums to Enums::InternalId
Moves enums modules into a separate directory
parent
8dc5e1ed
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
23 deletions
+27
-23
app/models/concerns/enums/internal_id.rb
app/models/concerns/enums/internal_id.rb
+8
-6
app/models/internal_id.rb
app/models/internal_id.rb
+1
-1
ee/app/models/concerns/ee/enums/internal_id.rb
ee/app/models/concerns/ee/enums/internal_id.rb
+18
-0
ee/app/models/ee/internal_id_enums.rb
ee/app/models/ee/internal_id_enums.rb
+0
-16
No files found.
app/models/
internal_id_enums
.rb
→
app/models/
concerns/enums/internal_id
.rb
View file @
2766226a
# frozen_string_literal: true
module
InternalIdEnums
module
Enums
module
InternalId
def
self
.
usage_resources
# when adding new resource, make sure it doesn't conflict with EE usage_resources
{
...
...
@@ -16,6 +17,7 @@ module InternalIdEnums
sprints:
9
# iterations
}
end
end
end
InternalIdEnums
.
prepend_if_ee
(
'EE::InternalIdEnums
'
)
Enums
::
InternalId
.
prepend_if_ee
(
'EE::Enums::InternalId
'
)
app/models/internal_id.rb
View file @
2766226a
...
...
@@ -21,7 +21,7 @@ class InternalId < ApplicationRecord
belongs_to
:project
belongs_to
:namespace
enum
usage:
::
InternalIdEnums
.
usage_resources
enum
usage:
Enums
::
InternalId
.
usage_resources
validates
:usage
,
presence:
true
...
...
ee/app/models/concerns/ee/enums/internal_id.rb
0 → 100644
View file @
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
deleted
100644 → 0
View file @
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
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