{"action":"created","comment":{"url":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/comments/23875558","id":23875558,"diff_hunk":"@@ -247,8 +247,19 @@ def match_target?(target, user)\n \n     end\n \n+    def match_user?(variation, user)\n+      if !!variation[:userTarget]\n+        return match_target?(variation[:userTarget], user)\n+      end\n+      return false\n+    end\n+\n     def match_variation?(variation, user)","path":"lib/ldclient-rb/ldclient.rb","position":11,"original_position":11,"commit_id":"bcf17424827c8004f4d796d203f710594f8da7a8","original_commit_id":"bcf17424827c8004f4d796d203f710594f8da7a8","user":{"login":"pkaeding","id":13951,"avatar_url":"https://avatars.githubusercontent.com/u/13951?v=3","gravatar_id":"","url":"https://api.github.com/users/pkaeding","html_url":"https://github.com/pkaeding","followers_url":"https://api.github.com/users/pkaeding/followers","following_url":"https://api.github.com/users/pkaeding/following{/other_user}","gists_url":"https://api.github.com/users/pkaeding/gists{/gist_id}","starred_url":"https://api.github.com/users/pkaeding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkaeding/subscriptions","organizations_url":"https://api.github.com/users/pkaeding/orgs","repos_url":"https://api.github.com/users/pkaeding/repos","events_url":"https://api.github.com/users/pkaeding/events{/privacy}","received_events_url":"https://api.github.com/users/pkaeding/received_events","type":"User","site_admin":false},"body":"Since the `userTarget` is a part of the variation, this function should probably be named `matchTargets` or something, since it a user may match a given variation, but this function would return false.","created_at":"2015-01-30T21:55:27Z","updated_at":"2015-01-30T21:55:27Z","html_url":"https://github.com/launchdarkly/ruby-client/pull/8#discussion_r23875558","pull_request_url":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/comments/23875558"},"html":{"href":"https://github.com/launchdarkly/ruby-client/pull/8#discussion_r23875558"},"pull_request":{"href":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/8","id":28385191,"html_url":"https://github.com/launchdarkly/ruby-client/pull/8","diff_url":"https://github.com/launchdarkly/ruby-client/pull/8.diff","patch_url":"https://github.com/launchdarkly/ruby-client/pull/8.patch","issue_url":"https://api.github.com/repos/launchdarkly/ruby-client/issues/8","number":8,"state":"open","locked":false,"title":"Jko/user rules","user":{"login":"jkodumal","id":19426,"avatar_url":"https://avatars.githubusercontent.com/u/19426?v=3","gravatar_id":"","url":"https://api.github.com/users/jkodumal","html_url":"https://github.com/jkodumal","followers_url":"https://api.github.com/users/jkodumal/followers","following_url":"https://api.github.com/users/jkodumal/following{/other_user}","gists_url":"https://api.github.com/users/jkodumal/gists{/gist_id}","starred_url":"https://api.github.com/users/jkodumal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkodumal/subscriptions","organizations_url":"https://api.github.com/users/jkodumal/orgs","repos_url":"https://api.github.com/users/jkodumal/repos","events_url":"https://api.github.com/users/jkodumal/events{/privacy}","received_events_url":"https://api.github.com/users/jkodumal/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-30T19:12:34Z","updated_at":"2015-01-30T21:55:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c32c3f7e475776388aff6ff1b917643b961b02cd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/8/commits","review_comments_url":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/8/comments","review_comment_url":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/comments/{number}","comments_url":"https://api.github.com/repos/launchdarkly/ruby-client/issues/8/comments","statuses_url":"https://api.github.com/repos/launchdarkly/ruby-client/statuses/bcf17424827c8004f4d796d203f710594f8da7a8","head":{"label":"launchdarkly:jko/user-rules","ref":"jko/user-rules","sha":"bcf17424827c8004f4d796d203f710594f8da7a8","user":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"repo":{"id":24067687,"name":"ruby-client","full_name":"launchdarkly/ruby-client","owner":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/launchdarkly/ruby-client","description":"LaunchDarkly SDK for Ruby","fork":false,"url":"https://api.github.com/repos/launchdarkly/ruby-client","forks_url":"https://api.github.com/repos/launchdarkly/ruby-client/forks","keys_url":"https://api.github.com/repos/launchdarkly/ruby-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/launchdarkly/ruby-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/launchdarkly/ruby-client/teams","hooks_url":"https://api.github.com/repos/launchdarkly/ruby-client/hooks","issue_events_url":"https://api.github.com/repos/launchdarkly/ruby-client/issues/events{/number}","events_url":"https://api.github.com/repos/launchdarkly/ruby-client/events","assignees_url":"https://api.github.com/repos/launchdarkly/ruby-client/assignees{/user}","branches_url":"https://api.github.com/repos/launchdarkly/ruby-client/branches{/branch}","tags_url":"https://api.github.com/repos/launchdarkly/ruby-client/tags","blobs_url":"https://api.github.com/repos/launchdarkly/ruby-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/launchdarkly/ruby-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/launchdarkly/ruby-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/launchdarkly/ruby-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/launchdarkly/ruby-client/statuses/{sha}","languages_url":"https://api.github.com/repos/launchdarkly/ruby-client/languages","stargazers_url":"https://api.github.com/repos/launchdarkly/ruby-client/stargazers","contributors_url":"https://api.github.com/repos/launchdarkly/ruby-client/contributors","subscribers_url":"https://api.github.com/repos/launchdarkly/ruby-client/subscribers","subscription_url":"https://api.github.com/repos/launchdarkly/ruby-client/subscription","commits_url":"https://api.github.com/repos/launchdarkly/ruby-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/launchdarkly/ruby-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/launchdarkly/ruby-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/launchdarkly/ruby-client/issues/comments/{number}","contents_url":"https://api.github.com/repos/launchdarkly/ruby-client/contents/{+path}","compare_url":"https://api.github.com/repos/launchdarkly/ruby-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/launchdarkly/ruby-client/merges","archive_url":"https://api.github.com/repos/launchdarkly/ruby-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/launchdarkly/ruby-client/downloads","issues_url":"https://api.github.com/repos/launchdarkly/ruby-client/issues{/number}","pulls_url":"https://api.github.com/repos/launchdarkly/ruby-client/pulls{/number}","milestones_url":"https://api.github.com/repos/launchdarkly/ruby-client/milestones{/number}","notifications_url":"https://api.github.com/repos/launchdarkly/ruby-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/launchdarkly/ruby-client/labels{/name}","releases_url":"https://api.github.com/repos/launchdarkly/ruby-client/releases{/id}","created_at":"2014-09-15T18:16:17Z","updated_at":"2015-01-26T23:43:41Z","pushed_at":"2015-01-30T18:22:52Z","git_url":"git://github.com/launchdarkly/ruby-client.git","ssh_url":"git@github.com:launchdarkly/ruby-client.git","clone_url":"https://github.com/launchdarkly/ruby-client.git","svn_url":"https://github.com/launchdarkly/ruby-client","homepage":"http://www.launchdarkly.com","size":335,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"launchdarkly:master","ref":"master","sha":"c7a15420add428a23687b09aac8f121322d77ddb","user":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"repo":{"id":24067687,"name":"ruby-client","full_name":"launchdarkly/ruby-client","owner":{"login":"launchdarkly","id":8039656,"avatar_url":"https://avatars.githubusercontent.com/u/8039656?v=3","gravatar_id":"","url":"https://api.github.com/users/launchdarkly","html_url":"https://github.com/launchdarkly","followers_url":"https://api.github.com/users/launchdarkly/followers","following_url":"https://api.github.com/users/launchdarkly/following{/other_user}","gists_url":"https://api.github.com/users/launchdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/launchdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchdarkly/subscriptions","organizations_url":"https://api.github.com/users/launchdarkly/orgs","repos_url":"https://api.github.com/users/launchdarkly/repos","events_url":"https://api.github.com/users/launchdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/launchdarkly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/launchdarkly/ruby-client","description":"LaunchDarkly SDK for Ruby","fork":false,"url":"https://api.github.com/repos/launchdarkly/ruby-client","forks_url":"https://api.github.com/repos/launchdarkly/ruby-client/forks","keys_url":"https://api.github.com/repos/launchdarkly/ruby-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/launchdarkly/ruby-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/launchdarkly/ruby-client/teams","hooks_url":"https://api.github.com/repos/launchdarkly/ruby-client/hooks","issue_events_url":"https://api.github.com/repos/launchdarkly/ruby-client/issues/events{/number}","events_url":"https://api.github.com/repos/launchdarkly/ruby-client/events","assignees_url":"https://api.github.com/repos/launchdarkly/ruby-client/assignees{/user}","branches_url":"https://api.github.com/repos/launchdarkly/ruby-client/branches{/branch}","tags_url":"https://api.github.com/repos/launchdarkly/ruby-client/tags","blobs_url":"https://api.github.com/repos/launchdarkly/ruby-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/launchdarkly/ruby-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/launchdarkly/ruby-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/launchdarkly/ruby-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/launchdarkly/ruby-client/statuses/{sha}","languages_url":"https://api.github.com/repos/launchdarkly/ruby-client/languages","stargazers_url":"https://api.github.com/repos/launchdarkly/ruby-client/stargazers","contributors_url":"https://api.github.com/repos/launchdarkly/ruby-client/contributors","subscribers_url":"https://api.github.com/repos/launchdarkly/ruby-client/subscribers","subscription_url":"https://api.github.com/repos/launchdarkly/ruby-client/subscription","commits_url":"https://api.github.com/repos/launchdarkly/ruby-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/launchdarkly/ruby-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/launchdarkly/ruby-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/launchdarkly/ruby-client/issues/comments/{number}","contents_url":"https://api.github.com/repos/launchdarkly/ruby-client/contents/{+path}","compare_url":"https://api.github.com/repos/launchdarkly/ruby-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/launchdarkly/ruby-client/merges","archive_url":"https://api.github.com/repos/launchdarkly/ruby-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/launchdarkly/ruby-client/downloads","issues_url":"https://api.github.com/repos/launchdarkly/ruby-client/issues{/number}","pulls_url":"https://api.github.com/repos/launchdarkly/ruby-client/pulls{/number}","milestones_url":"https://api.github.com/repos/launchdarkly/ruby-client/milestones{/number}","notifications_url":"https://api.github.com/repos/launchdarkly/ruby-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/launchdarkly/ruby-client/labels{/name}","releases_url":"https://api.github.com/repos/launchdarkly/ruby-client/releases{/id}","created_at":"2014-09-15T18:16:17Z","updated_at":"2015-01-26T23:43:41Z","pushed_at":"2015-01-30T18:22:52Z","git_url":"git://github.com/launchdarkly/ruby-client.git","ssh_url":"git@github.com:launchdarkly/ruby-client.git","clone_url":"https://github.com/launchdarkly/ruby-client.git","svn_url":"https://github.com/launchdarkly/ruby-client","homepage":"http://www.launchdarkly.com","size":335,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/8"},"html":{"href":"https://github.com/launchdarkly/ruby-client/pull/8"},"issue":{"href":"https://api.github.com/repos/launchdarkly/ruby-client/issues/8"},"comments":{"href":"https://api.github.com/repos/launchdarkly/ruby-client/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/launchdarkly/ruby-client/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/launchdarkly/ruby-client/statuses/bcf17424827c8004f4d796d203f710594f8da7a8"}}}}