GitHub PullRequestReviewCommentEvent at 2014-07-28 16:12:58
Repository: fog-core
Actor: plribeiro3000
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/fog/fog-core/pulls/comments/15471883","id":15471883,"diff_hunk":"@@ -56,7 +71,7 @@ def attributes\n \n       def all_attributes\n         all_attributes = self.class.attributes.inject({}) do |hash, attribute|\n-          hash[attribute] = send(attribute)\n+          hash[attribute] = send(attribute) unless attribute.to_s.start_with?('__')","path":"lib/fog/core/attributes.rb","position":41,"original_position":41,"commit_id":"1730ed670e9703aa984f32a02cd338bbaf59a041","original_commit_id":"1730ed670e9703aa984f32a02cd338bbaf59a041","user":{"login":"plribeiro3000","id":672952,"avatar_url":"https://avatars.githubusercontent.com/u/672952?","gravatar_id":"4b897719c13e333a89392b9360868761","url":"https://api.github.com/users/plribeiro3000","html_url":"https://github.com/plribeiro3000","followers_url":"https://api.github.com/users/plribeiro3000/followers","following_url":"https://api.github.com/users/plribeiro3000/following{/other_user}","gists_url":"https://api.github.com/users/plribeiro3000/gists{/gist_id}","starred_url":"https://api.github.com/users/plribeiro3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plribeiro3000/subscriptions","organizations_url":"https://api.github.com/users/plribeiro3000/orgs","repos_url":"https://api.github.com/users/plribeiro3000/repos","events_url":"https://api.github.com/users/plribeiro3000/events{/privacy}","received_events_url":"https://api.github.com/users/plribeiro3000/received_events","type":"User","site_admin":false},"body":"Well, i can't really say if it is a breaking change because i don't know anything of the others providers implementation. Do you know if they use attribute that start with `__` ?\r\n\r\nIn this particular case you just commented, it might not return the attribute if it start with `__` when asking for all default values. Notice that this feature (default value) is new, just entered in the last release.\r\n\r\nMaybe we should ask other maintainers if they are already using it?","created_at":"2014-07-28T16:12:58Z","updated_at":"2014-07-28T16:12:58Z","html_url":"https://github.com/fog/fog-core/pull/60#discussion_r15471883","pull_request_url":"https://api.github.com/repos/fog/fog-core/pulls/60","_links":{"self":{"href":"https://api.github.com/repos/fog/fog-core/pulls/comments/15471883"},"html":{"href":"https://github.com/fog/fog-core/pull/60#discussion_r15471883"},"pull_request":{"href":"https://api.github.com/repos/fog/fog-core/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/fog/fog-core/pulls/60","id":18817191,"html_url":"https://github.com/fog/fog-core/pull/60","diff_url":"https://github.com/fog/fog-core/pull/60.diff","patch_url":"https://github.com/fog/fog-core/pull/60.patch","issue_url":"https://api.github.com/repos/fog/fog-core/issues/60","number":60,"state":"open","title":"Added Association Attributes and class methods to work with the association objects","user":{"login":"plribeiro3000","id":672952,"avatar_url":"https://avatars.githubusercontent.com/u/672952?","gravatar_id":"4b897719c13e333a89392b9360868761","url":"https://api.github.com/users/plribeiro3000","html_url":"https://github.com/plribeiro3000","followers_url":"https://api.github.com/users/plribeiro3000/followers","following_url":"https://api.github.com/users/plribeiro3000/following{/other_user}","gists_url":"https://api.github.com/users/plribeiro3000/gists{/gist_id}","starred_url":"https://api.github.com/users/plribeiro3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plribeiro3000/subscriptions","organizations_url":"https://api.github.com/users/plribeiro3000/orgs","repos_url":"https://api.github.com/users/plribeiro3000/repos","events_url":"https://api.github.com/users/plribeiro3000/events{/privacy}","received_events_url":"https://api.github.com/users/plribeiro3000/received_events","type":"User","site_admin":false},"body":"@geemus I've tried to make it as simple as possible, but i might not have done the best, so let me know of any changes you think is needed.\r\n\r\nThe ideia on the association is pretty simple, all the association objects will be searched on the service object inside of the model, by calling the `collection_name` passed as argument e a `get` with the identity.\r\n\r\nThe methods created by the association methods store the identity in an attribute with the same name, but with `__` before. Because of this, im ignoring this kind of attribute on `inspect` and `all_attributes`.\r\n\r\nI had to create some extra classes to bypass the service logic in my tests but i didnt like that approach too much. Let me know if you think there is another way of doing that without the need of stub everything.","created_at":"2014-07-24T04:27:51Z","updated_at":"2014-07-28T16:12:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22bf78f4b5a47e9bb38063df3cee10872c03d8c4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fog/fog-core/pulls/60/commits","review_comments_url":"https://api.github.com/repos/fog/fog-core/pulls/60/comments","review_comment_url":"https://api.github.com/repos/fog/fog-core/pulls/comments/{number}","comments_url":"https://api.github.com/repos/fog/fog-core/issues/60/comments","statuses_url":"https://api.github.com/repos/fog/fog-core/statuses/1730ed670e9703aa984f32a02cd338bbaf59a041","head":{"label":"zertico:association_methods","ref":"association_methods","sha":"1730ed670e9703aa984f32a02cd338bbaf59a041","user":{"login":"zertico","id":531193,"avatar_url":"https://avatars.githubusercontent.com/u/531193?","gravatar_id":"7428085f3be302ea47a5bcf68c431883","url":"https://api.github.com/users/zertico","html_url":"https://github.com/zertico","followers_url":"https://api.github.com/users/zertico/followers","following_url":"https://api.github.com/users/zertico/following{/other_user}","gists_url":"https://api.github.com/users/zertico/gists{/gist_id}","starred_url":"https://api.github.com/users/zertico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zertico/subscriptions","organizations_url":"https://api.github.com/users/zertico/orgs","repos_url":"https://api.github.com/users/zertico/repos","events_url":"https://api.github.com/users/zertico/events{/privacy}","received_events_url":"https://api.github.com/users/zertico/received_events","type":"Organization","site_admin":false},"repo":{"id":20728353,"name":"fog-core","full_name":"zertico/fog-core","owner":{"login":"zertico","id":531193,"avatar_url":"https://avatars.githubusercontent.com/u/531193?","gravatar_id":"7428085f3be302ea47a5bcf68c431883","url":"https://api.github.com/users/zertico","html_url":"https://github.com/zertico","followers_url":"https://api.github.com/users/zertico/followers","following_url":"https://api.github.com/users/zertico/following{/other_user}","gists_url":"https://api.github.com/users/zertico/gists{/gist_id}","starred_url":"https://api.github.com/users/zertico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zertico/subscriptions","organizations_url":"https://api.github.com/users/zertico/orgs","repos_url":"https://api.github.com/users/zertico/repos","events_url":"https://api.github.com/users/zertico/events{/privacy}","received_events_url":"https://api.github.com/users/zertico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zertico/fog-core","description":"fog's core behaviors without API and cloud provider specifics","fork":true,"url":"https://api.github.com/repos/zertico/fog-core","forks_url":"https://api.github.com/repos/zertico/fog-core/forks","keys_url":"https://api.github.com/repos/zertico/fog-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zertico/fog-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zertico/fog-core/teams","hooks_url":"https://api.github.com/repos/zertico/fog-core/hooks","issue_events_url":"https://api.github.com/repos/zertico/fog-core/issues/events{/number}","events_url":"https://api.github.com/repos/zertico/fog-core/events","assignees_url":"https://api.github.com/repos/zertico/fog-core/assignees{/user}","branches_url":"https://api.github.com/repos/zertico/fog-core/branches{/branch}","tags_url":"https://api.github.com/repos/zertico/fog-core/tags","blobs_url":"https://api.github.com/repos/zertico/fog-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zertico/fog-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zertico/fog-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/zertico/fog-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zertico/fog-core/statuses/{sha}","languages_url":"https://api.github.com/repos/zertico/fog-core/languages","stargazers_url":"https://api.github.com/repos/zertico/fog-core/stargazers","contributors_url":"https://api.github.com/repos/zertico/fog-core/contributors","subscribers_url":"https://api.github.com/repos/zertico/fog-core/subscribers","subscription_url":"https://api.github.com/repos/zertico/fog-core/subscription","commits_url":"https://api.github.com/repos/zertico/fog-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/zertico/fog-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/zertico/fog-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/zertico/fog-core/issues/comments/{number}","contents_url":"https://api.github.com/repos/zertico/fog-core/contents/{+path}","compare_url":"https://api.github.com/repos/zertico/fog-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zertico/fog-core/merges","archive_url":"https://api.github.com/repos/zertico/fog-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zertico/fog-core/downloads","issues_url":"https://api.github.com/repos/zertico/fog-core/issues{/number}","pulls_url":"https://api.github.com/repos/zertico/fog-core/pulls{/number}","milestones_url":"https://api.github.com/repos/zertico/fog-core/milestones{/number}","notifications_url":"https://api.github.com/repos/zertico/fog-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zertico/fog-core/labels{/name}","releases_url":"https://api.github.com/repos/zertico/fog-core/releases{/id}","created_at":"2014-06-11T14:31:30Z","updated_at":"2014-07-08T13:43:20Z","pushed_at":"2014-07-24T04:18:48Z","git_url":"git://github.com/zertico/fog-core.git","ssh_url":"git@github.com:zertico/fog-core.git","clone_url":"https://github.com/zertico/fog-core.git","svn_url":"https://github.com/zertico/fog-core","homepage":"","size":548,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fog:master","ref":"master","sha":"b5a12ac64576aed3655a37caf9c1d08315938438","user":{"login":"fog","id":991149,"avatar_url":"https://avatars.githubusercontent.com/u/991149?","gravatar_id":"8afaeb2e9f3ffa127f63afd2680da183","url":"https://api.github.com/users/fog","html_url":"https://github.com/fog","followers_url":"https://api.github.com/users/fog/followers","following_url":"https://api.github.com/users/fog/following{/other_user}","gists_url":"https://api.github.com/users/fog/gists{/gist_id}","starred_url":"https://api.github.com/users/fog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fog/subscriptions","organizations_url":"https://api.github.com/users/fog/orgs","repos_url":"https://api.github.com/users/fog/repos","events_url":"https://api.github.com/users/fog/events{/privacy}","received_events_url":"https://api.github.com/users/fog/received_events","type":"Organization","site_admin":false},"repo":{"id":16219318,"name":"fog-core","full_name":"fog/fog-core","owner":{"login":"fog","id":991149,"avatar_url":"https://avatars.githubusercontent.com/u/991149?","gravatar_id":"8afaeb2e9f3ffa127f63afd2680da183","url":"https://api.github.com/users/fog","html_url":"https://github.com/fog","followers_url":"https://api.github.com/users/fog/followers","following_url":"https://api.github.com/users/fog/following{/other_user}","gists_url":"https://api.github.com/users/fog/gists{/gist_id}","starred_url":"https://api.github.com/users/fog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fog/subscriptions","organizations_url":"https://api.github.com/users/fog/orgs","repos_url":"https://api.github.com/users/fog/repos","events_url":"https://api.github.com/users/fog/events{/privacy}","received_events_url":"https://api.github.com/users/fog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fog/fog-core","description":"fog's core behaviors without API and cloud provider specifics","fork":false,"url":"https://api.github.com/repos/fog/fog-core","forks_url":"https://api.github.com/repos/fog/fog-core/forks","keys_url":"https://api.github.com/repos/fog/fog-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fog/fog-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fog/fog-core/teams","hooks_url":"https://api.github.com/repos/fog/fog-core/hooks","issue_events_url":"https://api.github.com/repos/fog/fog-core/issues/events{/number}","events_url":"https://api.github.com/repos/fog/fog-core/events","assignees_url":"https://api.github.com/repos/fog/fog-core/assignees{/user}","branches_url":"https://api.github.com/repos/fog/fog-core/branches{/branch}","tags_url":"https://api.github.com/repos/fog/fog-core/tags","blobs_url":"https://api.github.com/repos/fog/fog-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fog/fog-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fog/fog-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/fog/fog-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fog/fog-core/statuses/{sha}","languages_url":"https://api.github.com/repos/fog/fog-core/languages","stargazers_url":"https://api.github.com/repos/fog/fog-core/stargazers","contributors_url":"https://api.github.com/repos/fog/fog-core/contributors","subscribers_url":"https://api.github.com/repos/fog/fog-core/subscribers","subscription_url":"https://api.github.com/repos/fog/fog-core/subscription","commits_url":"https://api.github.com/repos/fog/fog-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/fog/fog-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/fog/fog-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/fog/fog-core/issues/comments/{number}","contents_url":"https://api.github.com/repos/fog/fog-core/contents/{+path}","compare_url":"https://api.github.com/repos/fog/fog-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fog/fog-core/merges","archive_url":"https://api.github.com/repos/fog/fog-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fog/fog-core/downloads","issues_url":"https://api.github.com/repos/fog/fog-core/issues{/number}","pulls_url":"https://api.github.com/repos/fog/fog-core/pulls{/number}","milestones_url":"https://api.github.com/repos/fog/fog-core/milestones{/number}","notifications_url":"https://api.github.com/repos/fog/fog-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fog/fog-core/labels{/name}","releases_url":"https://api.github.com/repos/fog/fog-core/releases{/id}","created_at":"2014-01-24T22:47:42Z","updated_at":"2014-07-21T19:54:26Z","pushed_at":"2014-07-23T20:32:08Z","git_url":"git://github.com/fog/fog-core.git","ssh_url":"git@github.com:fog/fog-core.git","clone_url":"https://github.com/fog/fog-core.git","svn_url":"https://github.com/fog/fog-core","homepage":"","size":1702,"stargazers_count":17,"watchers_count":17,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":16,"mirror_url":null,"open_issues_count":12,"forks":16,"open_issues":12,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fog/fog-core/pulls/60"},"html":{"href":"https://github.com/fog/fog-core/pull/60"},"issue":{"href":"https://api.github.com/repos/fog/fog-core/issues/60"},"comments":{"href":"https://api.github.com/repos/fog/fog-core/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/fog/fog-core/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/fog/fog-core/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/fog/fog-core/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/fog/fog-core/statuses/1730ed670e9703aa984f32a02cd338bbaf59a041"}}}}