{"action":"created","comment":{"url":"https://api.github.com/repos/zendesk/prop/pulls/comments/33078880","id":33078880,"diff_hunk":"@@ -0,0 +1,30 @@\n+require_relative 'helper'\n+\n+describe Prop::LeakyBucketStrategy do\n+  before do\n+    @store = {}\n+    @key = \"leaky_bucket_cache_key\"\n+\n+    Prop::Limiter.read  { |key| @store[key] }\n+    Prop::Limiter.write { |key, value| @store[key] = value }\n+    Prop::Limiter.configure(:something, :threshold => 10, :interval => 1, :burst_rate => 100, :leaky_bucket => true)","path":"test/test_leaky_bucket_strategy.rb","position":10,"original_position":10,"commit_id":"d79dbceff38c22f574a08fa76a33645a7a586f6f","original_commit_id":"d79dbceff38c22f574a08fa76a33645a7a586f6f","user":{"login":"grosser","id":11367,"avatar_url":"https://avatars.githubusercontent.com/u/11367?v=3","gravatar_id":"","url":"https://api.github.com/users/grosser","html_url":"https://github.com/grosser","followers_url":"https://api.github.com/users/grosser/followers","following_url":"https://api.github.com/users/grosser/following{/other_user}","gists_url":"https://api.github.com/users/grosser/gists{/gist_id}","starred_url":"https://api.github.com/users/grosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grosser/subscriptions","organizations_url":"https://api.github.com/users/grosser/orgs","repos_url":"https://api.github.com/users/grosser/repos","events_url":"https://api.github.com/users/grosser/events{/privacy}","received_events_url":"https://api.github.com/users/grosser/received_events","type":"User","site_admin":false},"body":"unconfigure in after to avoid test pollution ?","created_at":"2015-06-23T19:04:14Z","updated_at":"2015-06-23T19:04:14Z","html_url":"https://github.com/zendesk/prop/pull/6#discussion_r33078880","pull_request_url":"https://api.github.com/repos/zendesk/prop/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/zendesk/prop/pulls/comments/33078880"},"html":{"href":"https://github.com/zendesk/prop/pull/6#discussion_r33078880"},"pull_request":{"href":"https://api.github.com/repos/zendesk/prop/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/zendesk/prop/pulls/6","id":38068025,"html_url":"https://github.com/zendesk/prop/pull/6","diff_url":"https://github.com/zendesk/prop/pull/6.diff","patch_url":"https://github.com/zendesk/prop/pull/6.patch","issue_url":"https://api.github.com/repos/zendesk/prop/issues/6","number":6,"state":"open","locked":false,"title":"[WIP] Add leaky bucket for bursty rate limiting","user":{"login":"shanitang","id":9438502,"avatar_url":"https://avatars.githubusercontent.com/u/9438502?v=3","gravatar_id":"","url":"https://api.github.com/users/shanitang","html_url":"https://github.com/shanitang","followers_url":"https://api.github.com/users/shanitang/followers","following_url":"https://api.github.com/users/shanitang/following{/other_user}","gists_url":"https://api.github.com/users/shanitang/gists{/gist_id}","starred_url":"https://api.github.com/users/shanitang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanitang/subscriptions","organizations_url":"https://api.github.com/users/shanitang/orgs","repos_url":"https://api.github.com/users/shanitang/repos","events_url":"https://api.github.com/users/shanitang/events{/privacy}","received_events_url":"https://api.github.com/users/shanitang/received_events","type":"User","site_admin":false},"body":"Add leaky bucket for bursty rate limiting\r\n\r\ncc/ @ggrossman @rtatsumi @waferbaby @tmcinerney ","created_at":"2015-06-19T00:44:05Z","updated_at":"2015-06-23T19:04:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0380fd93eeb7a63830ddd5370c098286a28f5f6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zendesk/prop/pulls/6/commits","review_comments_url":"https://api.github.com/repos/zendesk/prop/pulls/6/comments","review_comment_url":"https://api.github.com/repos/zendesk/prop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendesk/prop/issues/6/comments","statuses_url":"https://api.github.com/repos/zendesk/prop/statuses/d79dbceff38c22f574a08fa76a33645a7a586f6f","head":{"label":"zendesk:ytang/leaky_bucket","ref":"ytang/leaky_bucket","sha":"d79dbceff38c22f574a08fa76a33645a7a586f6f","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":784411,"name":"prop","full_name":"zendesk/prop","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/prop","description":"Puts a cork in their requests","fork":false,"url":"https://api.github.com/repos/zendesk/prop","forks_url":"https://api.github.com/repos/zendesk/prop/forks","keys_url":"https://api.github.com/repos/zendesk/prop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/prop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/prop/teams","hooks_url":"https://api.github.com/repos/zendesk/prop/hooks","issue_events_url":"https://api.github.com/repos/zendesk/prop/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/prop/events","assignees_url":"https://api.github.com/repos/zendesk/prop/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/prop/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/prop/tags","blobs_url":"https://api.github.com/repos/zendesk/prop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/prop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/prop/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/prop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/prop/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/prop/languages","stargazers_url":"https://api.github.com/repos/zendesk/prop/stargazers","contributors_url":"https://api.github.com/repos/zendesk/prop/contributors","subscribers_url":"https://api.github.com/repos/zendesk/prop/subscribers","subscription_url":"https://api.github.com/repos/zendesk/prop/subscription","commits_url":"https://api.github.com/repos/zendesk/prop/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/prop/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/prop/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/prop/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/prop/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/prop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/prop/merges","archive_url":"https://api.github.com/repos/zendesk/prop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/prop/downloads","issues_url":"https://api.github.com/repos/zendesk/prop/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/prop/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/prop/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/prop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/prop/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/prop/releases{/id}","created_at":"2010-07-19T15:50:08Z","updated_at":"2015-06-16T18:56:01Z","pushed_at":"2015-06-23T18:57:27Z","git_url":"git://github.com/zendesk/prop.git","ssh_url":"git@github.com:zendesk/prop.git","clone_url":"https://github.com/zendesk/prop.git","svn_url":"https://github.com/zendesk/prop","homepage":null,"size":342,"stargazers_count":21,"watchers_count":21,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":21,"default_branch":"master"}},"base":{"label":"zendesk:master","ref":"master","sha":"10629328a1f460761eed1bc4b856a5614f7bce36","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":784411,"name":"prop","full_name":"zendesk/prop","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/prop","description":"Puts a cork in their requests","fork":false,"url":"https://api.github.com/repos/zendesk/prop","forks_url":"https://api.github.com/repos/zendesk/prop/forks","keys_url":"https://api.github.com/repos/zendesk/prop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/prop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/prop/teams","hooks_url":"https://api.github.com/repos/zendesk/prop/hooks","issue_events_url":"https://api.github.com/repos/zendesk/prop/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/prop/events","assignees_url":"https://api.github.com/repos/zendesk/prop/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/prop/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/prop/tags","blobs_url":"https://api.github.com/repos/zendesk/prop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/prop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/prop/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/prop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/prop/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/prop/languages","stargazers_url":"https://api.github.com/repos/zendesk/prop/stargazers","contributors_url":"https://api.github.com/repos/zendesk/prop/contributors","subscribers_url":"https://api.github.com/repos/zendesk/prop/subscribers","subscription_url":"https://api.github.com/repos/zendesk/prop/subscription","commits_url":"https://api.github.com/repos/zendesk/prop/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/prop/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/prop/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/prop/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/prop/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/prop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/prop/merges","archive_url":"https://api.github.com/repos/zendesk/prop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/prop/downloads","issues_url":"https://api.github.com/repos/zendesk/prop/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/prop/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/prop/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/prop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/prop/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/prop/releases{/id}","created_at":"2010-07-19T15:50:08Z","updated_at":"2015-06-16T18:56:01Z","pushed_at":"2015-06-23T18:57:27Z","git_url":"git://github.com/zendesk/prop.git","ssh_url":"git@github.com:zendesk/prop.git","clone_url":"https://github.com/zendesk/prop.git","svn_url":"https://github.com/zendesk/prop","homepage":null,"size":342,"stargazers_count":21,"watchers_count":21,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendesk/prop/pulls/6"},"html":{"href":"https://github.com/zendesk/prop/pull/6"},"issue":{"href":"https://api.github.com/repos/zendesk/prop/issues/6"},"comments":{"href":"https://api.github.com/repos/zendesk/prop/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/zendesk/prop/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/zendesk/prop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendesk/prop/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/zendesk/prop/statuses/d79dbceff38c22f574a08fa76a33645a7a586f6f"}}}}