summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/deploy_keys.rb2
-rw-r--r--lib/api/helpers.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb
index 825e05fbae3..f743cbb5cca 100644
--- a/lib/api/deploy_keys.rb
+++ b/lib/api/deploy_keys.rb
@@ -19,7 +19,7 @@ module API
# Routing "projects/:id/keys/..." is DEPRECATED and WILL BE REMOVED in version 9.0
# Use "projects/:id/deploy_keys/..." instead.
#
- %w(keys deploy_keys).each do |path|
+ %w[keys deploy_keys].each do |path|
desc "Get a specific project's deploy keys" do
success Entities::SSHKey
end
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 714d4ea3dc6..f00937ce94c 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -338,7 +338,7 @@ module API
end
def project_order_by
- order_fields = %w(id name path created_at updated_at last_activity_at)
+ order_fields = %w[id name path created_at updated_at last_activity_at]
if order_fields.include?(params['order_by'])
params['order_by']
@@ -367,7 +367,7 @@ module API
# sanitize file paths
# this requires all paths to exist
- required_attributes! %W(#{field}.path)
+ required_attributes! %W[#{field}.path]
uploads_path = File.realpath(uploads_path)
file_path = File.realpath(params["#{field}.path"])
bad_request!('Bad file path') unless file_path.start_with?(uploads_path)