{"action":"created","comment":{"url":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/comments/37804843","id":37804843,"diff_hunk":"@@ -0,0 +1,91 @@\n+require \"common/models/Diff\"\n+require \"util/Colors\"\n+\n+module Cumulus\n+  module CloudFront\n+\n+  \t# Public: The types of changes that can be made to zones\n+    module OriginChange\n+      include Common::DiffChange\n+\n+      DOMAIN = Common::DiffChange::next_change_id\n+      PATH = Common::DiffChange::next_change_id\n+      S3 = Common::DiffChange::next_change_id\n+      CUSTOM = Common::DiffChange::next_change_id\n+    end\n+\n+    # Public: Represents a single difference between local configuration and AWS\n+    # configuration of zones.\n+    class OriginDiff < Common::Diff\n+      include OriginChange\n+\n+      attr_accessor :custom_changes\n+\n+      # Public: Static method that produces a diff representing changes in custom origin\n+      #\n+      # changed_origins - the CustomOriginDiffs\n+      # local           - the local configuration for the zone\n+      #\n+      # Returns the diff\n+      def self.custom(changes, local)\n+        diff = OriginDiff.new(CUSTOM, nil, local)\n+        diff.custom_changes = changes\n+        diff\n+      end\n+\n+      def diff_string\n+        case @type\n+        when DOMAIN\n+          [\n+            \"domain:\",\n+            Colors.aws_changes(\"\\tAWS - #{@aws.domain_name}\"),\n+            Colors.local_changes(\"\\tLocal - #{@local.domain_name}\"),\n+          ].join(\"\\n\")\n+        when PATH\n+          [\n+            \"path:\",\n+            Colors.aws_changes(\"\\tAWS - #{@aws.origin_path}\"),\n+            Colors.local_changes(\"\\tLocal - #{@local.origin_path}\"),\n+          ].join(\"\\n\")\n+        when S3\n+          aws_value = (@aws.s3_origin_config.origin_access_identity rescue nil)\n+          [\n+            \"s3-origin-access-identity:\",","path":"lib/cloudfront/models/OriginDiff.rb","position":53,"original_position":53,"commit_id":"109c12978389af6085adae3442acdbc01b1386a5","original_commit_id":"109c12978389af6085adae3442acdbc01b1386a5","user":{"login":"msiebert","id":1504059,"avatar_url":"https://avatars.githubusercontent.com/u/1504059?v=3","gravatar_id":"","url":"https://api.github.com/users/msiebert","html_url":"https://github.com/msiebert","followers_url":"https://api.github.com/users/msiebert/followers","following_url":"https://api.github.com/users/msiebert/following{/other_user}","gists_url":"https://api.github.com/users/msiebert/gists{/gist_id}","starred_url":"https://api.github.com/users/msiebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msiebert/subscriptions","organizations_url":"https://api.github.com/users/msiebert/orgs","repos_url":"https://api.github.com/users/msiebert/repos","events_url":"https://api.github.com/users/msiebert/events{/privacy}","received_events_url":"https://api.github.com/users/msiebert/received_events","type":"User","site_admin":false},"body":"UGRY!","created_at":"2015-08-24T21:07:53Z","updated_at":"2015-08-24T21:07:53Z","html_url":"https://github.com/lucidsoftware/cumulus/pull/58#discussion_r37804843","pull_request_url":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/comments/37804843"},"html":{"href":"https://github.com/lucidsoftware/cumulus/pull/58#discussion_r37804843"},"pull_request":{"href":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/58","id":43217220,"html_url":"https://github.com/lucidsoftware/cumulus/pull/58","diff_url":"https://github.com/lucidsoftware/cumulus/pull/58.diff","patch_url":"https://github.com/lucidsoftware/cumulus/pull/58.patch","issue_url":"https://api.github.com/repos/lucidsoftware/cumulus/issues/58","number":58,"state":"open","locked":false,"title":"Cloudfront management","user":{"login":"krjackso","id":2296020,"avatar_url":"https://avatars.githubusercontent.com/u/2296020?v=3","gravatar_id":"","url":"https://api.github.com/users/krjackso","html_url":"https://github.com/krjackso","followers_url":"https://api.github.com/users/krjackso/followers","following_url":"https://api.github.com/users/krjackso/following{/other_user}","gists_url":"https://api.github.com/users/krjackso/gists{/gist_id}","starred_url":"https://api.github.com/users/krjackso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krjackso/subscriptions","organizations_url":"https://api.github.com/users/krjackso/orgs","repos_url":"https://api.github.com/users/krjackso/repos","events_url":"https://api.github.com/users/krjackso/events{/privacy}","received_events_url":"https://api.github.com/users/krjackso/received_events","type":"User","site_admin":false},"body":"Done: Diffing, updating, creating distributions\r\nNot done: Invalidations, migration","created_at":"2015-08-24T20:22:48Z","updated_at":"2015-08-24T21:07:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5082ab6242ae8bac91f4100219b536128e85dee1","assignee":{"login":"msiebert","id":1504059,"avatar_url":"https://avatars.githubusercontent.com/u/1504059?v=3","gravatar_id":"","url":"https://api.github.com/users/msiebert","html_url":"https://github.com/msiebert","followers_url":"https://api.github.com/users/msiebert/followers","following_url":"https://api.github.com/users/msiebert/following{/other_user}","gists_url":"https://api.github.com/users/msiebert/gists{/gist_id}","starred_url":"https://api.github.com/users/msiebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msiebert/subscriptions","organizations_url":"https://api.github.com/users/msiebert/orgs","repos_url":"https://api.github.com/users/msiebert/repos","events_url":"https://api.github.com/users/msiebert/events{/privacy}","received_events_url":"https://api.github.com/users/msiebert/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/58/commits","review_comments_url":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/58/comments","review_comment_url":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lucidsoftware/cumulus/issues/58/comments","statuses_url":"https://api.github.com/repos/lucidsoftware/cumulus/statuses/109c12978389af6085adae3442acdbc01b1386a5","head":{"label":"lucidsoftware:cloudfront-management","ref":"cloudfront-management","sha":"109c12978389af6085adae3442acdbc01b1386a5","user":{"login":"lucidsoftware","id":3140022,"avatar_url":"https://avatars.githubusercontent.com/u/3140022?v=3","gravatar_id":"","url":"https://api.github.com/users/lucidsoftware","html_url":"https://github.com/lucidsoftware","followers_url":"https://api.github.com/users/lucidsoftware/followers","following_url":"https://api.github.com/users/lucidsoftware/following{/other_user}","gists_url":"https://api.github.com/users/lucidsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/lucidsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucidsoftware/subscriptions","organizations_url":"https://api.github.com/users/lucidsoftware/orgs","repos_url":"https://api.github.com/users/lucidsoftware/repos","events_url":"https://api.github.com/users/lucidsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/lucidsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":37272065,"name":"cumulus","full_name":"lucidsoftware/cumulus","owner":{"login":"lucidsoftware","id":3140022,"avatar_url":"https://avatars.githubusercontent.com/u/3140022?v=3","gravatar_id":"","url":"https://api.github.com/users/lucidsoftware","html_url":"https://github.com/lucidsoftware","followers_url":"https://api.github.com/users/lucidsoftware/followers","following_url":"https://api.github.com/users/lucidsoftware/following{/other_user}","gists_url":"https://api.github.com/users/lucidsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/lucidsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucidsoftware/subscriptions","organizations_url":"https://api.github.com/users/lucidsoftware/orgs","repos_url":"https://api.github.com/users/lucidsoftware/repos","events_url":"https://api.github.com/users/lucidsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/lucidsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lucidsoftware/cumulus","description":"Cloudformation alternative","fork":false,"url":"https://api.github.com/repos/lucidsoftware/cumulus","forks_url":"https://api.github.com/repos/lucidsoftware/cumulus/forks","keys_url":"https://api.github.com/repos/lucidsoftware/cumulus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucidsoftware/cumulus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucidsoftware/cumulus/teams","hooks_url":"https://api.github.com/repos/lucidsoftware/cumulus/hooks","issue_events_url":"https://api.github.com/repos/lucidsoftware/cumulus/issues/events{/number}","events_url":"https://api.github.com/repos/lucidsoftware/cumulus/events","assignees_url":"https://api.github.com/repos/lucidsoftware/cumulus/assignees{/user}","branches_url":"https://api.github.com/repos/lucidsoftware/cumulus/branches{/branch}","tags_url":"https://api.github.com/repos/lucidsoftware/cumulus/tags","blobs_url":"https://api.github.com/repos/lucidsoftware/cumulus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucidsoftware/cumulus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucidsoftware/cumulus/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucidsoftware/cumulus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucidsoftware/cumulus/statuses/{sha}","languages_url":"https://api.github.com/repos/lucidsoftware/cumulus/languages","stargazers_url":"https://api.github.com/repos/lucidsoftware/cumulus/stargazers","contributors_url":"https://api.github.com/repos/lucidsoftware/cumulus/contributors","subscribers_url":"https://api.github.com/repos/lucidsoftware/cumulus/subscribers","subscription_url":"https://api.github.com/repos/lucidsoftware/cumulus/subscription","commits_url":"https://api.github.com/repos/lucidsoftware/cumulus/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucidsoftware/cumulus/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucidsoftware/cumulus/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucidsoftware/cumulus/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucidsoftware/cumulus/contents/{+path}","compare_url":"https://api.github.com/repos/lucidsoftware/cumulus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucidsoftware/cumulus/merges","archive_url":"https://api.github.com/repos/lucidsoftware/cumulus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucidsoftware/cumulus/downloads","issues_url":"https://api.github.com/repos/lucidsoftware/cumulus/issues{/number}","pulls_url":"https://api.github.com/repos/lucidsoftware/cumulus/pulls{/number}","milestones_url":"https://api.github.com/repos/lucidsoftware/cumulus/milestones{/number}","notifications_url":"https://api.github.com/repos/lucidsoftware/cumulus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucidsoftware/cumulus/labels{/name}","releases_url":"https://api.github.com/repos/lucidsoftware/cumulus/releases{/id}","created_at":"2015-06-11T16:16:04Z","updated_at":"2015-08-17T17:59:53Z","pushed_at":"2015-08-24T20:22:48Z","git_url":"git://github.com/lucidsoftware/cumulus.git","ssh_url":"git@github.com:lucidsoftware/cumulus.git","clone_url":"https://github.com/lucidsoftware/cumulus.git","svn_url":"https://github.com/lucidsoftware/cumulus","homepage":null,"size":1200,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"base":{"label":"lucidsoftware:master","ref":"master","sha":"5d0beec885aa57c68264b4cf31f8ccae9d97ba97","user":{"login":"lucidsoftware","id":3140022,"avatar_url":"https://avatars.githubusercontent.com/u/3140022?v=3","gravatar_id":"","url":"https://api.github.com/users/lucidsoftware","html_url":"https://github.com/lucidsoftware","followers_url":"https://api.github.com/users/lucidsoftware/followers","following_url":"https://api.github.com/users/lucidsoftware/following{/other_user}","gists_url":"https://api.github.com/users/lucidsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/lucidsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucidsoftware/subscriptions","organizations_url":"https://api.github.com/users/lucidsoftware/orgs","repos_url":"https://api.github.com/users/lucidsoftware/repos","events_url":"https://api.github.com/users/lucidsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/lucidsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":37272065,"name":"cumulus","full_name":"lucidsoftware/cumulus","owner":{"login":"lucidsoftware","id":3140022,"avatar_url":"https://avatars.githubusercontent.com/u/3140022?v=3","gravatar_id":"","url":"https://api.github.com/users/lucidsoftware","html_url":"https://github.com/lucidsoftware","followers_url":"https://api.github.com/users/lucidsoftware/followers","following_url":"https://api.github.com/users/lucidsoftware/following{/other_user}","gists_url":"https://api.github.com/users/lucidsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/lucidsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucidsoftware/subscriptions","organizations_url":"https://api.github.com/users/lucidsoftware/orgs","repos_url":"https://api.github.com/users/lucidsoftware/repos","events_url":"https://api.github.com/users/lucidsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/lucidsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lucidsoftware/cumulus","description":"Cloudformation alternative","fork":false,"url":"https://api.github.com/repos/lucidsoftware/cumulus","forks_url":"https://api.github.com/repos/lucidsoftware/cumulus/forks","keys_url":"https://api.github.com/repos/lucidsoftware/cumulus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucidsoftware/cumulus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucidsoftware/cumulus/teams","hooks_url":"https://api.github.com/repos/lucidsoftware/cumulus/hooks","issue_events_url":"https://api.github.com/repos/lucidsoftware/cumulus/issues/events{/number}","events_url":"https://api.github.com/repos/lucidsoftware/cumulus/events","assignees_url":"https://api.github.com/repos/lucidsoftware/cumulus/assignees{/user}","branches_url":"https://api.github.com/repos/lucidsoftware/cumulus/branches{/branch}","tags_url":"https://api.github.com/repos/lucidsoftware/cumulus/tags","blobs_url":"https://api.github.com/repos/lucidsoftware/cumulus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucidsoftware/cumulus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucidsoftware/cumulus/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucidsoftware/cumulus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucidsoftware/cumulus/statuses/{sha}","languages_url":"https://api.github.com/repos/lucidsoftware/cumulus/languages","stargazers_url":"https://api.github.com/repos/lucidsoftware/cumulus/stargazers","contributors_url":"https://api.github.com/repos/lucidsoftware/cumulus/contributors","subscribers_url":"https://api.github.com/repos/lucidsoftware/cumulus/subscribers","subscription_url":"https://api.github.com/repos/lucidsoftware/cumulus/subscription","commits_url":"https://api.github.com/repos/lucidsoftware/cumulus/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucidsoftware/cumulus/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucidsoftware/cumulus/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucidsoftware/cumulus/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucidsoftware/cumulus/contents/{+path}","compare_url":"https://api.github.com/repos/lucidsoftware/cumulus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucidsoftware/cumulus/merges","archive_url":"https://api.github.com/repos/lucidsoftware/cumulus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucidsoftware/cumulus/downloads","issues_url":"https://api.github.com/repos/lucidsoftware/cumulus/issues{/number}","pulls_url":"https://api.github.com/repos/lucidsoftware/cumulus/pulls{/number}","milestones_url":"https://api.github.com/repos/lucidsoftware/cumulus/milestones{/number}","notifications_url":"https://api.github.com/repos/lucidsoftware/cumulus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucidsoftware/cumulus/labels{/name}","releases_url":"https://api.github.com/repos/lucidsoftware/cumulus/releases{/id}","created_at":"2015-06-11T16:16:04Z","updated_at":"2015-08-17T17:59:53Z","pushed_at":"2015-08-24T20:22:48Z","git_url":"git://github.com/lucidsoftware/cumulus.git","ssh_url":"git@github.com:lucidsoftware/cumulus.git","clone_url":"https://github.com/lucidsoftware/cumulus.git","svn_url":"https://github.com/lucidsoftware/cumulus","homepage":null,"size":1200,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/58"},"html":{"href":"https://github.com/lucidsoftware/cumulus/pull/58"},"issue":{"href":"https://api.github.com/repos/lucidsoftware/cumulus/issues/58"},"comments":{"href":"https://api.github.com/repos/lucidsoftware/cumulus/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lucidsoftware/cumulus/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/lucidsoftware/cumulus/statuses/109c12978389af6085adae3442acdbc01b1386a5"}}}}