lib/gitlab/client/issues.rb in gitlab-3.5.0 vs lib/gitlab/client/issues.rb in gitlab-3.6.0

- old
+ new

@@ -15,13 +15,13 @@ # @option options [Integer] :page The page number. # @option options [Integer] :per_page The number of results per page. # @return [Array<Gitlab::ObjectifiedHash>] def issues(project=nil, options={}) if project.to_i.zero? - get("/issues", :query => options) + get("/issues", query: options) else - get("/projects/#{project}/issues", :query => options) + get("/projects/#{project}/issues", query: options) end end # Gets a single issue. # @@ -48,12 +48,12 @@ # @option options [Integer] :assignee_id The ID of a user to assign issue. # @option options [Integer] :milestone_id The ID of a milestone to assign issue. # @option options [String] :labels Comma-separated label names for an issue. # @return [Gitlab::ObjectifiedHash] Information about created issue. def create_issue(project, title, options={}) - body = {:title => title}.merge(options) - post("/projects/#{project}/issues", :body => body) + body = { title: title }.merge(options) + post("/projects/#{project}/issues", body: body) end # Updates an issue. # # @example @@ -68,11 +68,11 @@ # @option options [Integer] :milestone_id The ID of a milestone to assign issue. # @option options [String] :labels Comma-separated label names for an issue. # @option options [String] :state_event The state event of an issue ('close' or 'reopen'). # @return [Gitlab::ObjectifiedHash] Information about updated issue. def edit_issue(project, id, options={}) - put("/projects/#{project}/issues/#{id}", :body => options) + put("/projects/#{project}/issues/#{id}", body: options) end # Closes an issue. # # @example @@ -80,11 +80,11 @@ # # @param [Integer] project The ID of a project. # @param [Integer] id The ID of an issue. # @return [Gitlab::ObjectifiedHash] Information about closed issue. def close_issue(project, id) - put("/projects/#{project}/issues/#{id}", :body => {:state_event => 'close'}) + put("/projects/#{project}/issues/#{id}", body: { state_event: 'close' }) end # Reopens an issue. # # @example @@ -92,9 +92,9 @@ # # @param [Integer] project The ID of a project. # @param [Integer] id The ID of an issue. # @return [Gitlab::ObjectifiedHash] Information about reopened issue. def reopen_issue(project, id) - put("/projects/#{project}/issues/#{id}", :body => {:state_event => 'reopen'}) + put("/projects/#{project}/issues/#{id}", body: { state_event: 'reopen' }) end end end