GitHub PullRequestReviewCommentEvent at 2014-11-26 19:39:24
Repository: omc
Actor: jhawthorn
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/freerunningtech/omc/pulls/comments/20958662","id":20958662,"diff_hunk":"@@ -50,8 +50,8 @@ def app\n     end\n \n     def instance\n-      layer_id = @layer_name ? stack.layers.detect{ |l| l[:shortname] == @layer_name }[:layer_id] : nil\n-      instances = stack.instances(layer_id: layer_id)\n+      layer = @layer_name ? stack.layers.detect{ |l| l[:shortname] == @layer_name } : nil","path":"lib/omc/stack_command.rb","position":6,"original_position":6,"commit_id":"33e1d03e16cabfa5f0d0fe0b2a4c29b772121a71","original_commit_id":"33e1d03e16cabfa5f0d0fe0b2a4c29b772121a71","user":{"login":"jhawthorn","id":131752,"avatar_url":"https://avatars.githubusercontent.com/u/131752?v=3","gravatar_id":"","url":"https://api.github.com/users/jhawthorn","html_url":"https://github.com/jhawthorn","followers_url":"https://api.github.com/users/jhawthorn/followers","following_url":"https://api.github.com/users/jhawthorn/following{/other_user}","gists_url":"https://api.github.com/users/jhawthorn/gists{/gist_id}","starred_url":"https://api.github.com/users/jhawthorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhawthorn/subscriptions","organizations_url":"https://api.github.com/users/jhawthorn/orgs","repos_url":"https://api.github.com/users/jhawthorn/repos","events_url":"https://api.github.com/users/jhawthorn/events{/privacy}","received_events_url":"https://api.github.com/users/jhawthorn/received_events","type":"User","site_admin":false},"body":"I think if `@layer_name` is not nil, this should error. The current logic is that if it can't find that layer, just use any instance.","created_at":"2014-11-26T19:39:24Z","updated_at":"2014-11-26T19:39:24Z","html_url":"https://github.com/freerunningtech/omc/pull/11#discussion_r20958662","pull_request_url":"https://api.github.com/repos/freerunningtech/omc/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/freerunningtech/omc/pulls/comments/20958662"},"html":{"href":"https://github.com/freerunningtech/omc/pull/11#discussion_r20958662"},"pull_request":{"href":"https://api.github.com/repos/freerunningtech/omc/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/freerunningtech/omc/pulls/11","id":25057541,"html_url":"https://github.com/freerunningtech/omc/pull/11","diff_url":"https://github.com/freerunningtech/omc/pull/11.diff","patch_url":"https://github.com/freerunningtech/omc/pull/11.patch","issue_url":"https://api.github.com/repos/freerunningtech/omc/issues/11","number":11,"state":"open","locked":false,"title":"Better memoization of instances and layers.","user":{"login":"adammathys","id":876067,"avatar_url":"https://avatars.githubusercontent.com/u/876067?v=3","gravatar_id":"","url":"https://api.github.com/users/adammathys","html_url":"https://github.com/adammathys","followers_url":"https://api.github.com/users/adammathys/followers","following_url":"https://api.github.com/users/adammathys/following{/other_user}","gists_url":"https://api.github.com/users/adammathys/gists{/gist_id}","starred_url":"https://api.github.com/users/adammathys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adammathys/subscriptions","organizations_url":"https://api.github.com/users/adammathys/orgs","repos_url":"https://api.github.com/users/adammathys/repos","events_url":"https://api.github.com/users/adammathys/events{/privacy}","received_events_url":"https://api.github.com/users/adammathys/received_events","type":"User","site_admin":false},"body":"Old code would stash the instances based on the layer. Which meant the following was possible, even if the layers didn't share any instances in common:\r\n\r\n```ruby\r\nstack = Omc::Stack.new\r\ninstances = stack.instances(layer_id: 'first-layer')\r\n\r\nother_instances = stack.instances(layer_id: 'other-layer')\r\n\r\ninstances == other_instances\r\n```","created_at":"2014-11-26T02:43:10Z","updated_at":"2014-11-26T19:39:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f618ca1cbcc4567d8b46b32e8e077bdcf70c9e2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/freerunningtech/omc/pulls/11/commits","review_comments_url":"https://api.github.com/repos/freerunningtech/omc/pulls/11/comments","review_comment_url":"https://api.github.com/repos/freerunningtech/omc/pulls/comments/{number}","comments_url":"https://api.github.com/repos/freerunningtech/omc/issues/11/comments","statuses_url":"https://api.github.com/repos/freerunningtech/omc/statuses/33e1d03e16cabfa5f0d0fe0b2a4c29b772121a71","head":{"label":"freerunningtech:layers","ref":"layers","sha":"33e1d03e16cabfa5f0d0fe0b2a4c29b772121a71","user":{"login":"freerunningtech","id":1585390,"avatar_url":"https://avatars.githubusercontent.com/u/1585390?v=3","gravatar_id":"","url":"https://api.github.com/users/freerunningtech","html_url":"https://github.com/freerunningtech","followers_url":"https://api.github.com/users/freerunningtech/followers","following_url":"https://api.github.com/users/freerunningtech/following{/other_user}","gists_url":"https://api.github.com/users/freerunningtech/gists{/gist_id}","starred_url":"https://api.github.com/users/freerunningtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freerunningtech/subscriptions","organizations_url":"https://api.github.com/users/freerunningtech/orgs","repos_url":"https://api.github.com/users/freerunningtech/repos","events_url":"https://api.github.com/users/freerunningtech/events{/privacy}","received_events_url":"https://api.github.com/users/freerunningtech/received_events","type":"Organization","site_admin":false},"repo":{"id":25554868,"name":"omc","full_name":"freerunningtech/omc","owner":{"login":"freerunningtech","id":1585390,"avatar_url":"https://avatars.githubusercontent.com/u/1585390?v=3","gravatar_id":"","url":"https://api.github.com/users/freerunningtech","html_url":"https://github.com/freerunningtech","followers_url":"https://api.github.com/users/freerunningtech/followers","following_url":"https://api.github.com/users/freerunningtech/following{/other_user}","gists_url":"https://api.github.com/users/freerunningtech/gists{/gist_id}","starred_url":"https://api.github.com/users/freerunningtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freerunningtech/subscriptions","organizations_url":"https://api.github.com/users/freerunningtech/orgs","repos_url":"https://api.github.com/users/freerunningtech/repos","events_url":"https://api.github.com/users/freerunningtech/events{/privacy}","received_events_url":"https://api.github.com/users/freerunningtech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freerunningtech/omc","description":"Opsworks' Missing Console","fork":false,"url":"https://api.github.com/repos/freerunningtech/omc","forks_url":"https://api.github.com/repos/freerunningtech/omc/forks","keys_url":"https://api.github.com/repos/freerunningtech/omc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freerunningtech/omc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freerunningtech/omc/teams","hooks_url":"https://api.github.com/repos/freerunningtech/omc/hooks","issue_events_url":"https://api.github.com/repos/freerunningtech/omc/issues/events{/number}","events_url":"https://api.github.com/repos/freerunningtech/omc/events","assignees_url":"https://api.github.com/repos/freerunningtech/omc/assignees{/user}","branches_url":"https://api.github.com/repos/freerunningtech/omc/branches{/branch}","tags_url":"https://api.github.com/repos/freerunningtech/omc/tags","blobs_url":"https://api.github.com/repos/freerunningtech/omc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freerunningtech/omc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freerunningtech/omc/git/refs{/sha}","trees_url":"https://api.github.com/repos/freerunningtech/omc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freerunningtech/omc/statuses/{sha}","languages_url":"https://api.github.com/repos/freerunningtech/omc/languages","stargazers_url":"https://api.github.com/repos/freerunningtech/omc/stargazers","contributors_url":"https://api.github.com/repos/freerunningtech/omc/contributors","subscribers_url":"https://api.github.com/repos/freerunningtech/omc/subscribers","subscription_url":"https://api.github.com/repos/freerunningtech/omc/subscription","commits_url":"https://api.github.com/repos/freerunningtech/omc/commits{/sha}","git_commits_url":"https://api.github.com/repos/freerunningtech/omc/git/commits{/sha}","comments_url":"https://api.github.com/repos/freerunningtech/omc/comments{/number}","issue_comment_url":"https://api.github.com/repos/freerunningtech/omc/issues/comments/{number}","contents_url":"https://api.github.com/repos/freerunningtech/omc/contents/{+path}","compare_url":"https://api.github.com/repos/freerunningtech/omc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freerunningtech/omc/merges","archive_url":"https://api.github.com/repos/freerunningtech/omc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freerunningtech/omc/downloads","issues_url":"https://api.github.com/repos/freerunningtech/omc/issues{/number}","pulls_url":"https://api.github.com/repos/freerunningtech/omc/pulls{/number}","milestones_url":"https://api.github.com/repos/freerunningtech/omc/milestones{/number}","notifications_url":"https://api.github.com/repos/freerunningtech/omc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freerunningtech/omc/labels{/name}","releases_url":"https://api.github.com/repos/freerunningtech/omc/releases{/id}","created_at":"2014-10-22T01:17:56Z","updated_at":"2014-10-30T07:28:25Z","pushed_at":"2014-11-26T03:35:49Z","git_url":"git://github.com/freerunningtech/omc.git","ssh_url":"git@github.com:freerunningtech/omc.git","clone_url":"https://github.com/freerunningtech/omc.git","svn_url":"https://github.com/freerunningtech/omc","homepage":null,"size":512,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"freerunningtech:master","ref":"master","sha":"fbb7d26929851846a2fd883264aacc8752001746","user":{"login":"freerunningtech","id":1585390,"avatar_url":"https://avatars.githubusercontent.com/u/1585390?v=3","gravatar_id":"","url":"https://api.github.com/users/freerunningtech","html_url":"https://github.com/freerunningtech","followers_url":"https://api.github.com/users/freerunningtech/followers","following_url":"https://api.github.com/users/freerunningtech/following{/other_user}","gists_url":"https://api.github.com/users/freerunningtech/gists{/gist_id}","starred_url":"https://api.github.com/users/freerunningtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freerunningtech/subscriptions","organizations_url":"https://api.github.com/users/freerunningtech/orgs","repos_url":"https://api.github.com/users/freerunningtech/repos","events_url":"https://api.github.com/users/freerunningtech/events{/privacy}","received_events_url":"https://api.github.com/users/freerunningtech/received_events","type":"Organization","site_admin":false},"repo":{"id":25554868,"name":"omc","full_name":"freerunningtech/omc","owner":{"login":"freerunningtech","id":1585390,"avatar_url":"https://avatars.githubusercontent.com/u/1585390?v=3","gravatar_id":"","url":"https://api.github.com/users/freerunningtech","html_url":"https://github.com/freerunningtech","followers_url":"https://api.github.com/users/freerunningtech/followers","following_url":"https://api.github.com/users/freerunningtech/following{/other_user}","gists_url":"https://api.github.com/users/freerunningtech/gists{/gist_id}","starred_url":"https://api.github.com/users/freerunningtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freerunningtech/subscriptions","organizations_url":"https://api.github.com/users/freerunningtech/orgs","repos_url":"https://api.github.com/users/freerunningtech/repos","events_url":"https://api.github.com/users/freerunningtech/events{/privacy}","received_events_url":"https://api.github.com/users/freerunningtech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freerunningtech/omc","description":"Opsworks' Missing Console","fork":false,"url":"https://api.github.com/repos/freerunningtech/omc","forks_url":"https://api.github.com/repos/freerunningtech/omc/forks","keys_url":"https://api.github.com/repos/freerunningtech/omc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freerunningtech/omc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freerunningtech/omc/teams","hooks_url":"https://api.github.com/repos/freerunningtech/omc/hooks","issue_events_url":"https://api.github.com/repos/freerunningtech/omc/issues/events{/number}","events_url":"https://api.github.com/repos/freerunningtech/omc/events","assignees_url":"https://api.github.com/repos/freerunningtech/omc/assignees{/user}","branches_url":"https://api.github.com/repos/freerunningtech/omc/branches{/branch}","tags_url":"https://api.github.com/repos/freerunningtech/omc/tags","blobs_url":"https://api.github.com/repos/freerunningtech/omc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freerunningtech/omc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freerunningtech/omc/git/refs{/sha}","trees_url":"https://api.github.com/repos/freerunningtech/omc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freerunningtech/omc/statuses/{sha}","languages_url":"https://api.github.com/repos/freerunningtech/omc/languages","stargazers_url":"https://api.github.com/repos/freerunningtech/omc/stargazers","contributors_url":"https://api.github.com/repos/freerunningtech/omc/contributors","subscribers_url":"https://api.github.com/repos/freerunningtech/omc/subscribers","subscription_url":"https://api.github.com/repos/freerunningtech/omc/subscription","commits_url":"https://api.github.com/repos/freerunningtech/omc/commits{/sha}","git_commits_url":"https://api.github.com/repos/freerunningtech/omc/git/commits{/sha}","comments_url":"https://api.github.com/repos/freerunningtech/omc/comments{/number}","issue_comment_url":"https://api.github.com/repos/freerunningtech/omc/issues/comments/{number}","contents_url":"https://api.github.com/repos/freerunningtech/omc/contents/{+path}","compare_url":"https://api.github.com/repos/freerunningtech/omc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freerunningtech/omc/merges","archive_url":"https://api.github.com/repos/freerunningtech/omc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freerunningtech/omc/downloads","issues_url":"https://api.github.com/repos/freerunningtech/omc/issues{/number}","pulls_url":"https://api.github.com/repos/freerunningtech/omc/pulls{/number}","milestones_url":"https://api.github.com/repos/freerunningtech/omc/milestones{/number}","notifications_url":"https://api.github.com/repos/freerunningtech/omc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freerunningtech/omc/labels{/name}","releases_url":"https://api.github.com/repos/freerunningtech/omc/releases{/id}","created_at":"2014-10-22T01:17:56Z","updated_at":"2014-10-30T07:28:25Z","pushed_at":"2014-11-26T03:35:49Z","git_url":"git://github.com/freerunningtech/omc.git","ssh_url":"git@github.com:freerunningtech/omc.git","clone_url":"https://github.com/freerunningtech/omc.git","svn_url":"https://github.com/freerunningtech/omc","homepage":null,"size":512,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/freerunningtech/omc/pulls/11"},"html":{"href":"https://github.com/freerunningtech/omc/pull/11"},"issue":{"href":"https://api.github.com/repos/freerunningtech/omc/issues/11"},"comments":{"href":"https://api.github.com/repos/freerunningtech/omc/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/freerunningtech/omc/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/freerunningtech/omc/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/freerunningtech/omc/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/freerunningtech/omc/statuses/33e1d03e16cabfa5f0d0fe0b2a4c29b772121a71"}}}}