summaryrefslogtreecommitdiff
path: root/app/presenters/ci
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-01-10 17:41:04 -0500
committerRémy Coutable <remy@rymai.me>2017-01-18 16:38:35 +0100
commit061bb6eb6ed0ca6be3c571b3fcfd14a6f9729205 (patch)
tree2b87e3ea5d1e67b19c515891d19b466c80040a04 /app/presenters/ci
parente950830ba6a0efa3b0992e6e55cb5b5842f8573a (diff)
downloadgitlab-ce-061bb6eb6ed0ca6be3c571b3fcfd14a6f9729205.tar.gz
More improvements to presenters23563-document-presenters
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/presenters/ci')
-rw-r--r--app/presenters/ci/build/presenter.rb17
-rw-r--r--app/presenters/ci/build_presenter.rb15
-rw-r--r--app/presenters/ci/variable/presenter.rb7
3 files changed, 15 insertions, 24 deletions
diff --git a/app/presenters/ci/build/presenter.rb b/app/presenters/ci/build/presenter.rb
deleted file mode 100644
index 60392200fde..00000000000
--- a/app/presenters/ci/build/presenter.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-module Ci
- class Build
- class Presenter < Gitlab::View::Presenter::Delegated
- presents :build
-
- def erased_by_user?
- # Build can be erased through API, therefore it does not have
- # `erase_by` user assigned in that case.
- erased? && erased_by
- end
-
- def erased_by_name
- erased_by.name if erased_by
- end
- end
- end
-end
diff --git a/app/presenters/ci/build_presenter.rb b/app/presenters/ci/build_presenter.rb
new file mode 100644
index 00000000000..ed72ed14d72
--- /dev/null
+++ b/app/presenters/ci/build_presenter.rb
@@ -0,0 +1,15 @@
+module Ci
+ class BuildPresenter < Gitlab::View::Presenter::Delegated
+ presents :build
+
+ def erased_by_user?
+ # Build can be erased through API, therefore it does not have
+ # `erased_by` user assigned in that case.
+ erased? && erased_by
+ end
+
+ def erased_by_name
+ erased_by.name if erased_by_user?
+ end
+ end
+end
diff --git a/app/presenters/ci/variable/presenter.rb b/app/presenters/ci/variable/presenter.rb
deleted file mode 100644
index 02045e19cac..00000000000
--- a/app/presenters/ci/variable/presenter.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-module Ci
- class Variable
- class Presenter < Gitlab::View::Presenter::Simple
- presents :variable
- end
- end
-end