summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-10-20 18:51:03 +0200
committerRémy Coutable <remy@rymai.me>2016-10-20 19:08:46 +0200
commitb4359fb24e599c278edeae843bd6a25c980b1243 (patch)
treeb9ddf5c4e9e8e30f1d158e5c17b2d0e99e02fec0
parentde12e6f0c4689155d049b56d97625627379a40b7 (diff)
downloadgitlab-ce-fix-ruby-2-1-failures.tar.gz
Don't use Hash#slice since it's not supported in Ruby 2.1fix-ruby-2-1-failures
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--lib/api/commit_statuses.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb
index f282a3b9cd6..f54d4f06627 100644
--- a/lib/api/commit_statuses.rb
+++ b/lib/api/commit_statuses.rb
@@ -67,9 +67,14 @@ module API
pipeline = @project.ensure_pipeline(ref, commit.sha, current_user)
status = GenericCommitStatus.running_or_pending.find_or_initialize_by(
- project: @project, pipeline: pipeline,
- user: current_user, name: name, ref: ref)
- status.attributes = declared(params).slice(:target_url, :description)
+ project: @project,
+ pipeline: pipeline,
+ user: current_user,
+ name: name,
+ ref: ref,
+ target_url: params[:target_url],
+ description: params[:description]
+ )
begin
case params[:state].to_s