{"action":"created","comment":{"url":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/comments/25094860","id":25094860,"diff_hunk":"@@ -0,0 +1,263 @@\n+class Socialstar\n+  include Mongoid::Document\n+  include Mongoid::Timestamps\n+  include Mongoid::Enum\n+\n+  devise :omniauthable, :omniauth_providers => [:facebook, :instagram, :twitter, :google_oauth2]\n+\n+  has_one :invitation_code\n+\n+  CROWDTAP_ATTRIBUTES = [\n+    :country_code,\n+    :date_of_birth,\n+    :email,\n+    :fb_user_id,\n+    :first_name,\n+    :gender,\n+    :last_name,\n+    :social_media_access_tokens,\n+    :terms_of_service,\n+    :ethnicity,\n+    :relationship_status,\n+    :parenting_status,\n+    :zip_code\n+  ]\n+\n+  VALID_SOCIAL_CHANNELS = {\n+    :blog      => [:name, :url, :visitors, :payment, :categories => []],\n+    :facebook  => [:username, :followers, :payment],\n+    :instagram => [:username, :followers, :payment],\n+    :pinterest => [:username, :followers, :payment],\n+    :tumblr    => [:username, :followers, :payment],\n+    :twitter   => [:username, :followers, :payment],\n+    :vine      => [:username, :followers, :payment],\n+    :youtube   => [:channel, :subscribers, :payment]\n+  }\n+\n+  VALID_SOCIAL_CHANNELS.each do |network, fields|\n+    fields.each do |field|\n+      next if field == :payment\n+      if field.is_a? Hash\n+        field = field.keys.first\n+      end\n+      getter = \"#{network}_#{field}\".to_sym\n+      CROWDTAP_ATTRIBUTES.push getter\n+\n+      define_method getter do\n+        if social_channels[network]\n+          social_channels[network][field]\n+        end\n+      end\n+    end\n+  end\n+\n+  US_STATES = ['AL','AK','AZ','AR','CA','CO','CT','DE','FL','GA','HI','ID','IL','IN','IA','KS','KY',\n+               'LA','ME','MD','MA','MI','MN','MS','MO','MT','NE','NV','NH','NJ','NM','NY','NC','ND',\n+               'OH','OK','OR','PA','RI','SC','SD','TN','TX','UT','VT','VA','WA','WV','WI','WY','DC']\n+  CA_STATES = ['AB','BC','MB','NB','NL','NT','NS','NU','ON','PE','QC','SK','YT']\n+  VALID_STATES = US_STATES + CA_STATES\n+\n+  BLOG_CATEGORIES = [\n+    \"Lifestyle\",\n+    \"Parenting\",\n+    \"Beauty\",\n+    \"Fashion\",\n+    \"Foodie\",\n+    \"Tech\",\n+    \"Health/Fitness\",\n+    \"Home/Design\",\n+    \"Craft/DIY\",\n+    \"Finance/Business\",\n+    \"Music/Entertainment\",\n+    \"Cars/Auto\",\n+    \"Travel\",\n+    \"Pets\",\n+    \"Bridal/Event\",\n+    \"Vlogging\",\n+    \"Other\"\n+  ]\n+\n+  GENDERS = ['Male', 'Female']\n+  PAYMENT_METHODS = ['ZipMark', 'PayPal']\n+\n+  field :country_code, :default => 'US'\n+  field :date_of_birth, :type => DateTime\n+  field :email, :default => ''\n+  field :encrypted_password, :default => ''\n+  field :fb_user_id\n+  field :first_name\n+  field :has_seen_tutorial, :type => Boolean, :default => false\n+  field :gender\n+  field :last_name\n+  field :mixpanel_member_id\n+  field :password\n+  field :password_confirmation\n+  field :provider\n+  field :referral_url\n+  field :social_media_access_tokens, :type => Hash, :default => {}\n+  field :crowdtap_member_id, :type => BSON::ObjectId\n+  field :terms_of_service, :type => Boolean, :default => true\n+  field :ethnicity\n+  field :parenting_status\n+  field :relationship_status\n+  field :address_state\n+  field :zip_code\n+  field :social_channels, :type => Hash, :default => {}\n+  field :admin, :type => Boolean, :default => false\n+  field :socialstar_verified, :type => Boolean, :default => false\n+  field :payment_method, :default => 'ZipMark'\n+  field :notes\n+  field :blog_name,           :type => String\n+  field :blog_url,            :type => String\n+  field :blog_visitors,       :type => Integer\n+  field :blog_payment,        :type => String\n+  field :blog_categories,     :type => Array,  :default => []\n+  field :facebook_username,   :type => String\n+  field :facebook_followers,  :type => Integer\n+  field :facebook_payment,    :type => String\n+  field :instagram_username,  :type => String\n+  field :instagram_followers, :type => Integer\n+  field :instagram_payment,   :type => String\n+  field :pinterest_username,  :type => String\n+  field :pinterest_followers, :type => Integer\n+  field :pinterest_payment,   :type => String\n+  field :twitter_username,    :type => String\n+  field :twitter_followers,   :type => Integer\n+  field :twitter_payment,     :type => String\n+  field :vine_username,       :type => String\n+  field :vine_followers,      :type => Integer\n+  field :vine_payment,        :type => String\n+  field :youtube_channel,     :type => String\n+  field :youtube_subscribers, :type => Integer\n+  field :youtube_payment,     :type => String\n+\n+  enum :status, [:pending, :approved, :rejected, :accepted]\n+\n+  validates :email,    format: { with: /\\A([\\w\\.%\\+\\-]+)@([\\w\\-]+\\.)+([\\w]{2,})\\z/i,\n+                                 message: \"not a valid email\" },\n+                                 allow_nil: true\n+  validates :zip_code, format: { with: /\\A\\d{5}$|^[A-Z|a-z]\\d[A-Z|a-z] ?\\d[A-Z|a-z]\\d\\z/i,","path":"socialstar.rb","position":139,"original_position":139,"commit_id":"29f3340b583edc208bd220a355b82838df60d264","original_commit_id":"29f3340b583edc208bd220a355b82838df60d264","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Line is too long. [90/80]","created_at":"2015-02-20T19:17:02Z","updated_at":"2015-02-20T19:17:02Z","html_url":"https://github.com/iureguimaraes/hound_test/pull/1#discussion_r25094860","pull_request_url":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/comments/25094860"},"html":{"href":"https://github.com/iureguimaraes/hound_test/pull/1#discussion_r25094860"},"pull_request":{"href":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/1","id":29722600,"html_url":"https://github.com/iureguimaraes/hound_test/pull/1","diff_url":"https://github.com/iureguimaraes/hound_test/pull/1.diff","patch_url":"https://github.com/iureguimaraes/hound_test/pull/1.patch","issue_url":"https://api.github.com/repos/iureguimaraes/hound_test/issues/1","number":1,"state":"open","locked":false,"title":"wip","user":{"login":"iureguimaraes","id":171380,"avatar_url":"https://avatars.githubusercontent.com/u/171380?v=3","gravatar_id":"","url":"https://api.github.com/users/iureguimaraes","html_url":"https://github.com/iureguimaraes","followers_url":"https://api.github.com/users/iureguimaraes/followers","following_url":"https://api.github.com/users/iureguimaraes/following{/other_user}","gists_url":"https://api.github.com/users/iureguimaraes/gists{/gist_id}","starred_url":"https://api.github.com/users/iureguimaraes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iureguimaraes/subscriptions","organizations_url":"https://api.github.com/users/iureguimaraes/orgs","repos_url":"https://api.github.com/users/iureguimaraes/repos","events_url":"https://api.github.com/users/iureguimaraes/events{/privacy}","received_events_url":"https://api.github.com/users/iureguimaraes/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-20T19:16:52Z","updated_at":"2015-02-20T19:17:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f630ccc31d155386c20956c413d75d99906d3c9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/1/commits","review_comments_url":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/1/comments","review_comment_url":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/comments/{number}","comments_url":"https://api.github.com/repos/iureguimaraes/hound_test/issues/1/comments","statuses_url":"https://api.github.com/repos/iureguimaraes/hound_test/statuses/29f3340b583edc208bd220a355b82838df60d264","head":{"label":"is-madness","ref":"is-madness","sha":"29f3340b583edc208bd220a355b82838df60d264","user":{"login":"iureguimaraes","id":171380,"avatar_url":"https://avatars.githubusercontent.com/u/171380?v=3","gravatar_id":"","url":"https://api.github.com/users/iureguimaraes","html_url":"https://github.com/iureguimaraes","followers_url":"https://api.github.com/users/iureguimaraes/followers","following_url":"https://api.github.com/users/iureguimaraes/following{/other_user}","gists_url":"https://api.github.com/users/iureguimaraes/gists{/gist_id}","starred_url":"https://api.github.com/users/iureguimaraes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iureguimaraes/subscriptions","organizations_url":"https://api.github.com/users/iureguimaraes/orgs","repos_url":"https://api.github.com/users/iureguimaraes/repos","events_url":"https://api.github.com/users/iureguimaraes/events{/privacy}","received_events_url":"https://api.github.com/users/iureguimaraes/received_events","type":"User","site_admin":false},"repo":{"id":31079810,"name":"hound_test","full_name":"iureguimaraes/hound_test","owner":{"login":"iureguimaraes","id":171380,"avatar_url":"https://avatars.githubusercontent.com/u/171380?v=3","gravatar_id":"","url":"https://api.github.com/users/iureguimaraes","html_url":"https://github.com/iureguimaraes","followers_url":"https://api.github.com/users/iureguimaraes/followers","following_url":"https://api.github.com/users/iureguimaraes/following{/other_user}","gists_url":"https://api.github.com/users/iureguimaraes/gists{/gist_id}","starred_url":"https://api.github.com/users/iureguimaraes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iureguimaraes/subscriptions","organizations_url":"https://api.github.com/users/iureguimaraes/orgs","repos_url":"https://api.github.com/users/iureguimaraes/repos","events_url":"https://api.github.com/users/iureguimaraes/events{/privacy}","received_events_url":"https://api.github.com/users/iureguimaraes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iureguimaraes/hound_test","description":"","fork":false,"url":"https://api.github.com/repos/iureguimaraes/hound_test","forks_url":"https://api.github.com/repos/iureguimaraes/hound_test/forks","keys_url":"https://api.github.com/repos/iureguimaraes/hound_test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iureguimaraes/hound_test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iureguimaraes/hound_test/teams","hooks_url":"https://api.github.com/repos/iureguimaraes/hound_test/hooks","issue_events_url":"https://api.github.com/repos/iureguimaraes/hound_test/issues/events{/number}","events_url":"https://api.github.com/repos/iureguimaraes/hound_test/events","assignees_url":"https://api.github.com/repos/iureguimaraes/hound_test/assignees{/user}","branches_url":"https://api.github.com/repos/iureguimaraes/hound_test/branches{/branch}","tags_url":"https://api.github.com/repos/iureguimaraes/hound_test/tags","blobs_url":"https://api.github.com/repos/iureguimaraes/hound_test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iureguimaraes/hound_test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iureguimaraes/hound_test/git/refs{/sha}","trees_url":"https://api.github.com/repos/iureguimaraes/hound_test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iureguimaraes/hound_test/statuses/{sha}","languages_url":"https://api.github.com/repos/iureguimaraes/hound_test/languages","stargazers_url":"https://api.github.com/repos/iureguimaraes/hound_test/stargazers","contributors_url":"https://api.github.com/repos/iureguimaraes/hound_test/contributors","subscribers_url":"https://api.github.com/repos/iureguimaraes/hound_test/subscribers","subscription_url":"https://api.github.com/repos/iureguimaraes/hound_test/subscription","commits_url":"https://api.github.com/repos/iureguimaraes/hound_test/commits{/sha}","git_commits_url":"https://api.github.com/repos/iureguimaraes/hound_test/git/commits{/sha}","comments_url":"https://api.github.com/repos/iureguimaraes/hound_test/comments{/number}","issue_comment_url":"https://api.github.com/repos/iureguimaraes/hound_test/issues/comments/{number}","contents_url":"https://api.github.com/repos/iureguimaraes/hound_test/contents/{+path}","compare_url":"https://api.github.com/repos/iureguimaraes/hound_test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iureguimaraes/hound_test/merges","archive_url":"https://api.github.com/repos/iureguimaraes/hound_test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iureguimaraes/hound_test/downloads","issues_url":"https://api.github.com/repos/iureguimaraes/hound_test/issues{/number}","pulls_url":"https://api.github.com/repos/iureguimaraes/hound_test/pulls{/number}","milestones_url":"https://api.github.com/repos/iureguimaraes/hound_test/milestones{/number}","notifications_url":"https://api.github.com/repos/iureguimaraes/hound_test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iureguimaraes/hound_test/labels{/name}","releases_url":"https://api.github.com/repos/iureguimaraes/hound_test/releases{/id}","created_at":"2015-02-20T19:02:37Z","updated_at":"2015-02-20T19:10:11Z","pushed_at":"2015-02-20T19:12:31Z","git_url":"git://github.com/iureguimaraes/hound_test.git","ssh_url":"git@github.com:iureguimaraes/hound_test.git","clone_url":"https://github.com/iureguimaraes/hound_test.git","svn_url":"https://github.com/iureguimaraes/hound_test","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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":"master","ref":"master","sha":"334f6d0947172eb6d1c19dc612fc678219d10c53","user":{"login":"iureguimaraes","id":171380,"avatar_url":"https://avatars.githubusercontent.com/u/171380?v=3","gravatar_id":"","url":"https://api.github.com/users/iureguimaraes","html_url":"https://github.com/iureguimaraes","followers_url":"https://api.github.com/users/iureguimaraes/followers","following_url":"https://api.github.com/users/iureguimaraes/following{/other_user}","gists_url":"https://api.github.com/users/iureguimaraes/gists{/gist_id}","starred_url":"https://api.github.com/users/iureguimaraes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iureguimaraes/subscriptions","organizations_url":"https://api.github.com/users/iureguimaraes/orgs","repos_url":"https://api.github.com/users/iureguimaraes/repos","events_url":"https://api.github.com/users/iureguimaraes/events{/privacy}","received_events_url":"https://api.github.com/users/iureguimaraes/received_events","type":"User","site_admin":false},"repo":{"id":31079810,"name":"hound_test","full_name":"iureguimaraes/hound_test","owner":{"login":"iureguimaraes","id":171380,"avatar_url":"https://avatars.githubusercontent.com/u/171380?v=3","gravatar_id":"","url":"https://api.github.com/users/iureguimaraes","html_url":"https://github.com/iureguimaraes","followers_url":"https://api.github.com/users/iureguimaraes/followers","following_url":"https://api.github.com/users/iureguimaraes/following{/other_user}","gists_url":"https://api.github.com/users/iureguimaraes/gists{/gist_id}","starred_url":"https://api.github.com/users/iureguimaraes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iureguimaraes/subscriptions","organizations_url":"https://api.github.com/users/iureguimaraes/orgs","repos_url":"https://api.github.com/users/iureguimaraes/repos","events_url":"https://api.github.com/users/iureguimaraes/events{/privacy}","received_events_url":"https://api.github.com/users/iureguimaraes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iureguimaraes/hound_test","description":"","fork":false,"url":"https://api.github.com/repos/iureguimaraes/hound_test","forks_url":"https://api.github.com/repos/iureguimaraes/hound_test/forks","keys_url":"https://api.github.com/repos/iureguimaraes/hound_test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iureguimaraes/hound_test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iureguimaraes/hound_test/teams","hooks_url":"https://api.github.com/repos/iureguimaraes/hound_test/hooks","issue_events_url":"https://api.github.com/repos/iureguimaraes/hound_test/issues/events{/number}","events_url":"https://api.github.com/repos/iureguimaraes/hound_test/events","assignees_url":"https://api.github.com/repos/iureguimaraes/hound_test/assignees{/user}","branches_url":"https://api.github.com/repos/iureguimaraes/hound_test/branches{/branch}","tags_url":"https://api.github.com/repos/iureguimaraes/hound_test/tags","blobs_url":"https://api.github.com/repos/iureguimaraes/hound_test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iureguimaraes/hound_test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iureguimaraes/hound_test/git/refs{/sha}","trees_url":"https://api.github.com/repos/iureguimaraes/hound_test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iureguimaraes/hound_test/statuses/{sha}","languages_url":"https://api.github.com/repos/iureguimaraes/hound_test/languages","stargazers_url":"https://api.github.com/repos/iureguimaraes/hound_test/stargazers","contributors_url":"https://api.github.com/repos/iureguimaraes/hound_test/contributors","subscribers_url":"https://api.github.com/repos/iureguimaraes/hound_test/subscribers","subscription_url":"https://api.github.com/repos/iureguimaraes/hound_test/subscription","commits_url":"https://api.github.com/repos/iureguimaraes/hound_test/commits{/sha}","git_commits_url":"https://api.github.com/repos/iureguimaraes/hound_test/git/commits{/sha}","comments_url":"https://api.github.com/repos/iureguimaraes/hound_test/comments{/number}","issue_comment_url":"https://api.github.com/repos/iureguimaraes/hound_test/issues/comments/{number}","contents_url":"https://api.github.com/repos/iureguimaraes/hound_test/contents/{+path}","compare_url":"https://api.github.com/repos/iureguimaraes/hound_test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iureguimaraes/hound_test/merges","archive_url":"https://api.github.com/repos/iureguimaraes/hound_test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iureguimaraes/hound_test/downloads","issues_url":"https://api.github.com/repos/iureguimaraes/hound_test/issues{/number}","pulls_url":"https://api.github.com/repos/iureguimaraes/hound_test/pulls{/number}","milestones_url":"https://api.github.com/repos/iureguimaraes/hound_test/milestones{/number}","notifications_url":"https://api.github.com/repos/iureguimaraes/hound_test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iureguimaraes/hound_test/labels{/name}","releases_url":"https://api.github.com/repos/iureguimaraes/hound_test/releases{/id}","created_at":"2015-02-20T19:02:37Z","updated_at":"2015-02-20T19:10:11Z","pushed_at":"2015-02-20T19:12:31Z","git_url":"git://github.com/iureguimaraes/hound_test.git","ssh_url":"git@github.com:iureguimaraes/hound_test.git","clone_url":"https://github.com/iureguimaraes/hound_test.git","svn_url":"https://github.com/iureguimaraes/hound_test","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"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"}},"_links":{"self":{"href":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/1"},"html":{"href":"https://github.com/iureguimaraes/hound_test/pull/1"},"issue":{"href":"https://api.github.com/repos/iureguimaraes/hound_test/issues/1"},"comments":{"href":"https://api.github.com/repos/iureguimaraes/hound_test/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/iureguimaraes/hound_test/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/iureguimaraes/hound_test/statuses/29f3340b583edc208bd220a355b82838df60d264"}}}}