{"action":"created","comment":{"url":"https://api.github.com/repos/spree/spree/pulls/comments/31783160","id":31783160,"diff_hunk":"@@ -1,5 +1,6 @@\n module Spree\n   class CustomerReturn < Spree::Base\n+    include Spree::Core::NumberGenerator.new(prefix: 'CR', length: 9)","path":"core/app/models/spree/customer_return.rb","position":3,"original_position":3,"commit_id":"697ba75647e7805e79b281c213184513ea455f2e","original_commit_id":"20f0edb15ee52361fa28c799e8dff8e86a25a6b9","user":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"body":"@JDutil All instances of `Spree::Numbergenerator` now implement `#prefix`, `#prefix=`, `#length`, `#length=`.\r\n\r\nAlso each class that includes an instance of `Spree::NumberGenerator` gets an `.number_generator` accessor. So calls like `Spree::Order.number_generator.prefix = 'FOO'` will work now.","created_at":"2015-06-05T02:07:44Z","updated_at":"2015-06-05T02:07:44Z","html_url":"https://github.com/spree/spree/pull/6413#discussion_r31783160","pull_request_url":"https://api.github.com/repos/spree/spree/pulls/6413","_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/comments/31783160"},"html":{"href":"https://github.com/spree/spree/pull/6413#discussion_r31783160"},"pull_request":{"href":"https://api.github.com/repos/spree/spree/pulls/6413"}}},"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/6413","id":35881106,"html_url":"https://github.com/spree/spree/pull/6413","diff_url":"https://github.com/spree/spree/pull/6413.diff","patch_url":"https://github.com/spree/spree/pull/6413.patch","issue_url":"https://api.github.com/repos/spree/spree/issues/6413","number":6413,"state":"open","locked":false,"title":"Cleanup number generation","user":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"body":"* Remove the need to call `super` to configure number generation\r\n* Kill all mutations on the code via adding appropriate specs,\r\n  especially for the behavior on moving to larger generated numbers\r\n  when half of the number space is taken\r\n* Make sure all models with number generation use the same generation\r\n  code\r\n* Since all generation code is now centralized remove the need to\r\n  specify dependencies in each number generating model","created_at":"2015-05-20T22:03:55Z","updated_at":"2015-06-05T02:07:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b05f87e75c53c5d6f04edbc187103f4723547bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spree/spree/pulls/6413/commits","review_comments_url":"https://api.github.com/repos/spree/spree/pulls/6413/comments","review_comment_url":"https://api.github.com/repos/spree/spree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spree/spree/issues/6413/comments","statuses_url":"https://api.github.com/repos/spree/spree/statuses/697ba75647e7805e79b281c213184513ea455f2e","head":{"label":"MountainRoseHerbs:fix/cleanup-number-generator","ref":"fix/cleanup-number-generator","sha":"697ba75647e7805e79b281c213184513ea455f2e","user":{"login":"MountainRoseHerbs","id":2074141,"avatar_url":"https://avatars.githubusercontent.com/u/2074141?v=3","gravatar_id":"","url":"https://api.github.com/users/MountainRoseHerbs","html_url":"https://github.com/MountainRoseHerbs","followers_url":"https://api.github.com/users/MountainRoseHerbs/followers","following_url":"https://api.github.com/users/MountainRoseHerbs/following{/other_user}","gists_url":"https://api.github.com/users/MountainRoseHerbs/gists{/gist_id}","starred_url":"https://api.github.com/users/MountainRoseHerbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MountainRoseHerbs/subscriptions","organizations_url":"https://api.github.com/users/MountainRoseHerbs/orgs","repos_url":"https://api.github.com/users/MountainRoseHerbs/repos","events_url":"https://api.github.com/users/MountainRoseHerbs/events{/privacy}","received_events_url":"https://api.github.com/users/MountainRoseHerbs/received_events","type":"Organization","site_admin":false},"repo":{"id":12473049,"name":"spree","full_name":"MountainRoseHerbs/spree","owner":{"login":"MountainRoseHerbs","id":2074141,"avatar_url":"https://avatars.githubusercontent.com/u/2074141?v=3","gravatar_id":"","url":"https://api.github.com/users/MountainRoseHerbs","html_url":"https://github.com/MountainRoseHerbs","followers_url":"https://api.github.com/users/MountainRoseHerbs/followers","following_url":"https://api.github.com/users/MountainRoseHerbs/following{/other_user}","gists_url":"https://api.github.com/users/MountainRoseHerbs/gists{/gist_id}","starred_url":"https://api.github.com/users/MountainRoseHerbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MountainRoseHerbs/subscriptions","organizations_url":"https://api.github.com/users/MountainRoseHerbs/orgs","repos_url":"https://api.github.com/users/MountainRoseHerbs/repos","events_url":"https://api.github.com/users/MountainRoseHerbs/events{/privacy}","received_events_url":"https://api.github.com/users/MountainRoseHerbs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MountainRoseHerbs/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/MountainRoseHerbs/spree","forks_url":"https://api.github.com/repos/MountainRoseHerbs/spree/forks","keys_url":"https://api.github.com/repos/MountainRoseHerbs/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MountainRoseHerbs/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MountainRoseHerbs/spree/teams","hooks_url":"https://api.github.com/repos/MountainRoseHerbs/spree/hooks","issue_events_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/events{/number}","events_url":"https://api.github.com/repos/MountainRoseHerbs/spree/events","assignees_url":"https://api.github.com/repos/MountainRoseHerbs/spree/assignees{/user}","branches_url":"https://api.github.com/repos/MountainRoseHerbs/spree/branches{/branch}","tags_url":"https://api.github.com/repos/MountainRoseHerbs/spree/tags","blobs_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MountainRoseHerbs/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/MountainRoseHerbs/spree/languages","stargazers_url":"https://api.github.com/repos/MountainRoseHerbs/spree/stargazers","contributors_url":"https://api.github.com/repos/MountainRoseHerbs/spree/contributors","subscribers_url":"https://api.github.com/repos/MountainRoseHerbs/spree/subscribers","subscription_url":"https://api.github.com/repos/MountainRoseHerbs/spree/subscription","commits_url":"https://api.github.com/repos/MountainRoseHerbs/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/MountainRoseHerbs/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/MountainRoseHerbs/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/MountainRoseHerbs/spree/contents/{+path}","compare_url":"https://api.github.com/repos/MountainRoseHerbs/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MountainRoseHerbs/spree/merges","archive_url":"https://api.github.com/repos/MountainRoseHerbs/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MountainRoseHerbs/spree/downloads","issues_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues{/number}","pulls_url":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/MountainRoseHerbs/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/MountainRoseHerbs/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MountainRoseHerbs/spree/labels{/name}","releases_url":"https://api.github.com/repos/MountainRoseHerbs/spree/releases{/id}","created_at":"2013-08-29T22:58:09Z","updated_at":"2015-04-16T21:58:33Z","pushed_at":"2015-06-05T02:04:51Z","git_url":"git://github.com/MountainRoseHerbs/spree.git","ssh_url":"git@github.com:MountainRoseHerbs/spree.git","clone_url":"https://github.com/MountainRoseHerbs/spree.git","svn_url":"https://github.com/MountainRoseHerbs/spree","homepage":"http://spreecommerce.com","size":80814,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"2-3-stable-mrh"}},"base":{"label":"spree:master","ref":"master","sha":"d83733d996241e10906f703a845dfaae08625cbd","user":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"repo":{"id":3314,"name":"spree","full_name":"spree/spree","owner":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spree/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/spree/spree","forks_url":"https://api.github.com/repos/spree/spree/forks","keys_url":"https://api.github.com/repos/spree/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spree/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spree/spree/teams","hooks_url":"https://api.github.com/repos/spree/spree/hooks","issue_events_url":"https://api.github.com/repos/spree/spree/issues/events{/number}","events_url":"https://api.github.com/repos/spree/spree/events","assignees_url":"https://api.github.com/repos/spree/spree/assignees{/user}","branches_url":"https://api.github.com/repos/spree/spree/branches{/branch}","tags_url":"https://api.github.com/repos/spree/spree/tags","blobs_url":"https://api.github.com/repos/spree/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spree/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spree/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/spree/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spree/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/spree/spree/languages","stargazers_url":"https://api.github.com/repos/spree/spree/stargazers","contributors_url":"https://api.github.com/repos/spree/spree/contributors","subscribers_url":"https://api.github.com/repos/spree/spree/subscribers","subscription_url":"https://api.github.com/repos/spree/spree/subscription","commits_url":"https://api.github.com/repos/spree/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/spree/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/spree/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/spree/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/spree/spree/contents/{+path}","compare_url":"https://api.github.com/repos/spree/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spree/spree/merges","archive_url":"https://api.github.com/repos/spree/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spree/spree/downloads","issues_url":"https://api.github.com/repos/spree/spree/issues{/number}","pulls_url":"https://api.github.com/repos/spree/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/spree/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/spree/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spree/spree/labels{/name}","releases_url":"https://api.github.com/repos/spree/spree/releases{/id}","created_at":"2008-03-10T14:45:35Z","updated_at":"2015-06-05T00:04:20Z","pushed_at":"2015-06-05T02:04:54Z","git_url":"git://github.com/spree/spree.git","ssh_url":"git@github.com:spree/spree.git","clone_url":"https://github.com/spree/spree.git","svn_url":"https://github.com/spree/spree","homepage":"http://spreecommerce.com","size":139859,"stargazers_count":6399,"watchers_count":6399,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2999,"mirror_url":null,"open_issues_count":124,"forks":2999,"open_issues":124,"watchers":6399,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/6413"},"html":{"href":"https://github.com/spree/spree/pull/6413"},"issue":{"href":"https://api.github.com/repos/spree/spree/issues/6413"},"comments":{"href":"https://api.github.com/repos/spree/spree/issues/6413/comments"},"review_comments":{"href":"https://api.github.com/repos/spree/spree/pulls/6413/comments"},"review_comment":{"href":"https://api.github.com/repos/spree/spree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spree/spree/pulls/6413/commits"},"statuses":{"href":"https://api.github.com/repos/spree/spree/statuses/697ba75647e7805e79b281c213184513ea455f2e"}}}}