{"action":"created","comment":{"url":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/comments/90344370","pull_request_review_id":10864875,"id":90344370,"diff_hunk":"@@ -0,0 +1,60 @@\n+module JSONAPI\n+  module Serializable\n+    module ConditionalFields\n+      def self.prepended(klass)\n+        klass.class_eval do\n+          extend ClassMethods\n+          prepend InstanceMethods\n+          class << self\n+            attr_accessor :condition_blocks\n+          end\n+          self.condition_blocks ||= {}\n+        end\n+      end\n+\n+      module ClassMethods\n+        def inherited(klass)\n+          super\n+          klass.condition_blocks = condition_blocks.dup\n+        end\n+\n+        def _register_condition(name, conditions)\n+          condition_blocks[name.to_sym] =\n+            if conditions.key?(:if)\n+              conditions[:if]\n+            elsif conditions.key?(:unless)\n+              proc { !conditions[:unless].call }\n+            end\n+        end\n+\n+        def attribute(name, options = {}, &block)\n+          super\n+          _register_condition(name, options)\n+        end\n+\n+        def relationship(name, options = {}, &block)\n+          super\n+          _register_condition(name, options)\n+        end\n+      end\n+\n+      module InstanceMethods","path":"lib/jsonapi/serializable/conditional_fields.rb","position":41,"original_position":41,"commit_id":"29c849e5b7fc0b64e17b1b3416508c0b0e8afc36","original_commit_id":"29c849e5b7fc0b64e17b1b3416508c0b0e8afc36","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Missing top-level module documentation comment.","created_at":"2016-11-30T22:33:34Z","updated_at":"2016-11-30T22:33:34Z","html_url":"https://github.com/jsonapi-rb/serializable/pull/32#discussion_r90344370","pull_request_url":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/comments/90344370"},"html":{"href":"https://github.com/jsonapi-rb/serializable/pull/32#discussion_r90344370"},"pull_request":{"href":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/32","id":95988019,"html_url":"https://github.com/jsonapi-rb/serializable/pull/32","diff_url":"https://github.com/jsonapi-rb/serializable/pull/32.diff","patch_url":"https://github.com/jsonapi-rb/serializable/pull/32.patch","issue_url":"https://api.github.com/repos/jsonapi-rb/serializable/issues/32","number":32,"state":"open","locked":false,"title":"Key transform","user":{"login":"beauby","id":2215778,"avatar_url":"https://avatars.githubusercontent.com/u/2215778?v=3","gravatar_id":"","url":"https://api.github.com/users/beauby","html_url":"https://github.com/beauby","followers_url":"https://api.github.com/users/beauby/followers","following_url":"https://api.github.com/users/beauby/following{/other_user}","gists_url":"https://api.github.com/users/beauby/gists{/gist_id}","starred_url":"https://api.github.com/users/beauby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beauby/subscriptions","organizations_url":"https://api.github.com/users/beauby/orgs","repos_url":"https://api.github.com/users/beauby/repos","events_url":"https://api.github.com/users/beauby/events{/privacy}","received_events_url":"https://api.github.com/users/beauby/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-30T22:33:25Z","updated_at":"2016-11-30T22:33:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd827e07019329481f77830a91083733536530b8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/32/commits","review_comments_url":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/32/comments","review_comment_url":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jsonapi-rb/serializable/issues/32/comments","statuses_url":"https://api.github.com/repos/jsonapi-rb/serializable/statuses/29c849e5b7fc0b64e17b1b3416508c0b0e8afc36","head":{"label":"jsonapi-rb:key-transform","ref":"key-transform","sha":"29c849e5b7fc0b64e17b1b3416508c0b0e8afc36","user":{"login":"jsonapi-rb","id":23066863,"avatar_url":"https://avatars.githubusercontent.com/u/23066863?v=3","gravatar_id":"","url":"https://api.github.com/users/jsonapi-rb","html_url":"https://github.com/jsonapi-rb","followers_url":"https://api.github.com/users/jsonapi-rb/followers","following_url":"https://api.github.com/users/jsonapi-rb/following{/other_user}","gists_url":"https://api.github.com/users/jsonapi-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/jsonapi-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsonapi-rb/subscriptions","organizations_url":"https://api.github.com/users/jsonapi-rb/orgs","repos_url":"https://api.github.com/users/jsonapi-rb/repos","events_url":"https://api.github.com/users/jsonapi-rb/events{/privacy}","received_events_url":"https://api.github.com/users/jsonapi-rb/received_events","type":"Organization","site_admin":false},"repo":{"id":71955427,"name":"serializable","full_name":"jsonapi-rb/serializable","owner":{"login":"jsonapi-rb","id":23066863,"avatar_url":"https://avatars.githubusercontent.com/u/23066863?v=3","gravatar_id":"","url":"https://api.github.com/users/jsonapi-rb","html_url":"https://github.com/jsonapi-rb","followers_url":"https://api.github.com/users/jsonapi-rb/followers","following_url":"https://api.github.com/users/jsonapi-rb/following{/other_user}","gists_url":"https://api.github.com/users/jsonapi-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/jsonapi-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsonapi-rb/subscriptions","organizations_url":"https://api.github.com/users/jsonapi-rb/orgs","repos_url":"https://api.github.com/users/jsonapi-rb/repos","events_url":"https://api.github.com/users/jsonapi-rb/events{/privacy}","received_events_url":"https://api.github.com/users/jsonapi-rb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jsonapi-rb/serializable","description":"Conveniently build and efficiently render JSON API resources.","fork":false,"url":"https://api.github.com/repos/jsonapi-rb/serializable","forks_url":"https://api.github.com/repos/jsonapi-rb/serializable/forks","keys_url":"https://api.github.com/repos/jsonapi-rb/serializable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsonapi-rb/serializable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsonapi-rb/serializable/teams","hooks_url":"https://api.github.com/repos/jsonapi-rb/serializable/hooks","issue_events_url":"https://api.github.com/repos/jsonapi-rb/serializable/issues/events{/number}","events_url":"https://api.github.com/repos/jsonapi-rb/serializable/events","assignees_url":"https://api.github.com/repos/jsonapi-rb/serializable/assignees{/user}","branches_url":"https://api.github.com/repos/jsonapi-rb/serializable/branches{/branch}","tags_url":"https://api.github.com/repos/jsonapi-rb/serializable/tags","blobs_url":"https://api.github.com/repos/jsonapi-rb/serializable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsonapi-rb/serializable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsonapi-rb/serializable/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsonapi-rb/serializable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsonapi-rb/serializable/statuses/{sha}","languages_url":"https://api.github.com/repos/jsonapi-rb/serializable/languages","stargazers_url":"https://api.github.com/repos/jsonapi-rb/serializable/stargazers","contributors_url":"https://api.github.com/repos/jsonapi-rb/serializable/contributors","subscribers_url":"https://api.github.com/repos/jsonapi-rb/serializable/subscribers","subscription_url":"https://api.github.com/repos/jsonapi-rb/serializable/subscription","commits_url":"https://api.github.com/repos/jsonapi-rb/serializable/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsonapi-rb/serializable/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsonapi-rb/serializable/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsonapi-rb/serializable/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsonapi-rb/serializable/contents/{+path}","compare_url":"https://api.github.com/repos/jsonapi-rb/serializable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsonapi-rb/serializable/merges","archive_url":"https://api.github.com/repos/jsonapi-rb/serializable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsonapi-rb/serializable/downloads","issues_url":"https://api.github.com/repos/jsonapi-rb/serializable/issues{/number}","pulls_url":"https://api.github.com/repos/jsonapi-rb/serializable/pulls{/number}","milestones_url":"https://api.github.com/repos/jsonapi-rb/serializable/milestones{/number}","notifications_url":"https://api.github.com/repos/jsonapi-rb/serializable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsonapi-rb/serializable/labels{/name}","releases_url":"https://api.github.com/repos/jsonapi-rb/serializable/releases{/id}","deployments_url":"https://api.github.com/repos/jsonapi-rb/serializable/deployments","created_at":"2016-10-26T01:50:49Z","updated_at":"2016-11-19T20:06:06Z","pushed_at":"2016-11-30T22:33:25Z","git_url":"git://github.com/jsonapi-rb/serializable.git","ssh_url":"git@github.com:jsonapi-rb/serializable.git","clone_url":"https://github.com/jsonapi-rb/serializable.git","svn_url":"https://github.com/jsonapi-rb/serializable","homepage":"http://jsonapi-rb.org","size":57,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"jsonapi-rb:master","ref":"master","sha":"29ad2102fa5cd96aea8e1040bebc38a16791e759","user":{"login":"jsonapi-rb","id":23066863,"avatar_url":"https://avatars.githubusercontent.com/u/23066863?v=3","gravatar_id":"","url":"https://api.github.com/users/jsonapi-rb","html_url":"https://github.com/jsonapi-rb","followers_url":"https://api.github.com/users/jsonapi-rb/followers","following_url":"https://api.github.com/users/jsonapi-rb/following{/other_user}","gists_url":"https://api.github.com/users/jsonapi-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/jsonapi-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsonapi-rb/subscriptions","organizations_url":"https://api.github.com/users/jsonapi-rb/orgs","repos_url":"https://api.github.com/users/jsonapi-rb/repos","events_url":"https://api.github.com/users/jsonapi-rb/events{/privacy}","received_events_url":"https://api.github.com/users/jsonapi-rb/received_events","type":"Organization","site_admin":false},"repo":{"id":71955427,"name":"serializable","full_name":"jsonapi-rb/serializable","owner":{"login":"jsonapi-rb","id":23066863,"avatar_url":"https://avatars.githubusercontent.com/u/23066863?v=3","gravatar_id":"","url":"https://api.github.com/users/jsonapi-rb","html_url":"https://github.com/jsonapi-rb","followers_url":"https://api.github.com/users/jsonapi-rb/followers","following_url":"https://api.github.com/users/jsonapi-rb/following{/other_user}","gists_url":"https://api.github.com/users/jsonapi-rb/gists{/gist_id}","starred_url":"https://api.github.com/users/jsonapi-rb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsonapi-rb/subscriptions","organizations_url":"https://api.github.com/users/jsonapi-rb/orgs","repos_url":"https://api.github.com/users/jsonapi-rb/repos","events_url":"https://api.github.com/users/jsonapi-rb/events{/privacy}","received_events_url":"https://api.github.com/users/jsonapi-rb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jsonapi-rb/serializable","description":"Conveniently build and efficiently render JSON API resources.","fork":false,"url":"https://api.github.com/repos/jsonapi-rb/serializable","forks_url":"https://api.github.com/repos/jsonapi-rb/serializable/forks","keys_url":"https://api.github.com/repos/jsonapi-rb/serializable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsonapi-rb/serializable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsonapi-rb/serializable/teams","hooks_url":"https://api.github.com/repos/jsonapi-rb/serializable/hooks","issue_events_url":"https://api.github.com/repos/jsonapi-rb/serializable/issues/events{/number}","events_url":"https://api.github.com/repos/jsonapi-rb/serializable/events","assignees_url":"https://api.github.com/repos/jsonapi-rb/serializable/assignees{/user}","branches_url":"https://api.github.com/repos/jsonapi-rb/serializable/branches{/branch}","tags_url":"https://api.github.com/repos/jsonapi-rb/serializable/tags","blobs_url":"https://api.github.com/repos/jsonapi-rb/serializable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsonapi-rb/serializable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsonapi-rb/serializable/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsonapi-rb/serializable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsonapi-rb/serializable/statuses/{sha}","languages_url":"https://api.github.com/repos/jsonapi-rb/serializable/languages","stargazers_url":"https://api.github.com/repos/jsonapi-rb/serializable/stargazers","contributors_url":"https://api.github.com/repos/jsonapi-rb/serializable/contributors","subscribers_url":"https://api.github.com/repos/jsonapi-rb/serializable/subscribers","subscription_url":"https://api.github.com/repos/jsonapi-rb/serializable/subscription","commits_url":"https://api.github.com/repos/jsonapi-rb/serializable/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsonapi-rb/serializable/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsonapi-rb/serializable/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsonapi-rb/serializable/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsonapi-rb/serializable/contents/{+path}","compare_url":"https://api.github.com/repos/jsonapi-rb/serializable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsonapi-rb/serializable/merges","archive_url":"https://api.github.com/repos/jsonapi-rb/serializable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsonapi-rb/serializable/downloads","issues_url":"https://api.github.com/repos/jsonapi-rb/serializable/issues{/number}","pulls_url":"https://api.github.com/repos/jsonapi-rb/serializable/pulls{/number}","milestones_url":"https://api.github.com/repos/jsonapi-rb/serializable/milestones{/number}","notifications_url":"https://api.github.com/repos/jsonapi-rb/serializable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsonapi-rb/serializable/labels{/name}","releases_url":"https://api.github.com/repos/jsonapi-rb/serializable/releases{/id}","deployments_url":"https://api.github.com/repos/jsonapi-rb/serializable/deployments","created_at":"2016-10-26T01:50:49Z","updated_at":"2016-11-19T20:06:06Z","pushed_at":"2016-11-30T22:33:25Z","git_url":"git://github.com/jsonapi-rb/serializable.git","ssh_url":"git@github.com:jsonapi-rb/serializable.git","clone_url":"https://github.com/jsonapi-rb/serializable.git","svn_url":"https://github.com/jsonapi-rb/serializable","homepage":"http://jsonapi-rb.org","size":57,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/32"},"html":{"href":"https://github.com/jsonapi-rb/serializable/pull/32"},"issue":{"href":"https://api.github.com/repos/jsonapi-rb/serializable/issues/32"},"comments":{"href":"https://api.github.com/repos/jsonapi-rb/serializable/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jsonapi-rb/serializable/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/jsonapi-rb/serializable/statuses/29c849e5b7fc0b64e17b1b3416508c0b0e8afc36"}}}}
{"actor":{"display_login":"houndci-bot"}}