Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgfyoung <gfyoung17@gmail.com>2018-11-20 05:01:13 +0300
committergfyoung <gfyoung17@gmail.com>2018-11-20 05:24:22 +0300
commitf93f8f569d51cdc738d1653a264a762b2c08fde0 (patch)
tree63883b10e0e618b730bc2859a62ce840611846e0 /lib/gitlab/slash_commands/presenters
parent60261d9d3cbad16f9846b01c994e7575430184d9 (diff)
Enable even more frozen string for lib/gitlab
Enables frozen string for the following: * lib/gitlab/patch/**/*.rb * lib/gitlab/popen/**/*.rb * lib/gitlab/profiler/**/*.rb * lib/gitlab/project_authorizations/**/*.rb * lib/gitlab/prometheus/**/*.rb * lib/gitlab/query_limiting/**/*.rb * lib/gitlab/quick_actions/**/*.rb * lib/gitlab/redis/**/*.rb * lib/gitlab/request_profiler/**/*.rb * lib/gitlab/search/**/*.rb * lib/gitlab/sherlock/**/*.rb * lib/gitlab/sidekiq_middleware/**/*.rb * lib/gitlab/slash_commands/**/*.rb * lib/gitlab/sql/**/*.rb * lib/gitlab/template/**/*.rb * lib/gitlab/testing/**/*.rb * lib/gitlab/utils/**/*.rb * lib/gitlab/webpack/**/*.rb Partially addresses gitlab-org/gitlab-ce#47424.
Diffstat (limited to 'lib/gitlab/slash_commands/presenters')
-rw-r--r--lib/gitlab/slash_commands/presenters/access.rb2
-rw-r--r--lib/gitlab/slash_commands/presenters/base.rb2
-rw-r--r--lib/gitlab/slash_commands/presenters/deploy.rb2
-rw-r--r--lib/gitlab/slash_commands/presenters/help.rb2
-rw-r--r--lib/gitlab/slash_commands/presenters/issue_base.rb2
-rw-r--r--lib/gitlab/slash_commands/presenters/issue_move.rb2
-rw-r--r--lib/gitlab/slash_commands/presenters/issue_new.rb2
-rw-r--r--lib/gitlab/slash_commands/presenters/issue_search.rb2
-rw-r--r--lib/gitlab/slash_commands/presenters/issue_show.rb8
9 files changed, 21 insertions, 3 deletions
diff --git a/lib/gitlab/slash_commands/presenters/access.rb b/lib/gitlab/slash_commands/presenters/access.rb
index 81f7cd3ffe8..fa163cb098e 100644
--- a/lib/gitlab/slash_commands/presenters/access.rb
+++ b/lib/gitlab/slash_commands/presenters/access.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Gitlab
module SlashCommands
module Presenters
diff --git a/lib/gitlab/slash_commands/presenters/base.rb b/lib/gitlab/slash_commands/presenters/base.rb
index e13808a2720..73814aa180f 100644
--- a/lib/gitlab/slash_commands/presenters/base.rb
+++ b/lib/gitlab/slash_commands/presenters/base.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Gitlab
module SlashCommands
module Presenters
diff --git a/lib/gitlab/slash_commands/presenters/deploy.rb b/lib/gitlab/slash_commands/presenters/deploy.rb
index ebae0f57f9b..7d852eb1f9a 100644
--- a/lib/gitlab/slash_commands/presenters/deploy.rb
+++ b/lib/gitlab/slash_commands/presenters/deploy.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Gitlab
module SlashCommands
module Presenters
diff --git a/lib/gitlab/slash_commands/presenters/help.rb b/lib/gitlab/slash_commands/presenters/help.rb
index ab855319077..480d7aa6a30 100644
--- a/lib/gitlab/slash_commands/presenters/help.rb
+++ b/lib/gitlab/slash_commands/presenters/help.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Gitlab
module SlashCommands
module Presenters
diff --git a/lib/gitlab/slash_commands/presenters/issue_base.rb b/lib/gitlab/slash_commands/presenters/issue_base.rb
index 31c1e97efba..b6db103b82b 100644
--- a/lib/gitlab/slash_commands/presenters/issue_base.rb
+++ b/lib/gitlab/slash_commands/presenters/issue_base.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Gitlab
module SlashCommands
module Presenters
diff --git a/lib/gitlab/slash_commands/presenters/issue_move.rb b/lib/gitlab/slash_commands/presenters/issue_move.rb
index 03921729941..ca0644ede95 100644
--- a/lib/gitlab/slash_commands/presenters/issue_move.rb
+++ b/lib/gitlab/slash_commands/presenters/issue_move.rb
@@ -1,4 +1,6 @@
# coding: utf-8
+# frozen_string_literal: true
+
module Gitlab
module SlashCommands
module Presenters
diff --git a/lib/gitlab/slash_commands/presenters/issue_new.rb b/lib/gitlab/slash_commands/presenters/issue_new.rb
index 5964bfe9960..ac78745ae70 100644
--- a/lib/gitlab/slash_commands/presenters/issue_new.rb
+++ b/lib/gitlab/slash_commands/presenters/issue_new.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Gitlab
module SlashCommands
module Presenters
diff --git a/lib/gitlab/slash_commands/presenters/issue_search.rb b/lib/gitlab/slash_commands/presenters/issue_search.rb
index 4e27d668685..0d497efec0e 100644
--- a/lib/gitlab/slash_commands/presenters/issue_search.rb
+++ b/lib/gitlab/slash_commands/presenters/issue_search.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Gitlab
module SlashCommands
module Presenters
diff --git a/lib/gitlab/slash_commands/presenters/issue_show.rb b/lib/gitlab/slash_commands/presenters/issue_show.rb
index 562f15f403c..5a2c79a928e 100644
--- a/lib/gitlab/slash_commands/presenters/issue_show.rb
+++ b/lib/gitlab/slash_commands/presenters/issue_show.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
module Gitlab
module SlashCommands
module Presenters
@@ -38,10 +40,10 @@ module Gitlab
end
def text
- message = "**#{status_text(@resource)}**"
+ message = ["**#{status_text(@resource)}**"]
if @resource.upvotes.zero? && @resource.downvotes.zero? && @resource.user_notes_count.zero?
- return message
+ return message.join
end
message << " ยท "
@@ -49,7 +51,7 @@ module Gitlab
message << ":-1: #{@resource.downvotes} " unless @resource.downvotes.zero?
message << ":speech_balloon: #{@resource.user_notes_count}" unless @resource.user_notes_count.zero?
- message
+ message.join
end
def pretext