{"action":"opened","number":1664,"pull_request":{"url":"https://api.github.com/repos/solidusio/solidus/pulls/1664","id":99190591,"html_url":"https://github.com/solidusio/solidus/pull/1664","diff_url":"https://github.com/solidusio/solidus/pull/1664.diff","patch_url":"https://github.com/solidusio/solidus/pull/1664.patch","issue_url":"https://api.github.com/repos/solidusio/solidus/issues/1664","number":1664,"state":"open","locked":false,"title":"Reduce metaprogramming in checkout.rb","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":"This builds on top of @mamhoff's work in #1663, but is submitted as a separate PR to avoid complicating it.\r\n\r\nThe existing `Order::Checkout` module added all its methods to the order inside of a `class_eval` within the `included` method.\r\n\r\nThis PR adds an `Order::Checkout::ClassMethods` module to hold the methods defined on the class, and defined the instance methods directly on `Order::Checkout`.\r\n\r\nTo do this it was necessary to change the `class_attribute`s into plain module-level `attr_accessor`. Though there are workarounds to avoid needing this change, I don't think there's a reason to avoid doing this. `Order` is probably not being subclassed.\r\n\r\n","created_at":"2016-12-23T00:35:26Z","updated_at":"2016-12-23T00:35:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/solidusio/solidus/pulls/1664/commits","review_comments_url":"https://api.github.com/repos/solidusio/solidus/pulls/1664/comments","review_comment_url":"https://api.github.com/repos/solidusio/solidus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solidusio/solidus/issues/1664/comments","statuses_url":"https://api.github.com/repos/solidusio/solidus/statuses/7ac878ebf0cac5d9204de605fde2876ec7642111","head":{"label":"jhawthorn:reduce-checkout-rb-metaprogramming","ref":"reduce-checkout-rb-metaprogramming","sha":"7ac878ebf0cac5d9204de605fde2876ec7642111","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},"repo":{"id":37868303,"name":"solidus","full_name":"jhawthorn/solidus","owner":{"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},"private":false,"html_url":"https://github.com/jhawthorn/solidus","description":"solidus ecommerce system","fork":true,"url":"https://api.github.com/repos/jhawthorn/solidus","forks_url":"https://api.github.com/repos/jhawthorn/solidus/forks","keys_url":"https://api.github.com/repos/jhawthorn/solidus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jhawthorn/solidus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jhawthorn/solidus/teams","hooks_url":"https://api.github.com/repos/jhawthorn/solidus/hooks","issue_events_url":"https://api.github.com/repos/jhawthorn/solidus/issues/events{/number}","events_url":"https://api.github.com/repos/jhawthorn/solidus/events","assignees_url":"https://api.github.com/repos/jhawthorn/solidus/assignees{/user}","branches_url":"https://api.github.com/repos/jhawthorn/solidus/branches{/branch}","tags_url":"https://api.github.com/repos/jhawthorn/solidus/tags","blobs_url":"https://api.github.com/repos/jhawthorn/solidus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jhawthorn/solidus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jhawthorn/solidus/git/refs{/sha}","trees_url":"https://api.github.com/repos/jhawthorn/solidus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jhawthorn/solidus/statuses/{sha}","languages_url":"https://api.github.com/repos/jhawthorn/solidus/languages","stargazers_url":"https://api.github.com/repos/jhawthorn/solidus/stargazers","contributors_url":"https://api.github.com/repos/jhawthorn/solidus/contributors","subscribers_url":"https://api.github.com/repos/jhawthorn/solidus/subscribers","subscription_url":"https://api.github.com/repos/jhawthorn/solidus/subscription","commits_url":"https://api.github.com/repos/jhawthorn/solidus/commits{/sha}","git_commits_url":"https://api.github.com/repos/jhawthorn/solidus/git/commits{/sha}","comments_url":"https://api.github.com/repos/jhawthorn/solidus/comments{/number}","issue_comment_url":"https://api.github.com/repos/jhawthorn/solidus/issues/comments{/number}","contents_url":"https://api.github.com/repos/jhawthorn/solidus/contents/{+path}","compare_url":"https://api.github.com/repos/jhawthorn/solidus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jhawthorn/solidus/merges","archive_url":"https://api.github.com/repos/jhawthorn/solidus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jhawthorn/solidus/downloads","issues_url":"https://api.github.com/repos/jhawthorn/solidus/issues{/number}","pulls_url":"https://api.github.com/repos/jhawthorn/solidus/pulls{/number}","milestones_url":"https://api.github.com/repos/jhawthorn/solidus/milestones{/number}","notifications_url":"https://api.github.com/repos/jhawthorn/solidus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jhawthorn/solidus/labels{/name}","releases_url":"https://api.github.com/repos/jhawthorn/solidus/releases{/id}","deployments_url":"https://api.github.com/repos/jhawthorn/solidus/deployments","created_at":"2015-06-22T16:58:44Z","updated_at":"2016-01-15T05:22:53Z","pushed_at":"2016-12-23T00:29:34Z","git_url":"git://github.com/jhawthorn/solidus.git","ssh_url":"git@github.com:jhawthorn/solidus.git","clone_url":"https://github.com/jhawthorn/solidus.git","svn_url":"https://github.com/jhawthorn/solidus","homepage":"","size":65655,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"solidusio:master","ref":"master","sha":"e69040ac95a35f6706d065fd442581d6e06868c8","user":{"login":"solidusio","id":11045486,"avatar_url":"https://avatars.githubusercontent.com/u/11045486?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio","html_url":"https://github.com/solidusio","followers_url":"https://api.github.com/users/solidusio/followers","following_url":"https://api.github.com/users/solidusio/following{/other_user}","gists_url":"https://api.github.com/users/solidusio/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio/subscriptions","organizations_url":"https://api.github.com/users/solidusio/orgs","repos_url":"https://api.github.com/users/solidusio/repos","events_url":"https://api.github.com/users/solidusio/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio/received_events","type":"Organization","site_admin":false},"repo":{"id":30985840,"name":"solidus","full_name":"solidusio/solidus","owner":{"login":"solidusio","id":11045486,"avatar_url":"https://avatars.githubusercontent.com/u/11045486?v=3","gravatar_id":"","url":"https://api.github.com/users/solidusio","html_url":"https://github.com/solidusio","followers_url":"https://api.github.com/users/solidusio/followers","following_url":"https://api.github.com/users/solidusio/following{/other_user}","gists_url":"https://api.github.com/users/solidusio/gists{/gist_id}","starred_url":"https://api.github.com/users/solidusio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solidusio/subscriptions","organizations_url":"https://api.github.com/users/solidusio/orgs","repos_url":"https://api.github.com/users/solidusio/repos","events_url":"https://api.github.com/users/solidusio/events{/privacy}","received_events_url":"https://api.github.com/users/solidusio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solidusio/solidus","description":"Solidus, Rails eCommerce System","fork":false,"url":"https://api.github.com/repos/solidusio/solidus","forks_url":"https://api.github.com/repos/solidusio/solidus/forks","keys_url":"https://api.github.com/repos/solidusio/solidus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solidusio/solidus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solidusio/solidus/teams","hooks_url":"https://api.github.com/repos/solidusio/solidus/hooks","issue_events_url":"https://api.github.com/repos/solidusio/solidus/issues/events{/number}","events_url":"https://api.github.com/repos/solidusio/solidus/events","assignees_url":"https://api.github.com/repos/solidusio/solidus/assignees{/user}","branches_url":"https://api.github.com/repos/solidusio/solidus/branches{/branch}","tags_url":"https://api.github.com/repos/solidusio/solidus/tags","blobs_url":"https://api.github.com/repos/solidusio/solidus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solidusio/solidus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solidusio/solidus/git/refs{/sha}","trees_url":"https://api.github.com/repos/solidusio/solidus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solidusio/solidus/statuses/{sha}","languages_url":"https://api.github.com/repos/solidusio/solidus/languages","stargazers_url":"https://api.github.com/repos/solidusio/solidus/stargazers","contributors_url":"https://api.github.com/repos/solidusio/solidus/contributors","subscribers_url":"https://api.github.com/repos/solidusio/solidus/subscribers","subscription_url":"https://api.github.com/repos/solidusio/solidus/subscription","commits_url":"https://api.github.com/repos/solidusio/solidus/commits{/sha}","git_commits_url":"https://api.github.com/repos/solidusio/solidus/git/commits{/sha}","comments_url":"https://api.github.com/repos/solidusio/solidus/comments{/number}","issue_comment_url":"https://api.github.com/repos/solidusio/solidus/issues/comments{/number}","contents_url":"https://api.github.com/repos/solidusio/solidus/contents/{+path}","compare_url":"https://api.github.com/repos/solidusio/solidus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solidusio/solidus/merges","archive_url":"https://api.github.com/repos/solidusio/solidus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solidusio/solidus/downloads","issues_url":"https://api.github.com/repos/solidusio/solidus/issues{/number}","pulls_url":"https://api.github.com/repos/solidusio/solidus/pulls{/number}","milestones_url":"https://api.github.com/repos/solidusio/solidus/milestones{/number}","notifications_url":"https://api.github.com/repos/solidusio/solidus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solidusio/solidus/labels{/name}","releases_url":"https://api.github.com/repos/solidusio/solidus/releases{/id}","deployments_url":"https://api.github.com/repos/solidusio/solidus/deployments","created_at":"2015-02-18T20:41:58Z","updated_at":"2016-12-22T18:56:05Z","pushed_at":"2016-12-22T21:27:11Z","git_url":"git://github.com/solidusio/solidus.git","ssh_url":"git@github.com:solidusio/solidus.git","clone_url":"https://github.com/solidusio/solidus.git","svn_url":"https://github.com/solidusio/solidus","homepage":"https://solidus.io/","size":64905,"stargazers_count":1208,"watchers_count":1208,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":379,"mirror_url":null,"open_issues_count":182,"forks":379,"open_issues":182,"watchers":1208,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/1664"},"html":{"href":"https://github.com/solidusio/solidus/pull/1664"},"issue":{"href":"https://api.github.com/repos/solidusio/solidus/issues/1664"},"comments":{"href":"https://api.github.com/repos/solidusio/solidus/issues/1664/comments"},"review_comments":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/1664/comments"},"review_comment":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solidusio/solidus/pulls/1664/commits"},"statuses":{"href":"https://api.github.com/repos/solidusio/solidus/statuses/7ac878ebf0cac5d9204de605fde2876ec7642111"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":5,"additions":270,"deletions":273,"changed_files":2}}
{"actor":{"display_login":"jhawthorn"}}