{"action":"closed","number":316,"pull_request":{"url":"https://api.github.com/repos/hanami/model/pulls/316","id":71873812,"html_url":"https://github.com/hanami/model/pull/316","diff_url":"https://github.com/hanami/model/pull/316.diff","patch_url":"https://github.com/hanami/model/pull/316.patch","issue_url":"https://api.github.com/repos/hanami/model/issues/316","number":316,"state":"closed","locked":false,"title":"Fix problem with inheritance and Entitiy::attributes","user":{"login":"kjellm","id":54979,"avatar_url":"https://avatars.githubusercontent.com/u/54979?v=3","gravatar_id":"","url":"https://api.github.com/users/kjellm","html_url":"https://github.com/kjellm","followers_url":"https://api.github.com/users/kjellm/followers","following_url":"https://api.github.com/users/kjellm/following{/other_user}","gists_url":"https://api.github.com/users/kjellm/gists{/gist_id}","starred_url":"https://api.github.com/users/kjellm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjellm/subscriptions","organizations_url":"https://api.github.com/users/kjellm/orgs","repos_url":"https://api.github.com/users/kjellm/repos","events_url":"https://api.github.com/users/kjellm/events{/privacy}","received_events_url":"https://api.github.com/users/kjellm/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nFirst of all, thank you all for the great work done on the Hanami project! Love using it :-)\r\n\r\nThere is a bug in the way the inheritance of attributes are implemented with regards to the `::attributes` method. The following example illustrates the problem:\r\n\r\n```\r\nclass A\r\n  include Hanami::Entity\r\n  attributes :a\r\nend\r\n\r\nclass B < A\r\n  attributes :b\r\nend\r\n\r\nB.attributes # => [:id, :b], but should be [:id, :a, :b]\r\n```\r\n\r\nThe current code adds the super class attributes to entities by calling ::define_attribute_accessor, but this fails silently because of  a guard on `!instance_methods.include?`\r\n\r\nThis pull request fixes the problem by adding super class attributes to the result when calling `::attributes`.","created_at":"2016-05-30T09:13:57Z","updated_at":"2016-05-30T15:22:36Z","closed_at":"2016-05-30T15:22:36Z","merged_at":null,"merge_commit_sha":"4b07fbb4d5518fba9229e28a077572d0124ece0b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hanami/model/pulls/316/commits","review_comments_url":"https://api.github.com/repos/hanami/model/pulls/316/comments","review_comment_url":"https://api.github.com/repos/hanami/model/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hanami/model/issues/316/comments","statuses_url":"https://api.github.com/repos/hanami/model/statuses/461d417faa3a06c3d212db5a5d1fcfb9775f7aa8","head":{"label":"gramo-org:fix_inherited_attributes","ref":"fix_inherited_attributes","sha":"461d417faa3a06c3d212db5a5d1fcfb9775f7aa8","user":{"login":"gramo-org","id":14017268,"avatar_url":"https://avatars.githubusercontent.com/u/14017268?v=3","gravatar_id":"","url":"https://api.github.com/users/gramo-org","html_url":"https://github.com/gramo-org","followers_url":"https://api.github.com/users/gramo-org/followers","following_url":"https://api.github.com/users/gramo-org/following{/other_user}","gists_url":"https://api.github.com/users/gramo-org/gists{/gist_id}","starred_url":"https://api.github.com/users/gramo-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gramo-org/subscriptions","organizations_url":"https://api.github.com/users/gramo-org/orgs","repos_url":"https://api.github.com/users/gramo-org/repos","events_url":"https://api.github.com/users/gramo-org/events{/privacy}","received_events_url":"https://api.github.com/users/gramo-org/received_events","type":"Organization","site_admin":false},"repo":{"id":59833331,"name":"model","full_name":"gramo-org/model","owner":{"login":"gramo-org","id":14017268,"avatar_url":"https://avatars.githubusercontent.com/u/14017268?v=3","gravatar_id":"","url":"https://api.github.com/users/gramo-org","html_url":"https://github.com/gramo-org","followers_url":"https://api.github.com/users/gramo-org/followers","following_url":"https://api.github.com/users/gramo-org/following{/other_user}","gists_url":"https://api.github.com/users/gramo-org/gists{/gist_id}","starred_url":"https://api.github.com/users/gramo-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gramo-org/subscriptions","organizations_url":"https://api.github.com/users/gramo-org/orgs","repos_url":"https://api.github.com/users/gramo-org/repos","events_url":"https://api.github.com/users/gramo-org/events{/privacy}","received_events_url":"https://api.github.com/users/gramo-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gramo-org/model","description":"A persistence framework with entities, repositories, data mapper and query objects","fork":true,"url":"https://api.github.com/repos/gramo-org/model","forks_url":"https://api.github.com/repos/gramo-org/model/forks","keys_url":"https://api.github.com/repos/gramo-org/model/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gramo-org/model/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gramo-org/model/teams","hooks_url":"https://api.github.com/repos/gramo-org/model/hooks","issue_events_url":"https://api.github.com/repos/gramo-org/model/issues/events{/number}","events_url":"https://api.github.com/repos/gramo-org/model/events","assignees_url":"https://api.github.com/repos/gramo-org/model/assignees{/user}","branches_url":"https://api.github.com/repos/gramo-org/model/branches{/branch}","tags_url":"https://api.github.com/repos/gramo-org/model/tags","blobs_url":"https://api.github.com/repos/gramo-org/model/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gramo-org/model/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gramo-org/model/git/refs{/sha}","trees_url":"https://api.github.com/repos/gramo-org/model/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gramo-org/model/statuses/{sha}","languages_url":"https://api.github.com/repos/gramo-org/model/languages","stargazers_url":"https://api.github.com/repos/gramo-org/model/stargazers","contributors_url":"https://api.github.com/repos/gramo-org/model/contributors","subscribers_url":"https://api.github.com/repos/gramo-org/model/subscribers","subscription_url":"https://api.github.com/repos/gramo-org/model/subscription","commits_url":"https://api.github.com/repos/gramo-org/model/commits{/sha}","git_commits_url":"https://api.github.com/repos/gramo-org/model/git/commits{/sha}","comments_url":"https://api.github.com/repos/gramo-org/model/comments{/number}","issue_comment_url":"https://api.github.com/repos/gramo-org/model/issues/comments{/number}","contents_url":"https://api.github.com/repos/gramo-org/model/contents/{+path}","compare_url":"https://api.github.com/repos/gramo-org/model/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gramo-org/model/merges","archive_url":"https://api.github.com/repos/gramo-org/model/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gramo-org/model/downloads","issues_url":"https://api.github.com/repos/gramo-org/model/issues{/number}","pulls_url":"https://api.github.com/repos/gramo-org/model/pulls{/number}","milestones_url":"https://api.github.com/repos/gramo-org/model/milestones{/number}","notifications_url":"https://api.github.com/repos/gramo-org/model/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gramo-org/model/labels{/name}","releases_url":"https://api.github.com/repos/gramo-org/model/releases{/id}","deployments_url":"https://api.github.com/repos/gramo-org/model/deployments","created_at":"2016-05-27T12:37:51Z","updated_at":"2016-05-27T12:37:53Z","pushed_at":"2016-05-30T08:33:31Z","git_url":"git://github.com/gramo-org/model.git","ssh_url":"git@github.com:gramo-org/model.git","clone_url":"https://github.com/gramo-org/model.git","svn_url":"https://github.com/gramo-org/model","homepage":"","size":1011,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hanami:master","ref":"master","sha":"9d90fdecdd086394ab95f9ca91c6871914260a90","user":{"login":"hanami","id":3210273,"avatar_url":"https://avatars.githubusercontent.com/u/3210273?v=3","gravatar_id":"","url":"https://api.github.com/users/hanami","html_url":"https://github.com/hanami","followers_url":"https://api.github.com/users/hanami/followers","following_url":"https://api.github.com/users/hanami/following{/other_user}","gists_url":"https://api.github.com/users/hanami/gists{/gist_id}","starred_url":"https://api.github.com/users/hanami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanami/subscriptions","organizations_url":"https://api.github.com/users/hanami/orgs","repos_url":"https://api.github.com/users/hanami/repos","events_url":"https://api.github.com/users/hanami/events{/privacy}","received_events_url":"https://api.github.com/users/hanami/received_events","type":"Organization","site_admin":false},"repo":{"id":16760719,"name":"model","full_name":"hanami/model","owner":{"login":"hanami","id":3210273,"avatar_url":"https://avatars.githubusercontent.com/u/3210273?v=3","gravatar_id":"","url":"https://api.github.com/users/hanami","html_url":"https://github.com/hanami","followers_url":"https://api.github.com/users/hanami/followers","following_url":"https://api.github.com/users/hanami/following{/other_user}","gists_url":"https://api.github.com/users/hanami/gists{/gist_id}","starred_url":"https://api.github.com/users/hanami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanami/subscriptions","organizations_url":"https://api.github.com/users/hanami/orgs","repos_url":"https://api.github.com/users/hanami/repos","events_url":"https://api.github.com/users/hanami/events{/privacy}","received_events_url":"https://api.github.com/users/hanami/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hanami/model","description":"A persistence framework with entities, repositories, data mapper and query objects","fork":false,"url":"https://api.github.com/repos/hanami/model","forks_url":"https://api.github.com/repos/hanami/model/forks","keys_url":"https://api.github.com/repos/hanami/model/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hanami/model/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hanami/model/teams","hooks_url":"https://api.github.com/repos/hanami/model/hooks","issue_events_url":"https://api.github.com/repos/hanami/model/issues/events{/number}","events_url":"https://api.github.com/repos/hanami/model/events","assignees_url":"https://api.github.com/repos/hanami/model/assignees{/user}","branches_url":"https://api.github.com/repos/hanami/model/branches{/branch}","tags_url":"https://api.github.com/repos/hanami/model/tags","blobs_url":"https://api.github.com/repos/hanami/model/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hanami/model/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hanami/model/git/refs{/sha}","trees_url":"https://api.github.com/repos/hanami/model/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hanami/model/statuses/{sha}","languages_url":"https://api.github.com/repos/hanami/model/languages","stargazers_url":"https://api.github.com/repos/hanami/model/stargazers","contributors_url":"https://api.github.com/repos/hanami/model/contributors","subscribers_url":"https://api.github.com/repos/hanami/model/subscribers","subscription_url":"https://api.github.com/repos/hanami/model/subscription","commits_url":"https://api.github.com/repos/hanami/model/commits{/sha}","git_commits_url":"https://api.github.com/repos/hanami/model/git/commits{/sha}","comments_url":"https://api.github.com/repos/hanami/model/comments{/number}","issue_comment_url":"https://api.github.com/repos/hanami/model/issues/comments{/number}","contents_url":"https://api.github.com/repos/hanami/model/contents/{+path}","compare_url":"https://api.github.com/repos/hanami/model/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hanami/model/merges","archive_url":"https://api.github.com/repos/hanami/model/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hanami/model/downloads","issues_url":"https://api.github.com/repos/hanami/model/issues{/number}","pulls_url":"https://api.github.com/repos/hanami/model/pulls{/number}","milestones_url":"https://api.github.com/repos/hanami/model/milestones{/number}","notifications_url":"https://api.github.com/repos/hanami/model/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hanami/model/labels{/name}","releases_url":"https://api.github.com/repos/hanami/model/releases{/id}","deployments_url":"https://api.github.com/repos/hanami/model/deployments","created_at":"2014-02-12T08:25:42Z","updated_at":"2016-05-30T12:48:26Z","pushed_at":"2016-05-30T09:13:58Z","git_url":"git://github.com/hanami/model.git","ssh_url":"git@github.com:hanami/model.git","clone_url":"https://github.com/hanami/model.git","svn_url":"https://github.com/hanami/model","homepage":"","size":1405,"stargazers_count":259,"watchers_count":259,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":103,"mirror_url":null,"open_issues_count":15,"forks":103,"open_issues":15,"watchers":259,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hanami/model/pulls/316"},"html":{"href":"https://github.com/hanami/model/pull/316"},"issue":{"href":"https://api.github.com/repos/hanami/model/issues/316"},"comments":{"href":"https://api.github.com/repos/hanami/model/issues/316/comments"},"review_comments":{"href":"https://api.github.com/repos/hanami/model/pulls/316/comments"},"review_comment":{"href":"https://api.github.com/repos/hanami/model/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hanami/model/pulls/316/commits"},"statuses":{"href":"https://api.github.com/repos/hanami/model/statuses/461d417faa3a06c3d212db5a5d1fcfb9775f7aa8"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":22,"deletions":12,"changed_files":2}}
{"actor":{"display_login":"jodosha"}}