summaryrefslogtreecommitdiff
path: root/lib/api/v3
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-06-02 19:11:26 +0200
committerRémy Coutable <remy@rymai.me>2017-06-02 19:11:26 +0200
commit4cfa5ce4a95379a9ebe08f57b170af4b5ee9a9a5 (patch)
treecf94edeb5c02688e6e07ad8e27ceb1a6345b100c /lib/api/v3
parent1e8dbd46758d5c9772baf233ebcff889dc742d3d (diff)
downloadgitlab-ce-4cfa5ce4a95379a9ebe08f57b170af4b5ee9a9a5.tar.gz
Enable the Style/PreferredHashMethods coprc/enable-PreferredHashMethods-cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/v3')
-rw-r--r--lib/api/v3/projects.rb2
-rw-r--r--lib/api/v3/time_tracking_endpoints.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/v3/projects.rb b/lib/api/v3/projects.rb
index 896c00b88e7..20976b9dd08 100644
--- a/lib/api/v3/projects.rb
+++ b/lib/api/v3/projects.rb
@@ -44,7 +44,7 @@ module API
end
def set_only_allow_merge_if_pipeline_succeeds!
- if params.has_key?(:only_allow_merge_if_build_succeeds)
+ if params.key?(:only_allow_merge_if_build_succeeds)
params[:only_allow_merge_if_pipeline_succeeds] = params.delete(:only_allow_merge_if_build_succeeds)
end
end
diff --git a/lib/api/v3/time_tracking_endpoints.rb b/lib/api/v3/time_tracking_endpoints.rb
index 81ae4e8137d..d5b90e435ba 100644
--- a/lib/api/v3/time_tracking_endpoints.rb
+++ b/lib/api/v3/time_tracking_endpoints.rb
@@ -6,7 +6,7 @@ module API
included do
helpers do
def issuable_name
- declared_params.has_key?(:issue_id) ? 'issue' : 'merge_request'
+ declared_params.key?(:issue_id) ? 'issue' : 'merge_request'
end
def issuable_key