summaryrefslogtreecommitdiff
path: root/app/presenters/commit_status_presenter.rb
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-09-05 15:46:13 -0500
committerMayra Cabrera <mcabrera@gitlab.com>2018-09-07 09:08:31 -0500
commit5cfdcce0e6a31593919e0da41e1183298dc5e642 (patch)
tree2af44ae3aee05f2a917f5f6c6f59cc9cf0099a9f /app/presenters/commit_status_presenter.rb
parentc903fcd56441c4c3e8e487f1fb20bb4fe60bf1a3 (diff)
downloadgitlab-ce-5cfdcce0e6a31593919e0da41e1183298dc5e642.tar.gz
Introduce class methods so CE constants can be easily overridden on EE
Diffstat (limited to 'app/presenters/commit_status_presenter.rb')
-rw-r--r--app/presenters/commit_status_presenter.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/presenters/commit_status_presenter.rb b/app/presenters/commit_status_presenter.rb
index a08f34e2335..65e77ea3f92 100644
--- a/app/presenters/commit_status_presenter.rb
+++ b/app/presenters/commit_status_presenter.rb
@@ -11,10 +11,16 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated
runner_unsupported: 'Your runner is outdated, please upgrade your runner'
}.freeze
+ private_constant :CALLOUT_FAILURE_MESSAGES
+
presents :build
+ def self.callout_failure_messages
+ CALLOUT_FAILURE_MESSAGES
+ end
+
def callout_failure_message
- CALLOUT_FAILURE_MESSAGES.fetch(failure_reason.to_sym)
+ self.class.callout_failure_messages.fetch(failure_reason.to_sym)
end
def recoverable?