diff options
author | Stan Hu <stanhu@gmail.com> | 2016-10-20 18:47:27 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-10-20 18:47:27 +0000 |
commit | 60eca5f7b5e38c09c8170682852c497c410a96ac (patch) | |
tree | 2e20a2378473e4078a97a2f2066766ebbcf3793b | |
parent | 1b31867ec053dfcb03043c4be7dff104d8977898 (diff) | |
parent | b4359fb24e599c278edeae843bd6a25c980b1243 (diff) | |
download | gitlab-ce-60eca5f7b5e38c09c8170682852c497c410a96ac.tar.gz |
Merge branch 'fix-ruby-2-1-failures' into 'master'
Don't use Hash#slice since it's not supported in Ruby 2.1
There is currently a build failure in `master` and this MR fixes it. The issue was introduced by !6879.
The problem is that `Hash#slice` doesn't exists in Ruby 2.1. I've created an issue to take care of the other places we're using `Hash#slice`: #23590
See merge request !7025
-rw-r--r-- | lib/api/commit_statuses.rb | 11 |
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 |