summaryrefslogtreecommitdiff
path: root/lib/api/custom_attributes_endpoints.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /lib/api/custom_attributes_endpoints.rb
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-ce-tc-standard-gem.tar.gz
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'lib/api/custom_attributes_endpoints.rb')
-rw-r--r--lib/api/custom_attributes_endpoints.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/api/custom_attributes_endpoints.rb b/lib/api/custom_attributes_endpoints.rb
index 2149e04451e..d697d8b9f88 100644
--- a/lib/api/custom_attributes_endpoints.rb
+++ b/lib/api/custom_attributes_endpoints.rb
@@ -12,14 +12,14 @@ module API
helpers do
params :custom_attributes_key do
- requires :key, type: String, desc: 'The key of the custom attribute'
+ requires :key, type: String, desc: "The key of the custom attribute"
end
end
desc "Get all custom attributes on a #{attributable_name}" do
success Entities::CustomAttribute
end
- get ':id/custom_attributes' do
+ get ":id/custom_attributes" do
resource = public_send(attributable_finder, params[:id]) # rubocop:disable GitlabSecurity/PublicSend
authorize! :read_custom_attribute
@@ -33,7 +33,7 @@ module API
use :custom_attributes_key
end
# rubocop: disable CodeReuse/ActiveRecord
- get ':id/custom_attributes/:key' do
+ get ":id/custom_attributes/:key" do
resource = public_send(attributable_finder, params[:id]) # rubocop:disable GitlabSecurity/PublicSend
authorize! :read_custom_attribute
@@ -46,10 +46,10 @@ module API
desc "Set a custom attribute on a #{attributable_name}"
params do
use :custom_attributes_key
- requires :value, type: String, desc: 'The value of the custom attribute'
+ requires :value, type: String, desc: "The value of the custom attribute"
end
# rubocop: disable CodeReuse/ActiveRecord
- put ':id/custom_attributes/:key' do
+ put ":id/custom_attributes/:key" do
resource = public_send(attributable_finder, params[:id]) # rubocop:disable GitlabSecurity/PublicSend
authorize! :update_custom_attribute
@@ -71,7 +71,7 @@ module API
use :custom_attributes_key
end
# rubocop: disable CodeReuse/ActiveRecord
- delete ':id/custom_attributes/:key' do
+ delete ":id/custom_attributes/:key" do
resource = public_send(attributable_finder, params[:id]) # rubocop:disable GitlabSecurity/PublicSend
authorize! :update_custom_attribute