{"action":"created","comment":{"url":"https://api.github.com/repos/vinted/ab/pulls/comments/30128995","id":30128995,"diff_hunk":"@@ -8,6 +8,14 @@ def before_picking_variant(&block)\n       def after_picking_variant(&block)\n         AssignedTest.after_picking_variant(&block)\n       end\n+\n+      def logger=(logger)\n+        @logger = logger\n+      end\n+\n+      def logger","path":"lib/ab/tests.rb","position":9,"original_position":9,"commit_id":"2df46f8dee743f580b5d032e7d338d9a38fa1a2e","original_commit_id":"2df46f8dee743f580b5d032e7d338d9a38fa1a2e","user":{"login":"tomasv","id":206971,"avatar_url":"https://avatars.githubusercontent.com/u/206971?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasv","html_url":"https://github.com/tomasv","followers_url":"https://api.github.com/users/tomasv/followers","following_url":"https://api.github.com/users/tomasv/following{/other_user}","gists_url":"https://api.github.com/users/tomasv/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasv/subscriptions","organizations_url":"https://api.github.com/users/tomasv/orgs","repos_url":"https://api.github.com/users/tomasv/repos","events_url":"https://api.github.com/users/tomasv/events{/privacy}","received_events_url":"https://api.github.com/users/tomasv/received_events","type":"User","site_admin":false},"body":"Actually, maybe the logger should be on `Ab` instead of `Ab::Tests`. It looks weird when `Ab::MissingVariant` tries to look in `Ab::Tests` for a logger. We could also use the configuration block pattern for this gem:\r\n```ruby\r\nAb.configure do |config|\r\n  config.logger = MyLogger.new\r\nend\r\n```\r\n\r\n:smile: ","created_at":"2015-05-12T12:40:50Z","updated_at":"2015-05-12T12:40:50Z","html_url":"https://github.com/vinted/ab/pull/23#discussion_r30128995","pull_request_url":"https://api.github.com/repos/vinted/ab/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/vinted/ab/pulls/comments/30128995"},"html":{"href":"https://github.com/vinted/ab/pull/23#discussion_r30128995"},"pull_request":{"href":"https://api.github.com/repos/vinted/ab/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/vinted/ab/pulls/23","id":22842520,"html_url":"https://github.com/vinted/ab/pull/23","diff_url":"https://github.com/vinted/ab/pull/23.diff","patch_url":"https://github.com/vinted/ab/pull/23.patch","issue_url":"https://api.github.com/repos/vinted/ab/issues/23","number":23,"state":"open","locked":false,"title":"Allow asking for any variant on an ab_test","user":{"login":"redross","id":1102710,"avatar_url":"https://avatars.githubusercontent.com/u/1102710?v=3","gravatar_id":"","url":"https://api.github.com/users/redross","html_url":"https://github.com/redross","followers_url":"https://api.github.com/users/redross/followers","following_url":"https://api.github.com/users/redross/following{/other_user}","gists_url":"https://api.github.com/users/redross/gists{/gist_id}","starred_url":"https://api.github.com/users/redross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redross/subscriptions","organizations_url":"https://api.github.com/users/redross/orgs","repos_url":"https://api.github.com/users/redross/repos","events_url":"https://api.github.com/users/redross/events{/privacy}","received_events_url":"https://api.github.com/users/redross/received_events","type":"User","site_admin":false},"body":"If ab config changes variant configuration for an ab test,\r\nab lib used to throw errors if `ab_test.some_variant?` code\r\nwas invoked. Now it returns false.\r\n\r\nJava/Objective-C implementations seem to behave in similar way.\r\n\r\ncc @mmozuras ","created_at":"2014-10-16T09:33:53Z","updated_at":"2015-05-12T12:40:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5225e718668e55e8b535b5c9f7d14d29ad4192cd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vinted/ab/pulls/23/commits","review_comments_url":"https://api.github.com/repos/vinted/ab/pulls/23/comments","review_comment_url":"https://api.github.com/repos/vinted/ab/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vinted/ab/issues/23/comments","statuses_url":"https://api.github.com/repos/vinted/ab/statuses/2df46f8dee743f580b5d032e7d338d9a38fa1a2e","head":{"label":"vinted:features/allow_asking_for_non_existant_variant","ref":"features/allow_asking_for_non_existant_variant","sha":"2df46f8dee743f580b5d032e7d338d9a38fa1a2e","user":{"login":"vinted","id":1684930,"avatar_url":"https://avatars.githubusercontent.com/u/1684930?v=3","gravatar_id":"","url":"https://api.github.com/users/vinted","html_url":"https://github.com/vinted","followers_url":"https://api.github.com/users/vinted/followers","following_url":"https://api.github.com/users/vinted/following{/other_user}","gists_url":"https://api.github.com/users/vinted/gists{/gist_id}","starred_url":"https://api.github.com/users/vinted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinted/subscriptions","organizations_url":"https://api.github.com/users/vinted/orgs","repos_url":"https://api.github.com/users/vinted/repos","events_url":"https://api.github.com/users/vinted/events{/privacy}","received_events_url":"https://api.github.com/users/vinted/received_events","type":"Organization","site_admin":false},"repo":{"id":19981044,"name":"ab","full_name":"vinted/ab","owner":{"login":"vinted","id":1684930,"avatar_url":"https://avatars.githubusercontent.com/u/1684930?v=3","gravatar_id":"","url":"https://api.github.com/users/vinted","html_url":"https://github.com/vinted","followers_url":"https://api.github.com/users/vinted/followers","following_url":"https://api.github.com/users/vinted/following{/other_user}","gists_url":"https://api.github.com/users/vinted/gists{/gist_id}","starred_url":"https://api.github.com/users/vinted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinted/subscriptions","organizations_url":"https://api.github.com/users/vinted/orgs","repos_url":"https://api.github.com/users/vinted/repos","events_url":"https://api.github.com/users/vinted/events{/privacy}","received_events_url":"https://api.github.com/users/vinted/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vinted/ab","description":"Determines which ab test and variant identifier belongs to ","fork":false,"url":"https://api.github.com/repos/vinted/ab","forks_url":"https://api.github.com/repos/vinted/ab/forks","keys_url":"https://api.github.com/repos/vinted/ab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vinted/ab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vinted/ab/teams","hooks_url":"https://api.github.com/repos/vinted/ab/hooks","issue_events_url":"https://api.github.com/repos/vinted/ab/issues/events{/number}","events_url":"https://api.github.com/repos/vinted/ab/events","assignees_url":"https://api.github.com/repos/vinted/ab/assignees{/user}","branches_url":"https://api.github.com/repos/vinted/ab/branches{/branch}","tags_url":"https://api.github.com/repos/vinted/ab/tags","blobs_url":"https://api.github.com/repos/vinted/ab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vinted/ab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vinted/ab/git/refs{/sha}","trees_url":"https://api.github.com/repos/vinted/ab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vinted/ab/statuses/{sha}","languages_url":"https://api.github.com/repos/vinted/ab/languages","stargazers_url":"https://api.github.com/repos/vinted/ab/stargazers","contributors_url":"https://api.github.com/repos/vinted/ab/contributors","subscribers_url":"https://api.github.com/repos/vinted/ab/subscribers","subscription_url":"https://api.github.com/repos/vinted/ab/subscription","commits_url":"https://api.github.com/repos/vinted/ab/commits{/sha}","git_commits_url":"https://api.github.com/repos/vinted/ab/git/commits{/sha}","comments_url":"https://api.github.com/repos/vinted/ab/comments{/number}","issue_comment_url":"https://api.github.com/repos/vinted/ab/issues/comments{/number}","contents_url":"https://api.github.com/repos/vinted/ab/contents/{+path}","compare_url":"https://api.github.com/repos/vinted/ab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vinted/ab/merges","archive_url":"https://api.github.com/repos/vinted/ab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vinted/ab/downloads","issues_url":"https://api.github.com/repos/vinted/ab/issues{/number}","pulls_url":"https://api.github.com/repos/vinted/ab/pulls{/number}","milestones_url":"https://api.github.com/repos/vinted/ab/milestones{/number}","notifications_url":"https://api.github.com/repos/vinted/ab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vinted/ab/labels{/name}","releases_url":"https://api.github.com/repos/vinted/ab/releases{/id}","created_at":"2014-05-20T13:04:43Z","updated_at":"2014-12-19T10:32:47Z","pushed_at":"2015-05-12T08:04:02Z","git_url":"git://github.com/vinted/ab.git","ssh_url":"git@github.com:vinted/ab.git","clone_url":"https://github.com/vinted/ab.git","svn_url":"https://github.com/vinted/ab","homepage":"","size":734,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"vinted:master","ref":"master","sha":"ea2427b374686062089c70dd615e20dd9f32dfe2","user":{"login":"vinted","id":1684930,"avatar_url":"https://avatars.githubusercontent.com/u/1684930?v=3","gravatar_id":"","url":"https://api.github.com/users/vinted","html_url":"https://github.com/vinted","followers_url":"https://api.github.com/users/vinted/followers","following_url":"https://api.github.com/users/vinted/following{/other_user}","gists_url":"https://api.github.com/users/vinted/gists{/gist_id}","starred_url":"https://api.github.com/users/vinted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinted/subscriptions","organizations_url":"https://api.github.com/users/vinted/orgs","repos_url":"https://api.github.com/users/vinted/repos","events_url":"https://api.github.com/users/vinted/events{/privacy}","received_events_url":"https://api.github.com/users/vinted/received_events","type":"Organization","site_admin":false},"repo":{"id":19981044,"name":"ab","full_name":"vinted/ab","owner":{"login":"vinted","id":1684930,"avatar_url":"https://avatars.githubusercontent.com/u/1684930?v=3","gravatar_id":"","url":"https://api.github.com/users/vinted","html_url":"https://github.com/vinted","followers_url":"https://api.github.com/users/vinted/followers","following_url":"https://api.github.com/users/vinted/following{/other_user}","gists_url":"https://api.github.com/users/vinted/gists{/gist_id}","starred_url":"https://api.github.com/users/vinted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinted/subscriptions","organizations_url":"https://api.github.com/users/vinted/orgs","repos_url":"https://api.github.com/users/vinted/repos","events_url":"https://api.github.com/users/vinted/events{/privacy}","received_events_url":"https://api.github.com/users/vinted/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vinted/ab","description":"Determines which ab test and variant identifier belongs to ","fork":false,"url":"https://api.github.com/repos/vinted/ab","forks_url":"https://api.github.com/repos/vinted/ab/forks","keys_url":"https://api.github.com/repos/vinted/ab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vinted/ab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vinted/ab/teams","hooks_url":"https://api.github.com/repos/vinted/ab/hooks","issue_events_url":"https://api.github.com/repos/vinted/ab/issues/events{/number}","events_url":"https://api.github.com/repos/vinted/ab/events","assignees_url":"https://api.github.com/repos/vinted/ab/assignees{/user}","branches_url":"https://api.github.com/repos/vinted/ab/branches{/branch}","tags_url":"https://api.github.com/repos/vinted/ab/tags","blobs_url":"https://api.github.com/repos/vinted/ab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vinted/ab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vinted/ab/git/refs{/sha}","trees_url":"https://api.github.com/repos/vinted/ab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vinted/ab/statuses/{sha}","languages_url":"https://api.github.com/repos/vinted/ab/languages","stargazers_url":"https://api.github.com/repos/vinted/ab/stargazers","contributors_url":"https://api.github.com/repos/vinted/ab/contributors","subscribers_url":"https://api.github.com/repos/vinted/ab/subscribers","subscription_url":"https://api.github.com/repos/vinted/ab/subscription","commits_url":"https://api.github.com/repos/vinted/ab/commits{/sha}","git_commits_url":"https://api.github.com/repos/vinted/ab/git/commits{/sha}","comments_url":"https://api.github.com/repos/vinted/ab/comments{/number}","issue_comment_url":"https://api.github.com/repos/vinted/ab/issues/comments{/number}","contents_url":"https://api.github.com/repos/vinted/ab/contents/{+path}","compare_url":"https://api.github.com/repos/vinted/ab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vinted/ab/merges","archive_url":"https://api.github.com/repos/vinted/ab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vinted/ab/downloads","issues_url":"https://api.github.com/repos/vinted/ab/issues{/number}","pulls_url":"https://api.github.com/repos/vinted/ab/pulls{/number}","milestones_url":"https://api.github.com/repos/vinted/ab/milestones{/number}","notifications_url":"https://api.github.com/repos/vinted/ab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vinted/ab/labels{/name}","releases_url":"https://api.github.com/repos/vinted/ab/releases{/id}","created_at":"2014-05-20T13:04:43Z","updated_at":"2014-12-19T10:32:47Z","pushed_at":"2015-05-12T08:04:02Z","git_url":"git://github.com/vinted/ab.git","ssh_url":"git@github.com:vinted/ab.git","clone_url":"https://github.com/vinted/ab.git","svn_url":"https://github.com/vinted/ab","homepage":"","size":734,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vinted/ab/pulls/23"},"html":{"href":"https://github.com/vinted/ab/pull/23"},"issue":{"href":"https://api.github.com/repos/vinted/ab/issues/23"},"comments":{"href":"https://api.github.com/repos/vinted/ab/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/vinted/ab/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/vinted/ab/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vinted/ab/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/vinted/ab/statuses/2df46f8dee743f580b5d032e7d338d9a38fa1a2e"}}}}