From 1efa8f2e15664c4268f6357f2a24449c38e5047d Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Wed, 8 Feb 2017 16:42:27 +0100 Subject: [PATCH] Rename issuable to IssueBase Given the the Issuable class will soon also have to support MRs this signals that it can only be used by issues. --- .../chat_commands/presenters/{issuable.rb => issue_base.rb} | 2 +- lib/gitlab/chat_commands/presenters/issue_new.rb | 2 +- lib/gitlab/chat_commands/presenters/issue_search.rb | 2 +- lib/gitlab/chat_commands/presenters/issue_show.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename lib/gitlab/chat_commands/presenters/{issuable.rb => issue_base.rb} (97%) diff --git a/lib/gitlab/chat_commands/presenters/issuable.rb b/lib/gitlab/chat_commands/presenters/issue_base.rb similarity index 97% rename from lib/gitlab/chat_commands/presenters/issuable.rb rename to lib/gitlab/chat_commands/presenters/issue_base.rb index dfb1c8f6616..a0058407fb2 100644 --- a/lib/gitlab/chat_commands/presenters/issuable.rb +++ b/lib/gitlab/chat_commands/presenters/issue_base.rb @@ -1,7 +1,7 @@ module Gitlab module ChatCommands module Presenters - module Issuable + module IssueBase def color(issuable) issuable.open? ? '#38ae67' : '#d22852' end diff --git a/lib/gitlab/chat_commands/presenters/issue_new.rb b/lib/gitlab/chat_commands/presenters/issue_new.rb index a1a3add56c9..0d31660039a 100644 --- a/lib/gitlab/chat_commands/presenters/issue_new.rb +++ b/lib/gitlab/chat_commands/presenters/issue_new.rb @@ -2,7 +2,7 @@ module Gitlab module ChatCommands module Presenters class IssueNew < Presenters::Base - include Presenters::Issuable + include Presenters::IssueBase def present in_channel_response(new_issue) diff --git a/lib/gitlab/chat_commands/presenters/issue_search.rb b/lib/gitlab/chat_commands/presenters/issue_search.rb index 3478359b91d..73788cf9662 100644 --- a/lib/gitlab/chat_commands/presenters/issue_search.rb +++ b/lib/gitlab/chat_commands/presenters/issue_search.rb @@ -2,7 +2,7 @@ module Gitlab module ChatCommands module Presenters class IssueSearch < Presenters::Base - include Presenters::Issuable + include Presenters::IssueBase def present text = if @resource.count >= 5 diff --git a/lib/gitlab/chat_commands/presenters/issue_show.rb b/lib/gitlab/chat_commands/presenters/issue_show.rb index fe5847ccd15..bd784ad241e 100644 --- a/lib/gitlab/chat_commands/presenters/issue_show.rb +++ b/lib/gitlab/chat_commands/presenters/issue_show.rb @@ -2,7 +2,7 @@ module Gitlab module ChatCommands module Presenters class IssueShow < Presenters::Base - include Presenters::Issuable + include Presenters::IssueBase def present if @resource.confidential?