{"action":"created","comment":{"url":"https://api.github.com/repos/fusor/fusor/pulls/comments/63454884","id":63454884,"diff_hunk":"@@ -87,5 +89,42 @@ def find_deployment\n     def customer_portal_credentials\n       { :username => session[:portal_username], :password => session[:portal_password] }\n     end\n+\n+    def save_deployment_attributes\n+      path = ::Fusor.log_file_dir(@deployment.label, @deployment.id)\n+      if !File.directory?(path)\n+        Utils::Fusor::CommandUtils.run_command(\"mkdir -p #{path}\")\n+      end\n+\n+      dep_file = \"#{path}/deployment.json\"\n+      if File.file?(dep_file)\n+        Utils::Fusor::CommandUtils.run_command(\"rm -f #{dep_file}\")\n+      end","path":"server/app/controllers/fusor/api/v2/deployments_controller.rb","position":23,"original_position":23,"commit_id":"d3e7180a389a75c227a1831852032213f4db4f4b","original_commit_id":"d3e7180a389a75c227a1831852032213f4db4f4b","user":{"login":"johnkim76","id":2566892,"avatar_url":"https://avatars.githubusercontent.com/u/2566892?v=3","gravatar_id":"","url":"https://api.github.com/users/johnkim76","html_url":"https://github.com/johnkim76","followers_url":"https://api.github.com/users/johnkim76/followers","following_url":"https://api.github.com/users/johnkim76/following{/other_user}","gists_url":"https://api.github.com/users/johnkim76/gists{/gist_id}","starred_url":"https://api.github.com/users/johnkim76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnkim76/subscriptions","organizations_url":"https://api.github.com/users/johnkim76/orgs","repos_url":"https://api.github.com/users/johnkim76/repos","events_url":"https://api.github.com/users/johnkim76/events{/privacy}","received_events_url":"https://api.github.com/users/johnkim76/received_events","type":"User","site_admin":false},"body":"+1","created_at":"2016-05-17T01:55:41Z","updated_at":"2016-05-17T01:55:41Z","html_url":"https://github.com/fusor/fusor/pull/864#discussion_r63454884","pull_request_url":"https://api.github.com/repos/fusor/fusor/pulls/864","_links":{"self":{"href":"https://api.github.com/repos/fusor/fusor/pulls/comments/63454884"},"html":{"href":"https://github.com/fusor/fusor/pull/864#discussion_r63454884"},"pull_request":{"href":"https://api.github.com/repos/fusor/fusor/pulls/864"}}},"pull_request":{"url":"https://api.github.com/repos/fusor/fusor/pulls/864","id":70272837,"html_url":"https://github.com/fusor/fusor/pull/864","diff_url":"https://github.com/fusor/fusor/pull/864.diff","patch_url":"https://github.com/fusor/fusor/pull/864.patch","issue_url":"https://api.github.com/repos/fusor/fusor/issues/864","number":864,"state":"open","locked":false,"title":"log and save to file the deployment object","user":{"login":"johnkim76","id":2566892,"avatar_url":"https://avatars.githubusercontent.com/u/2566892?v=3","gravatar_id":"","url":"https://api.github.com/users/johnkim76","html_url":"https://github.com/johnkim76","followers_url":"https://api.github.com/users/johnkim76/followers","following_url":"https://api.github.com/users/johnkim76/following{/other_user}","gists_url":"https://api.github.com/users/johnkim76/gists{/gist_id}","starred_url":"https://api.github.com/users/johnkim76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnkim76/subscriptions","organizations_url":"https://api.github.com/users/johnkim76/orgs","repos_url":"https://api.github.com/users/johnkim76/repos","events_url":"https://api.github.com/users/johnkim76/events{/privacy}","received_events_url":"https://api.github.com/users/johnkim76/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-16T22:31:50Z","updated_at":"2016-05-17T01:55:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22b61e131eeb1f6bd30dd2ae90f91768ba6971f8","assignee":{"login":"jmrodri","id":17137,"avatar_url":"https://avatars.githubusercontent.com/u/17137?v=3","gravatar_id":"","url":"https://api.github.com/users/jmrodri","html_url":"https://github.com/jmrodri","followers_url":"https://api.github.com/users/jmrodri/followers","following_url":"https://api.github.com/users/jmrodri/following{/other_user}","gists_url":"https://api.github.com/users/jmrodri/gists{/gist_id}","starred_url":"https://api.github.com/users/jmrodri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmrodri/subscriptions","organizations_url":"https://api.github.com/users/jmrodri/orgs","repos_url":"https://api.github.com/users/jmrodri/repos","events_url":"https://api.github.com/users/jmrodri/events{/privacy}","received_events_url":"https://api.github.com/users/jmrodri/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/fusor/fusor/pulls/864/commits","review_comments_url":"https://api.github.com/repos/fusor/fusor/pulls/864/comments","review_comment_url":"https://api.github.com/repos/fusor/fusor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fusor/fusor/issues/864/comments","statuses_url":"https://api.github.com/repos/fusor/fusor/statuses/d3e7180a389a75c227a1831852032213f4db4f4b","head":{"label":"fusor:log_deployment_object","ref":"log_deployment_object","sha":"d3e7180a389a75c227a1831852032213f4db4f4b","user":{"login":"fusor","id":9267379,"avatar_url":"https://avatars.githubusercontent.com/u/9267379?v=3","gravatar_id":"","url":"https://api.github.com/users/fusor","html_url":"https://github.com/fusor","followers_url":"https://api.github.com/users/fusor/followers","following_url":"https://api.github.com/users/fusor/following{/other_user}","gists_url":"https://api.github.com/users/fusor/gists{/gist_id}","starred_url":"https://api.github.com/users/fusor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusor/subscriptions","organizations_url":"https://api.github.com/users/fusor/orgs","repos_url":"https://api.github.com/users/fusor/repos","events_url":"https://api.github.com/users/fusor/events{/privacy}","received_events_url":"https://api.github.com/users/fusor/received_events","type":"Organization","site_admin":false},"repo":{"id":25686301,"name":"fusor","full_name":"fusor/fusor","owner":{"login":"fusor","id":9267379,"avatar_url":"https://avatars.githubusercontent.com/u/9267379?v=3","gravatar_id":"","url":"https://api.github.com/users/fusor","html_url":"https://github.com/fusor","followers_url":"https://api.github.com/users/fusor/followers","following_url":"https://api.github.com/users/fusor/following{/other_user}","gists_url":"https://api.github.com/users/fusor/gists{/gist_id}","starred_url":"https://api.github.com/users/fusor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusor/subscriptions","organizations_url":"https://api.github.com/users/fusor/orgs","repos_url":"https://api.github.com/users/fusor/repos","events_url":"https://api.github.com/users/fusor/events{/privacy}","received_events_url":"https://api.github.com/users/fusor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fusor/fusor","description":"","fork":false,"url":"https://api.github.com/repos/fusor/fusor","forks_url":"https://api.github.com/repos/fusor/fusor/forks","keys_url":"https://api.github.com/repos/fusor/fusor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusor/fusor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusor/fusor/teams","hooks_url":"https://api.github.com/repos/fusor/fusor/hooks","issue_events_url":"https://api.github.com/repos/fusor/fusor/issues/events{/number}","events_url":"https://api.github.com/repos/fusor/fusor/events","assignees_url":"https://api.github.com/repos/fusor/fusor/assignees{/user}","branches_url":"https://api.github.com/repos/fusor/fusor/branches{/branch}","tags_url":"https://api.github.com/repos/fusor/fusor/tags","blobs_url":"https://api.github.com/repos/fusor/fusor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusor/fusor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusor/fusor/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusor/fusor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusor/fusor/statuses/{sha}","languages_url":"https://api.github.com/repos/fusor/fusor/languages","stargazers_url":"https://api.github.com/repos/fusor/fusor/stargazers","contributors_url":"https://api.github.com/repos/fusor/fusor/contributors","subscribers_url":"https://api.github.com/repos/fusor/fusor/subscribers","subscription_url":"https://api.github.com/repos/fusor/fusor/subscription","commits_url":"https://api.github.com/repos/fusor/fusor/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusor/fusor/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusor/fusor/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusor/fusor/issues/comments{/number}","contents_url":"https://api.github.com/repos/fusor/fusor/contents/{+path}","compare_url":"https://api.github.com/repos/fusor/fusor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusor/fusor/merges","archive_url":"https://api.github.com/repos/fusor/fusor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusor/fusor/downloads","issues_url":"https://api.github.com/repos/fusor/fusor/issues{/number}","pulls_url":"https://api.github.com/repos/fusor/fusor/pulls{/number}","milestones_url":"https://api.github.com/repos/fusor/fusor/milestones{/number}","notifications_url":"https://api.github.com/repos/fusor/fusor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusor/fusor/labels{/name}","releases_url":"https://api.github.com/repos/fusor/fusor/releases{/id}","deployments_url":"https://api.github.com/repos/fusor/fusor/deployments","created_at":"2014-10-24T11:57:40Z","updated_at":"2016-04-22T01:21:14Z","pushed_at":"2016-05-16T22:31:50Z","git_url":"git://github.com/fusor/fusor.git","ssh_url":"git@github.com:fusor/fusor.git","clone_url":"https://github.com/fusor/fusor.git","svn_url":"https://github.com/fusor/fusor","homepage":null,"size":40051,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":8,"forks":24,"open_issues":8,"watchers":5,"default_branch":"master"}},"base":{"label":"fusor:master","ref":"master","sha":"99220e9789939a8ddc013a6a0357354f14187d41","user":{"login":"fusor","id":9267379,"avatar_url":"https://avatars.githubusercontent.com/u/9267379?v=3","gravatar_id":"","url":"https://api.github.com/users/fusor","html_url":"https://github.com/fusor","followers_url":"https://api.github.com/users/fusor/followers","following_url":"https://api.github.com/users/fusor/following{/other_user}","gists_url":"https://api.github.com/users/fusor/gists{/gist_id}","starred_url":"https://api.github.com/users/fusor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusor/subscriptions","organizations_url":"https://api.github.com/users/fusor/orgs","repos_url":"https://api.github.com/users/fusor/repos","events_url":"https://api.github.com/users/fusor/events{/privacy}","received_events_url":"https://api.github.com/users/fusor/received_events","type":"Organization","site_admin":false},"repo":{"id":25686301,"name":"fusor","full_name":"fusor/fusor","owner":{"login":"fusor","id":9267379,"avatar_url":"https://avatars.githubusercontent.com/u/9267379?v=3","gravatar_id":"","url":"https://api.github.com/users/fusor","html_url":"https://github.com/fusor","followers_url":"https://api.github.com/users/fusor/followers","following_url":"https://api.github.com/users/fusor/following{/other_user}","gists_url":"https://api.github.com/users/fusor/gists{/gist_id}","starred_url":"https://api.github.com/users/fusor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusor/subscriptions","organizations_url":"https://api.github.com/users/fusor/orgs","repos_url":"https://api.github.com/users/fusor/repos","events_url":"https://api.github.com/users/fusor/events{/privacy}","received_events_url":"https://api.github.com/users/fusor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fusor/fusor","description":"","fork":false,"url":"https://api.github.com/repos/fusor/fusor","forks_url":"https://api.github.com/repos/fusor/fusor/forks","keys_url":"https://api.github.com/repos/fusor/fusor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusor/fusor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusor/fusor/teams","hooks_url":"https://api.github.com/repos/fusor/fusor/hooks","issue_events_url":"https://api.github.com/repos/fusor/fusor/issues/events{/number}","events_url":"https://api.github.com/repos/fusor/fusor/events","assignees_url":"https://api.github.com/repos/fusor/fusor/assignees{/user}","branches_url":"https://api.github.com/repos/fusor/fusor/branches{/branch}","tags_url":"https://api.github.com/repos/fusor/fusor/tags","blobs_url":"https://api.github.com/repos/fusor/fusor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusor/fusor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusor/fusor/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusor/fusor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusor/fusor/statuses/{sha}","languages_url":"https://api.github.com/repos/fusor/fusor/languages","stargazers_url":"https://api.github.com/repos/fusor/fusor/stargazers","contributors_url":"https://api.github.com/repos/fusor/fusor/contributors","subscribers_url":"https://api.github.com/repos/fusor/fusor/subscribers","subscription_url":"https://api.github.com/repos/fusor/fusor/subscription","commits_url":"https://api.github.com/repos/fusor/fusor/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusor/fusor/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusor/fusor/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusor/fusor/issues/comments{/number}","contents_url":"https://api.github.com/repos/fusor/fusor/contents/{+path}","compare_url":"https://api.github.com/repos/fusor/fusor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusor/fusor/merges","archive_url":"https://api.github.com/repos/fusor/fusor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusor/fusor/downloads","issues_url":"https://api.github.com/repos/fusor/fusor/issues{/number}","pulls_url":"https://api.github.com/repos/fusor/fusor/pulls{/number}","milestones_url":"https://api.github.com/repos/fusor/fusor/milestones{/number}","notifications_url":"https://api.github.com/repos/fusor/fusor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusor/fusor/labels{/name}","releases_url":"https://api.github.com/repos/fusor/fusor/releases{/id}","deployments_url":"https://api.github.com/repos/fusor/fusor/deployments","created_at":"2014-10-24T11:57:40Z","updated_at":"2016-04-22T01:21:14Z","pushed_at":"2016-05-16T22:31:50Z","git_url":"git://github.com/fusor/fusor.git","ssh_url":"git@github.com:fusor/fusor.git","clone_url":"https://github.com/fusor/fusor.git","svn_url":"https://github.com/fusor/fusor","homepage":null,"size":40051,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":8,"forks":24,"open_issues":8,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fusor/fusor/pulls/864"},"html":{"href":"https://github.com/fusor/fusor/pull/864"},"issue":{"href":"https://api.github.com/repos/fusor/fusor/issues/864"},"comments":{"href":"https://api.github.com/repos/fusor/fusor/issues/864/comments"},"review_comments":{"href":"https://api.github.com/repos/fusor/fusor/pulls/864/comments"},"review_comment":{"href":"https://api.github.com/repos/fusor/fusor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fusor/fusor/pulls/864/commits"},"statuses":{"href":"https://api.github.com/repos/fusor/fusor/statuses/d3e7180a389a75c227a1831852032213f4db4f4b"}}}}