diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-16 13:32:05 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-16 17:51:08 +0100 |
commit | ebc3f62be52e386b4550e01ce589744e880ad443 (patch) | |
tree | 718a7b680b679983e128e1df92a456e04a58e3e3 /lib/gitlab/chat_commands | |
parent | cc83aded33471a3e2f943bd9a760f689d30f901e (diff) | |
download | gitlab-ce-ebc3f62be52e386b4550e01ce589744e880ad443.tar.gz |
Fix specs
Diffstat (limited to 'lib/gitlab/chat_commands')
-rw-r--r-- | lib/gitlab/chat_commands/command.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/chat_commands/presenter.rb | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/gitlab/chat_commands/command.rb b/lib/gitlab/chat_commands/command.rb index c5c54cf7cfc..145086755e4 100644 --- a/lib/gitlab/chat_commands/command.rb +++ b/lib/gitlab/chat_commands/command.rb @@ -22,8 +22,6 @@ module Gitlab end end - private - def match_command match = nil service = available_commands.find do |klass| @@ -33,6 +31,8 @@ module Gitlab [service, match] end + private + def help_messages available_commands.map(&:help_message) end diff --git a/lib/gitlab/chat_commands/presenter.rb b/lib/gitlab/chat_commands/presenter.rb index e151513cbd5..c86efc0c3f8 100644 --- a/lib/gitlab/chat_commands/presenter.rb +++ b/lib/gitlab/chat_commands/presenter.rb @@ -135,9 +135,14 @@ module Gitlab def link(url, title) case format - when 'slack' then "<#{url}|#{title}>" - when 'mattermost' then "[#{title}](#{url})" - else then title + when 'slack' + "<#{url}|#{title}>" + + when 'mattermost' + "[#{title}](#{url})" + + else + title end end end |