{"action":"created","comment":{"url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/comments/229622988","pull_request_review_id":170154649,"id":229622988,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTYyMjk4OA==","diff_hunk":"@@ -0,0 +1,24 @@\n+defmodule StoreTest do\n+  use ExUnit.Case, async: true\n+\n+  alias FeatureFlags.Store\n+\n+  test \"Store table creation\" do\n+    exists = Store.whereis()\n+\n+    assert exists\n+  end\n+\n+  setup do\n+    :ets.new(:feature_table, [:set, :named_table])\n+    :ok\n+  end\n+\n+  test \"Store insert and lookup\" do","path":"test/store_test.exs","position":17,"original_position":17,"commit_id":"80881f7f8ef1d6a395b588f041d85892d866f57d","original_commit_id":"80881f7f8ef1d6a395b588f041d85892d866f57d","user":{"login":"mvpgomes","id":4008754,"node_id":"MDQ6VXNlcjQwMDg3NTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4008754?v=4","gravatar_id":"","url":"https://api.github.com/users/mvpgomes","html_url":"https://github.com/mvpgomes","followers_url":"https://api.github.com/users/mvpgomes/followers","following_url":"https://api.github.com/users/mvpgomes/following{/other_user}","gists_url":"https://api.github.com/users/mvpgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/mvpgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvpgomes/subscriptions","organizations_url":"https://api.github.com/users/mvpgomes/orgs","repos_url":"https://api.github.com/users/mvpgomes/repos","events_url":"https://api.github.com/users/mvpgomes/events{/privacy}","received_events_url":"https://api.github.com/users/mvpgomes/received_events","type":"User","site_admin":false},"body":"Following the good practices of testing, we should have tests for each method that is exposed in the interface of our module/class. So my suggestion here is to split this test in two, one that tests the `#insert` and other that tests the `#lookup`.","created_at":"2018-10-31T09:45:42Z","updated_at":"2018-10-31T09:51:26Z","html_url":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc/pull/1#discussion_r229622988","pull_request_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/comments/229622988"},"html":{"href":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc/pull/1#discussion_r229622988"},"pull_request":{"href":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/1","id":225827895,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1ODI3ODk1","html_url":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc/pull/1","diff_url":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc/pull/1.diff","patch_url":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc/pull/1.patch","issue_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/issues/1","number":1,"state":"open","locked":false,"title":"POC Split IO Elixir client initial proposal","user":{"login":"BrunoBFerreira","id":7031973,"node_id":"MDQ6VXNlcjcwMzE5NzM=","avatar_url":"https://avatars0.githubusercontent.com/u/7031973?v=4","gravatar_id":"","url":"https://api.github.com/users/BrunoBFerreira","html_url":"https://github.com/BrunoBFerreira","followers_url":"https://api.github.com/users/BrunoBFerreira/followers","following_url":"https://api.github.com/users/BrunoBFerreira/following{/other_user}","gists_url":"https://api.github.com/users/BrunoBFerreira/gists{/gist_id}","starred_url":"https://api.github.com/users/BrunoBFerreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrunoBFerreira/subscriptions","organizations_url":"https://api.github.com/users/BrunoBFerreira/orgs","repos_url":"https://api.github.com/users/BrunoBFerreira/repos","events_url":"https://api.github.com/users/BrunoBFerreira/events{/privacy}","received_events_url":"https://api.github.com/users/BrunoBFerreira/received_events","type":"User","site_admin":false},"body":"Created a POC in Elixir for a client for Split IO that allows the use of the Split IO API. The client stores the features in memory during the bootstrap and allows the use of the get(name, attributes, default) method to obtain information about the treatment currently being used by a feature with the given name and attributes, returning the default value if the feature is not available. \r\n\r\nTo store the features, the client uses Erlang's :ets. This cache is also refreshed in a given time interval that can be defined with an environment variable, namely \"SPLIT_PERIOD\". To initialize and update the cache, an Elixir's GenServer is used. \r\n\r\nIn addition, if a feature is not available in cache, a direct request for that feature is done directly to the Split IO server.\r\n\r\nFinally, to deal with the server rate limiting, the client checks the response of the server and waits the amount of time presented in the response to retry the request. \r\n\r\nFor all the HTTP requests, HTTPoison is being used, as well as Jason to decode the responses. ","created_at":"2018-10-25T16:36:44Z","updated_at":"2018-10-31T09:51:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39fe94b2210472fefa13280652839e1095cb4237","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/1/commits","review_comments_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/1/comments","review_comment_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/issues/1/comments","statuses_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/statuses/80881f7f8ef1d6a395b588f041d85892d866f57d","head":{"label":"talkdesk-sandbox:feature_fetcher","ref":"feature_fetcher","sha":"80881f7f8ef1d6a395b588f041d85892d866f57d","user":{"login":"talkdesk-sandbox","id":17999716,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3OTk5NzE2","avatar_url":"https://avatars1.githubusercontent.com/u/17999716?v=4","gravatar_id":"","url":"https://api.github.com/users/talkdesk-sandbox","html_url":"https://github.com/talkdesk-sandbox","followers_url":"https://api.github.com/users/talkdesk-sandbox/followers","following_url":"https://api.github.com/users/talkdesk-sandbox/following{/other_user}","gists_url":"https://api.github.com/users/talkdesk-sandbox/gists{/gist_id}","starred_url":"https://api.github.com/users/talkdesk-sandbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talkdesk-sandbox/subscriptions","organizations_url":"https://api.github.com/users/talkdesk-sandbox/orgs","repos_url":"https://api.github.com/users/talkdesk-sandbox/repos","events_url":"https://api.github.com/users/talkdesk-sandbox/events{/privacy}","received_events_url":"https://api.github.com/users/talkdesk-sandbox/received_events","type":"Organization","site_admin":false},"repo":{"id":153313674,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMzMTM2NzQ=","name":"talkdesk-features-elixir-poc","full_name":"talkdesk-sandbox/talkdesk-features-elixir-poc","private":false,"owner":{"login":"talkdesk-sandbox","id":17999716,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3OTk5NzE2","avatar_url":"https://avatars1.githubusercontent.com/u/17999716?v=4","gravatar_id":"","url":"https://api.github.com/users/talkdesk-sandbox","html_url":"https://github.com/talkdesk-sandbox","followers_url":"https://api.github.com/users/talkdesk-sandbox/followers","following_url":"https://api.github.com/users/talkdesk-sandbox/following{/other_user}","gists_url":"https://api.github.com/users/talkdesk-sandbox/gists{/gist_id}","starred_url":"https://api.github.com/users/talkdesk-sandbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talkdesk-sandbox/subscriptions","organizations_url":"https://api.github.com/users/talkdesk-sandbox/orgs","repos_url":"https://api.github.com/users/talkdesk-sandbox/repos","events_url":"https://api.github.com/users/talkdesk-sandbox/events{/privacy}","received_events_url":"https://api.github.com/users/talkdesk-sandbox/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc","description":null,"fork":false,"url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc","forks_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/forks","keys_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/teams","hooks_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/hooks","issue_events_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/issues/events{/number}","events_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/events","assignees_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/assignees{/user}","branches_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/branches{/branch}","tags_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/tags","blobs_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/git/refs{/sha}","trees_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/statuses/{sha}","languages_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/languages","stargazers_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/stargazers","contributors_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/contributors","subscribers_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/subscribers","subscription_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/subscription","commits_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/commits{/sha}","git_commits_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/git/commits{/sha}","comments_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/comments{/number}","issue_comment_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/issues/comments{/number}","contents_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/contents/{+path}","compare_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/merges","archive_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/downloads","issues_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/issues{/number}","pulls_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls{/number}","milestones_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/milestones{/number}","notifications_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/labels{/name}","releases_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/releases{/id}","deployments_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/deployments","created_at":"2018-10-16T15:57:53Z","updated_at":"2018-10-19T11:05:58Z","pushed_at":"2018-10-30T15:02:29Z","git_url":"git://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc.git","ssh_url":"git@github.com:talkdesk-sandbox/talkdesk-features-elixir-poc.git","clone_url":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc.git","svn_url":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc","homepage":null,"size":29,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"talkdesk-sandbox:master","ref":"master","sha":"c74dcbaa716388d754fe984e198db93ab6b16425","user":{"login":"talkdesk-sandbox","id":17999716,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3OTk5NzE2","avatar_url":"https://avatars1.githubusercontent.com/u/17999716?v=4","gravatar_id":"","url":"https://api.github.com/users/talkdesk-sandbox","html_url":"https://github.com/talkdesk-sandbox","followers_url":"https://api.github.com/users/talkdesk-sandbox/followers","following_url":"https://api.github.com/users/talkdesk-sandbox/following{/other_user}","gists_url":"https://api.github.com/users/talkdesk-sandbox/gists{/gist_id}","starred_url":"https://api.github.com/users/talkdesk-sandbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talkdesk-sandbox/subscriptions","organizations_url":"https://api.github.com/users/talkdesk-sandbox/orgs","repos_url":"https://api.github.com/users/talkdesk-sandbox/repos","events_url":"https://api.github.com/users/talkdesk-sandbox/events{/privacy}","received_events_url":"https://api.github.com/users/talkdesk-sandbox/received_events","type":"Organization","site_admin":false},"repo":{"id":153313674,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMzMTM2NzQ=","name":"talkdesk-features-elixir-poc","full_name":"talkdesk-sandbox/talkdesk-features-elixir-poc","private":false,"owner":{"login":"talkdesk-sandbox","id":17999716,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3OTk5NzE2","avatar_url":"https://avatars1.githubusercontent.com/u/17999716?v=4","gravatar_id":"","url":"https://api.github.com/users/talkdesk-sandbox","html_url":"https://github.com/talkdesk-sandbox","followers_url":"https://api.github.com/users/talkdesk-sandbox/followers","following_url":"https://api.github.com/users/talkdesk-sandbox/following{/other_user}","gists_url":"https://api.github.com/users/talkdesk-sandbox/gists{/gist_id}","starred_url":"https://api.github.com/users/talkdesk-sandbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talkdesk-sandbox/subscriptions","organizations_url":"https://api.github.com/users/talkdesk-sandbox/orgs","repos_url":"https://api.github.com/users/talkdesk-sandbox/repos","events_url":"https://api.github.com/users/talkdesk-sandbox/events{/privacy}","received_events_url":"https://api.github.com/users/talkdesk-sandbox/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc","description":null,"fork":false,"url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc","forks_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/forks","keys_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/teams","hooks_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/hooks","issue_events_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/issues/events{/number}","events_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/events","assignees_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/assignees{/user}","branches_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/branches{/branch}","tags_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/tags","blobs_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/git/refs{/sha}","trees_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/statuses/{sha}","languages_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/languages","stargazers_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/stargazers","contributors_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/contributors","subscribers_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/subscribers","subscription_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/subscription","commits_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/commits{/sha}","git_commits_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/git/commits{/sha}","comments_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/comments{/number}","issue_comment_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/issues/comments{/number}","contents_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/contents/{+path}","compare_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/merges","archive_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/downloads","issues_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/issues{/number}","pulls_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls{/number}","milestones_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/milestones{/number}","notifications_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/labels{/name}","releases_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/releases{/id}","deployments_url":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/deployments","created_at":"2018-10-16T15:57:53Z","updated_at":"2018-10-19T11:05:58Z","pushed_at":"2018-10-30T15:02:29Z","git_url":"git://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc.git","ssh_url":"git@github.com:talkdesk-sandbox/talkdesk-features-elixir-poc.git","clone_url":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc.git","svn_url":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc","homepage":null,"size":29,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/1"},"html":{"href":"https://github.com/talkdesk-sandbox/talkdesk-features-elixir-poc/pull/1"},"issue":{"href":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/issues/1"},"comments":{"href":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/talkdesk-sandbox/talkdesk-features-elixir-poc/statuses/80881f7f8ef1d6a395b588f041d85892d866f57d"}},"author_association":"NONE"}}
{"actor":{"display_login":"mvpgomes"}}