diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-09-05 15:46:13 -0500 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-09-07 09:08:31 -0500 |
commit | 5cfdcce0e6a31593919e0da41e1183298dc5e642 (patch) | |
tree | 2af44ae3aee05f2a917f5f6c6f59cc9cf0099a9f /app/presenters/commit_status_presenter.rb | |
parent | c903fcd56441c4c3e8e487f1fb20bb4fe60bf1a3 (diff) | |
download | gitlab-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.rb | 8 |
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? |