summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-26 14:48:32 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-26 14:48:32 +0200
commitf4e01b597c7cb40797d0b690451322bc79d8dfe0 (patch)
tree896bc8ec41cdd7e85ad5a6b66244825c9880d052
parentc14bd53d7483b57d47159c52dcb1b3456885f153 (diff)
downloadgitlab-ce-f4e01b597c7cb40797d0b690451322bc79d8dfe0.tar.gz
Move enum specific code from a concern to CI stage
-rw-r--r--app/models/ci/stage.rb2
-rw-r--r--app/models/concerns/has_status.rb4
2 files changed, 1 insertions, 5 deletions
diff --git a/app/models/ci/stage.rb b/app/models/ci/stage.rb
index 78caa70e52e..b1cca06abaa 100644
--- a/app/models/ci/stage.rb
+++ b/app/models/ci/stage.rb
@@ -5,7 +5,7 @@ module Ci
include HasStatus
include Gitlab::OptimisticLocking
- enumerate_status!
+ enum status: HasStatus::STATUSES_ENUM
belongs_to :project
belongs_to :pipeline
diff --git a/app/models/concerns/has_status.rb b/app/models/concerns/has_status.rb
index 758d71b7f4c..3803e18a96e 100644
--- a/app/models/concerns/has_status.rb
+++ b/app/models/concerns/has_status.rb
@@ -12,10 +12,6 @@ module HasStatus
failed: 4, canceled: 5, skipped: 6, manual: 7 }.freeze
class_methods do
- def enumerate_status!
- enum status: HasStatus::STATUSES_ENUM
- end
-
def status_sql
scope_relevant = respond_to?(:exclude_ignored) ? exclude_ignored : all
scope_warnings = respond_to?(:failed_but_allowed) ? failed_but_allowed : none