{"action":"created","comment":{"url":"https://api.github.com/repos/SumOfUs/share_progress/pulls/comments/37999569","id":37999569,"diff_hunk":"@@ -1,27 +1,26 @@\n require 'share_progress'\n require 'share_progress/client'\n+require 'share_progress/utils'\n \n module ShareProgress\n   class Button\n \n-    attr_accessor :page_url, :page_title, :button_template, :share_button_html, :is_active\n-    attr_reader   :id\n+    attr_accessor :page_url, :page_title, :button_template, :share_button_html, :is_active, :auto_fill, :variations, :advanced_options\n+    attr_reader   :id, :errors\n \n     class << self\n \n-      def create(page_url, button_template, raw_options={})\n-        created = update(nil, page_url, button_template, raw_options)\n-        created.nil? ? nil : new(created)\n+      def create(options={})\n+        created = update(options)","path":"lib/share_progress/button.rb","position":19,"original_position":19,"commit_id":"a9d8442e1e1ce42fa68dffaedbf1b24d25dcc2b0","original_commit_id":"a9d8442e1e1ce42fa68dffaedbf1b24d25dcc2b0","user":{"login":"NealJMD","id":102218,"avatar_url":"https://avatars.githubusercontent.com/u/102218?v=3","gravatar_id":"","url":"https://api.github.com/users/NealJMD","html_url":"https://github.com/NealJMD","followers_url":"https://api.github.com/users/NealJMD/followers","following_url":"https://api.github.com/users/NealJMD/following{/other_user}","gists_url":"https://api.github.com/users/NealJMD/gists{/gist_id}","starred_url":"https://api.github.com/users/NealJMD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NealJMD/subscriptions","organizations_url":"https://api.github.com/users/NealJMD/orgs","repos_url":"https://api.github.com/users/NealJMD/repos","events_url":"https://api.github.com/users/NealJMD/events{/privacy}","received_events_url":"https://api.github.com/users/NealJMD/received_events","type":"User","site_admin":false},"body":"hey @osahyoun do you think that I should raise ArgumentError if options doesn't include the two parameters required by the API? or should I let that error trickle down into the validation errors on the button instance (as it does now)","created_at":"2015-08-26T15:57:04Z","updated_at":"2015-08-26T15:57:04Z","html_url":"https://github.com/SumOfUs/share_progress/pull/10#discussion_r37999569","pull_request_url":"https://api.github.com/repos/SumOfUs/share_progress/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/SumOfUs/share_progress/pulls/comments/37999569"},"html":{"href":"https://github.com/SumOfUs/share_progress/pull/10#discussion_r37999569"},"pull_request":{"href":"https://api.github.com/repos/SumOfUs/share_progress/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/SumOfUs/share_progress/pulls/10","id":43342695,"html_url":"https://github.com/SumOfUs/share_progress/pull/10","diff_url":"https://github.com/SumOfUs/share_progress/pull/10.diff","patch_url":"https://github.com/SumOfUs/share_progress/pull/10.patch","issue_url":"https://api.github.com/repos/SumOfUs/share_progress/issues/10","number":10,"state":"open","locked":false,"title":"Button specs","user":{"login":"NealJMD","id":102218,"avatar_url":"https://avatars.githubusercontent.com/u/102218?v=3","gravatar_id":"","url":"https://api.github.com/users/NealJMD","html_url":"https://github.com/NealJMD","followers_url":"https://api.github.com/users/NealJMD/followers","following_url":"https://api.github.com/users/NealJMD/following{/other_user}","gists_url":"https://api.github.com/users/NealJMD/gists{/gist_id}","starred_url":"https://api.github.com/users/NealJMD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NealJMD/subscriptions","organizations_url":"https://api.github.com/users/NealJMD/orgs","repos_url":"https://api.github.com/users/NealJMD/repos","events_url":"https://api.github.com/users/NealJMD/events{/privacy}","received_events_url":"https://api.github.com/users/NealJMD/received_events","type":"User","site_admin":false},"body":"This essentially just keeps piling specs on to the Button class. It also creates a Utils class, puts errors as a field on the button object, and gets the save method working.","created_at":"2015-08-25T22:06:28Z","updated_at":"2015-08-26T15:57:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9bf1ecf00db31595721029adefef08c6365515b7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SumOfUs/share_progress/pulls/10/commits","review_comments_url":"https://api.github.com/repos/SumOfUs/share_progress/pulls/10/comments","review_comment_url":"https://api.github.com/repos/SumOfUs/share_progress/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SumOfUs/share_progress/issues/10/comments","statuses_url":"https://api.github.com/repos/SumOfUs/share_progress/statuses/a9d8442e1e1ce42fa68dffaedbf1b24d25dcc2b0","head":{"label":"SumOfUs:buttons","ref":"buttons","sha":"a9d8442e1e1ce42fa68dffaedbf1b24d25dcc2b0","user":{"login":"SumOfUs","id":7574652,"avatar_url":"https://avatars.githubusercontent.com/u/7574652?v=3","gravatar_id":"","url":"https://api.github.com/users/SumOfUs","html_url":"https://github.com/SumOfUs","followers_url":"https://api.github.com/users/SumOfUs/followers","following_url":"https://api.github.com/users/SumOfUs/following{/other_user}","gists_url":"https://api.github.com/users/SumOfUs/gists{/gist_id}","starred_url":"https://api.github.com/users/SumOfUs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumOfUs/subscriptions","organizations_url":"https://api.github.com/users/SumOfUs/orgs","repos_url":"https://api.github.com/users/SumOfUs/repos","events_url":"https://api.github.com/users/SumOfUs/events{/privacy}","received_events_url":"https://api.github.com/users/SumOfUs/received_events","type":"Organization","site_admin":false},"repo":{"id":41103304,"name":"share_progress","full_name":"SumOfUs/share_progress","owner":{"login":"SumOfUs","id":7574652,"avatar_url":"https://avatars.githubusercontent.com/u/7574652?v=3","gravatar_id":"","url":"https://api.github.com/users/SumOfUs","html_url":"https://github.com/SumOfUs","followers_url":"https://api.github.com/users/SumOfUs/followers","following_url":"https://api.github.com/users/SumOfUs/following{/other_user}","gists_url":"https://api.github.com/users/SumOfUs/gists{/gist_id}","starred_url":"https://api.github.com/users/SumOfUs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumOfUs/subscriptions","organizations_url":"https://api.github.com/users/SumOfUs/orgs","repos_url":"https://api.github.com/users/SumOfUs/repos","events_url":"https://api.github.com/users/SumOfUs/events{/privacy}","received_events_url":"https://api.github.com/users/SumOfUs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SumOfUs/share_progress","description":"A Ruby wrapper library for the ShareProgress API.","fork":false,"url":"https://api.github.com/repos/SumOfUs/share_progress","forks_url":"https://api.github.com/repos/SumOfUs/share_progress/forks","keys_url":"https://api.github.com/repos/SumOfUs/share_progress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SumOfUs/share_progress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SumOfUs/share_progress/teams","hooks_url":"https://api.github.com/repos/SumOfUs/share_progress/hooks","issue_events_url":"https://api.github.com/repos/SumOfUs/share_progress/issues/events{/number}","events_url":"https://api.github.com/repos/SumOfUs/share_progress/events","assignees_url":"https://api.github.com/repos/SumOfUs/share_progress/assignees{/user}","branches_url":"https://api.github.com/repos/SumOfUs/share_progress/branches{/branch}","tags_url":"https://api.github.com/repos/SumOfUs/share_progress/tags","blobs_url":"https://api.github.com/repos/SumOfUs/share_progress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SumOfUs/share_progress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SumOfUs/share_progress/git/refs{/sha}","trees_url":"https://api.github.com/repos/SumOfUs/share_progress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SumOfUs/share_progress/statuses/{sha}","languages_url":"https://api.github.com/repos/SumOfUs/share_progress/languages","stargazers_url":"https://api.github.com/repos/SumOfUs/share_progress/stargazers","contributors_url":"https://api.github.com/repos/SumOfUs/share_progress/contributors","subscribers_url":"https://api.github.com/repos/SumOfUs/share_progress/subscribers","subscription_url":"https://api.github.com/repos/SumOfUs/share_progress/subscription","commits_url":"https://api.github.com/repos/SumOfUs/share_progress/commits{/sha}","git_commits_url":"https://api.github.com/repos/SumOfUs/share_progress/git/commits{/sha}","comments_url":"https://api.github.com/repos/SumOfUs/share_progress/comments{/number}","issue_comment_url":"https://api.github.com/repos/SumOfUs/share_progress/issues/comments{/number}","contents_url":"https://api.github.com/repos/SumOfUs/share_progress/contents/{+path}","compare_url":"https://api.github.com/repos/SumOfUs/share_progress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SumOfUs/share_progress/merges","archive_url":"https://api.github.com/repos/SumOfUs/share_progress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SumOfUs/share_progress/downloads","issues_url":"https://api.github.com/repos/SumOfUs/share_progress/issues{/number}","pulls_url":"https://api.github.com/repos/SumOfUs/share_progress/pulls{/number}","milestones_url":"https://api.github.com/repos/SumOfUs/share_progress/milestones{/number}","notifications_url":"https://api.github.com/repos/SumOfUs/share_progress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SumOfUs/share_progress/labels{/name}","releases_url":"https://api.github.com/repos/SumOfUs/share_progress/releases{/id}","created_at":"2015-08-20T15:24:28Z","updated_at":"2015-08-20T15:24:55Z","pushed_at":"2015-08-26T14:01:27Z","git_url":"git://github.com/SumOfUs/share_progress.git","ssh_url":"git@github.com:SumOfUs/share_progress.git","clone_url":"https://github.com/SumOfUs/share_progress.git","svn_url":"https://github.com/SumOfUs/share_progress","homepage":null,"size":0,"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":"master"}},"base":{"label":"SumOfUs:master","ref":"master","sha":"202a297d94d97cf833448f2816422ebbd622c2c7","user":{"login":"SumOfUs","id":7574652,"avatar_url":"https://avatars.githubusercontent.com/u/7574652?v=3","gravatar_id":"","url":"https://api.github.com/users/SumOfUs","html_url":"https://github.com/SumOfUs","followers_url":"https://api.github.com/users/SumOfUs/followers","following_url":"https://api.github.com/users/SumOfUs/following{/other_user}","gists_url":"https://api.github.com/users/SumOfUs/gists{/gist_id}","starred_url":"https://api.github.com/users/SumOfUs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumOfUs/subscriptions","organizations_url":"https://api.github.com/users/SumOfUs/orgs","repos_url":"https://api.github.com/users/SumOfUs/repos","events_url":"https://api.github.com/users/SumOfUs/events{/privacy}","received_events_url":"https://api.github.com/users/SumOfUs/received_events","type":"Organization","site_admin":false},"repo":{"id":41103304,"name":"share_progress","full_name":"SumOfUs/share_progress","owner":{"login":"SumOfUs","id":7574652,"avatar_url":"https://avatars.githubusercontent.com/u/7574652?v=3","gravatar_id":"","url":"https://api.github.com/users/SumOfUs","html_url":"https://github.com/SumOfUs","followers_url":"https://api.github.com/users/SumOfUs/followers","following_url":"https://api.github.com/users/SumOfUs/following{/other_user}","gists_url":"https://api.github.com/users/SumOfUs/gists{/gist_id}","starred_url":"https://api.github.com/users/SumOfUs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SumOfUs/subscriptions","organizations_url":"https://api.github.com/users/SumOfUs/orgs","repos_url":"https://api.github.com/users/SumOfUs/repos","events_url":"https://api.github.com/users/SumOfUs/events{/privacy}","received_events_url":"https://api.github.com/users/SumOfUs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SumOfUs/share_progress","description":"A Ruby wrapper library for the ShareProgress API.","fork":false,"url":"https://api.github.com/repos/SumOfUs/share_progress","forks_url":"https://api.github.com/repos/SumOfUs/share_progress/forks","keys_url":"https://api.github.com/repos/SumOfUs/share_progress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SumOfUs/share_progress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SumOfUs/share_progress/teams","hooks_url":"https://api.github.com/repos/SumOfUs/share_progress/hooks","issue_events_url":"https://api.github.com/repos/SumOfUs/share_progress/issues/events{/number}","events_url":"https://api.github.com/repos/SumOfUs/share_progress/events","assignees_url":"https://api.github.com/repos/SumOfUs/share_progress/assignees{/user}","branches_url":"https://api.github.com/repos/SumOfUs/share_progress/branches{/branch}","tags_url":"https://api.github.com/repos/SumOfUs/share_progress/tags","blobs_url":"https://api.github.com/repos/SumOfUs/share_progress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SumOfUs/share_progress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SumOfUs/share_progress/git/refs{/sha}","trees_url":"https://api.github.com/repos/SumOfUs/share_progress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SumOfUs/share_progress/statuses/{sha}","languages_url":"https://api.github.com/repos/SumOfUs/share_progress/languages","stargazers_url":"https://api.github.com/repos/SumOfUs/share_progress/stargazers","contributors_url":"https://api.github.com/repos/SumOfUs/share_progress/contributors","subscribers_url":"https://api.github.com/repos/SumOfUs/share_progress/subscribers","subscription_url":"https://api.github.com/repos/SumOfUs/share_progress/subscription","commits_url":"https://api.github.com/repos/SumOfUs/share_progress/commits{/sha}","git_commits_url":"https://api.github.com/repos/SumOfUs/share_progress/git/commits{/sha}","comments_url":"https://api.github.com/repos/SumOfUs/share_progress/comments{/number}","issue_comment_url":"https://api.github.com/repos/SumOfUs/share_progress/issues/comments{/number}","contents_url":"https://api.github.com/repos/SumOfUs/share_progress/contents/{+path}","compare_url":"https://api.github.com/repos/SumOfUs/share_progress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SumOfUs/share_progress/merges","archive_url":"https://api.github.com/repos/SumOfUs/share_progress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SumOfUs/share_progress/downloads","issues_url":"https://api.github.com/repos/SumOfUs/share_progress/issues{/number}","pulls_url":"https://api.github.com/repos/SumOfUs/share_progress/pulls{/number}","milestones_url":"https://api.github.com/repos/SumOfUs/share_progress/milestones{/number}","notifications_url":"https://api.github.com/repos/SumOfUs/share_progress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SumOfUs/share_progress/labels{/name}","releases_url":"https://api.github.com/repos/SumOfUs/share_progress/releases{/id}","created_at":"2015-08-20T15:24:28Z","updated_at":"2015-08-20T15:24:55Z","pushed_at":"2015-08-26T14:01:27Z","git_url":"git://github.com/SumOfUs/share_progress.git","ssh_url":"git@github.com:SumOfUs/share_progress.git","clone_url":"https://github.com/SumOfUs/share_progress.git","svn_url":"https://github.com/SumOfUs/share_progress","homepage":null,"size":0,"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":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SumOfUs/share_progress/pulls/10"},"html":{"href":"https://github.com/SumOfUs/share_progress/pull/10"},"issue":{"href":"https://api.github.com/repos/SumOfUs/share_progress/issues/10"},"comments":{"href":"https://api.github.com/repos/SumOfUs/share_progress/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/SumOfUs/share_progress/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/SumOfUs/share_progress/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SumOfUs/share_progress/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/SumOfUs/share_progress/statuses/a9d8442e1e1ce42fa68dffaedbf1b24d25dcc2b0"}}}}