OSDN Git Service

Syntax cleanup
authorJohannes Becker <jb@jbecker.it>
Wed, 25 Sep 2013 14:54:34 +0000 (16:54 +0200)
committerJohannes Becker <jb@jbecker.it>
Wed, 25 Sep 2013 14:54:34 +0000 (16:54 +0200)
app/models/pivotaltracker_service.rb

index 4efdafa..f28e142 100644 (file)
@@ -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