summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-21 17:32:18 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-23 09:31:56 -0600
commitb7d8df503cf35b3048b273dc0cadb5ec39aac5e1 (patch)
tree0edbdd9158baa535b12831a3d4860b73894df9ab /lib/api
parent3dadf306ddc81183e74b048bc4119796852ed7ea (diff)
downloadgitlab-ce-b7d8df503cf35b3048b273dc0cadb5ec39aac5e1.tar.gz
Enable Style/MutableConstant
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/api_guard.rb2
-rw-r--r--lib/api/award_emoji.rb2
-rw-r--r--lib/api/helpers.rb2
-rw-r--r--lib/api/notes.rb2
-rw-r--r--lib/api/todos.rb2
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/api_guard.rb b/lib/api/api_guard.rb
index df6db140d0e..dad588debf0 100644
--- a/lib/api/api_guard.rb
+++ b/lib/api/api_guard.rb
@@ -6,7 +6,7 @@ module API
module APIGuard
extend ActiveSupport::Concern
- PRIVATE_TOKEN_HEADER = "HTTP_PRIVATE_TOKEN"
+ PRIVATE_TOKEN_HEADER = "HTTP_PRIVATE_TOKEN".freeze
PRIVATE_TOKEN_PARAM = :private_token
included do |base|
diff --git a/lib/api/award_emoji.rb b/lib/api/award_emoji.rb
index 2ef327217ea..a5394cf61d5 100644
--- a/lib/api/award_emoji.rb
+++ b/lib/api/award_emoji.rb
@@ -3,7 +3,7 @@ module API
include PaginationParams
before { authenticate! }
- AWARDABLES = %w[issue merge_request snippet]
+ AWARDABLES = %w[issue merge_request snippet].freeze
resource :projects do
AWARDABLES.each do |awardable_type|
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index a1db2099693..d0efa7b993b 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -3,7 +3,7 @@ module API
include Gitlab::Utils
include Helpers::Pagination
- SUDO_HEADER = "HTTP_SUDO"
+ SUDO_HEADER = "HTTP_SUDO".freeze
SUDO_PARAM = :sudo
def declared_params(options = {})
diff --git a/lib/api/notes.rb b/lib/api/notes.rb
index 8beccaaabd1..c680b77f3d9 100644
--- a/lib/api/notes.rb
+++ b/lib/api/notes.rb
@@ -4,7 +4,7 @@ module API
before { authenticate! }
- NOTEABLE_TYPES = [Issue, MergeRequest, Snippet]
+ NOTEABLE_TYPES = [Issue, MergeRequest, Snippet].freeze
params do
requires :id, type: String, desc: 'The ID of a project'
diff --git a/lib/api/todos.rb b/lib/api/todos.rb
index 0b9650b296c..e59030428da 100644
--- a/lib/api/todos.rb
+++ b/lib/api/todos.rb
@@ -7,7 +7,7 @@ module API
ISSUABLE_TYPES = {
'merge_requests' => ->(id) { find_merge_request_with_access(id) },
'issues' => ->(id) { find_project_issue(id) }
- }
+ }.freeze
params do
requires :id, type: String, desc: 'The ID of a project'