From fa8588827e45946464298fb7e36f4dcd24f0c4fb Mon Sep 17 00:00:00 2001 From: Johannes Becker Date: Wed, 25 Sep 2013 16:54:34 +0200 Subject: [PATCH] Syntax cleanup --- app/models/pivotaltracker_service.rb | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/app/models/pivotaltracker_service.rb b/app/models/pivotaltracker_service.rb index 4efdafa97..f28e142da 100644 --- a/app/models/pivotaltracker_service.rb +++ b/app/models/pivotaltracker_service.rb @@ -38,18 +38,22 @@ class PivotaltrackerService < Service def execute(push) url = 'https://www.pivotaltracker.com/services/v5/source_commits' push[:commits].each do |commit| - message = {'source_commit' => - {'commit_id' => commit[:id], - 'author' => commit[:author][:name], - 'url' => commit[:url], - 'message' => commit[:message]} - } - status = PivotaltrackerService.post(url, - body: message.to_json, - headers: {'Content-Type' => 'application/json', - 'X-TrackerToken' => token} - ) + message = { + 'source_commit' => { + 'commit_id' => commit[:id], + 'author' => commit[:author][:name], + 'url' => commit[:url], + 'message' => commit[:message] + } + } + PivotaltrackerService.post( + url, + body: message.to_json, + headers: { + 'Content-Type' => 'application/json', + 'X-TrackerToken' => token + } + ) end end - end -- 2.11.0