{"action":"closed","number":104,"pull_request":{"url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/pulls/104","id":45208558,"html_url":"https://github.com/bigcommerce/bigcommerce-api-ruby/pull/104","diff_url":"https://github.com/bigcommerce/bigcommerce-api-ruby/pull/104.diff","patch_url":"https://github.com/bigcommerce/bigcommerce-api-ruby/pull/104.patch","issue_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/issues/104","number":104,"state":"closed","locked":false,"title":"make bigcommerce threadsafe","user":{"login":"hasclass","id":26909,"avatar_url":"https://avatars.githubusercontent.com/u/26909?v=3","gravatar_id":"","url":"https://api.github.com/users/hasclass","html_url":"https://github.com/hasclass","followers_url":"https://api.github.com/users/hasclass/followers","following_url":"https://api.github.com/users/hasclass/following{/other_user}","gists_url":"https://api.github.com/users/hasclass/gists{/gist_id}","starred_url":"https://api.github.com/users/hasclass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasclass/subscriptions","organizations_url":"https://api.github.com/users/hasclass/orgs","repos_url":"https://api.github.com/users/hasclass/repos","events_url":"https://api.github.com/users/hasclass/events{/privacy}","received_events_url":"https://api.github.com/users/hasclass/received_events","type":"User","site_admin":false},"body":"I made a quick prototype on how to add threadsafety (Issue #98) without too much refactoring (which I think is crucial) \r\n\r\nImplementation is using `Thread.current`. I haven't tested it in real-life, as my bigcommerce dev account isn't active yet. \r\n\r\nIntegration into rails would be like follows:\r\n\r\n```ruby\r\naround_filter :configure_bigcommerce\r\n\r\nprotected\r\n\r\ndef configure_bigcommerce\r\n  config = {store_hash: session[:store_hash], client_id: \"..\", access_token: \"..\"}\r\n  Bigcommerce.configure_threadsafe(config) do\r\n    yield\r\n  end\r\nend\r\n```\r\n\r\nif this approach is ok for you i would finish this and add tests.","created_at":"2015-09-16T18:41:38Z","updated_at":"2016-06-22T00:08:13Z","closed_at":"2016-06-22T00:08:13Z","merged_at":null,"merge_commit_sha":"72e1e9d715af8e468012056da314eb32c95c71fe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/pulls/104/commits","review_comments_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/pulls/104/comments","review_comment_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/issues/104/comments","statuses_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/statuses/126bc0a3cb78f588ef93add1bca8dc90068fad5e","head":{"label":"hasclass:master","ref":"master","sha":"126bc0a3cb78f588ef93add1bca8dc90068fad5e","user":{"login":"hasclass","id":26909,"avatar_url":"https://avatars.githubusercontent.com/u/26909?v=3","gravatar_id":"","url":"https://api.github.com/users/hasclass","html_url":"https://github.com/hasclass","followers_url":"https://api.github.com/users/hasclass/followers","following_url":"https://api.github.com/users/hasclass/following{/other_user}","gists_url":"https://api.github.com/users/hasclass/gists{/gist_id}","starred_url":"https://api.github.com/users/hasclass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasclass/subscriptions","organizations_url":"https://api.github.com/users/hasclass/orgs","repos_url":"https://api.github.com/users/hasclass/repos","events_url":"https://api.github.com/users/hasclass/events{/privacy}","received_events_url":"https://api.github.com/users/hasclass/received_events","type":"User","site_admin":false},"repo":{"id":42605946,"name":"bigcommerce-api-ruby","full_name":"hasclass/bigcommerce-api-ruby","owner":{"login":"hasclass","id":26909,"avatar_url":"https://avatars.githubusercontent.com/u/26909?v=3","gravatar_id":"","url":"https://api.github.com/users/hasclass","html_url":"https://github.com/hasclass","followers_url":"https://api.github.com/users/hasclass/followers","following_url":"https://api.github.com/users/hasclass/following{/other_user}","gists_url":"https://api.github.com/users/hasclass/gists{/gist_id}","starred_url":"https://api.github.com/users/hasclass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasclass/subscriptions","organizations_url":"https://api.github.com/users/hasclass/orgs","repos_url":"https://api.github.com/users/hasclass/repos","events_url":"https://api.github.com/users/hasclass/events{/privacy}","received_events_url":"https://api.github.com/users/hasclass/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hasclass/bigcommerce-api-ruby","description":"Connect Ruby applications with the Bigcommerce Platform","fork":true,"url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby","forks_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/forks","keys_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/teams","hooks_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/hooks","issue_events_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/events","assignees_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/tags","blobs_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/languages","stargazers_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/stargazers","contributors_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/contributors","subscribers_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/subscribers","subscription_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/subscription","commits_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/merges","archive_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/downloads","issues_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/labels{/name}","releases_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/hasclass/bigcommerce-api-ruby/deployments","created_at":"2015-09-16T18:31:53Z","updated_at":"2015-09-16T18:31:54Z","pushed_at":"2015-09-17T02:03:23Z","git_url":"git://github.com/hasclass/bigcommerce-api-ruby.git","ssh_url":"git@github.com:hasclass/bigcommerce-api-ruby.git","clone_url":"https://github.com/hasclass/bigcommerce-api-ruby.git","svn_url":"https://github.com/hasclass/bigcommerce-api-ruby","homepage":"https://developer.bigcommerce.com","size":304,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bigcommerce:master","ref":"master","sha":"837e14e13b3ae620570c58883a8d7570b5fa2a08","user":{"login":"bigcommerce","id":186342,"avatar_url":"https://avatars.githubusercontent.com/u/186342?v=3","gravatar_id":"","url":"https://api.github.com/users/bigcommerce","html_url":"https://github.com/bigcommerce","followers_url":"https://api.github.com/users/bigcommerce/followers","following_url":"https://api.github.com/users/bigcommerce/following{/other_user}","gists_url":"https://api.github.com/users/bigcommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/bigcommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigcommerce/subscriptions","organizations_url":"https://api.github.com/users/bigcommerce/orgs","repos_url":"https://api.github.com/users/bigcommerce/repos","events_url":"https://api.github.com/users/bigcommerce/events{/privacy}","received_events_url":"https://api.github.com/users/bigcommerce/received_events","type":"Organization","site_admin":false},"repo":{"id":2368617,"name":"bigcommerce-api-ruby","full_name":"bigcommerce/bigcommerce-api-ruby","owner":{"login":"bigcommerce","id":186342,"avatar_url":"https://avatars.githubusercontent.com/u/186342?v=3","gravatar_id":"","url":"https://api.github.com/users/bigcommerce","html_url":"https://github.com/bigcommerce","followers_url":"https://api.github.com/users/bigcommerce/followers","following_url":"https://api.github.com/users/bigcommerce/following{/other_user}","gists_url":"https://api.github.com/users/bigcommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/bigcommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigcommerce/subscriptions","organizations_url":"https://api.github.com/users/bigcommerce/orgs","repos_url":"https://api.github.com/users/bigcommerce/repos","events_url":"https://api.github.com/users/bigcommerce/events{/privacy}","received_events_url":"https://api.github.com/users/bigcommerce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bigcommerce/bigcommerce-api-ruby","description":"Connect Ruby applications with the Bigcommerce Platform","fork":false,"url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby","forks_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/forks","keys_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/teams","hooks_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/hooks","issue_events_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/events","assignees_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/tags","blobs_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/languages","stargazers_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/stargazers","contributors_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/contributors","subscribers_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/subscribers","subscription_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/subscription","commits_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/merges","archive_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/downloads","issues_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/labels{/name}","releases_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/deployments","created_at":"2011-09-12T01:48:42Z","updated_at":"2016-05-26T13:39:02Z","pushed_at":"2016-06-21T22:56:40Z","git_url":"git://github.com/bigcommerce/bigcommerce-api-ruby.git","ssh_url":"git@github.com:bigcommerce/bigcommerce-api-ruby.git","clone_url":"https://github.com/bigcommerce/bigcommerce-api-ruby.git","svn_url":"https://github.com/bigcommerce/bigcommerce-api-ruby","homepage":"https://developer.bigcommerce.com","size":315,"stargazers_count":55,"watchers_count":55,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":4,"forks":75,"open_issues":4,"watchers":55,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/pulls/104"},"html":{"href":"https://github.com/bigcommerce/bigcommerce-api-ruby/pull/104"},"issue":{"href":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/issues/104"},"comments":{"href":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/issues/104/comments"},"review_comments":{"href":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/pulls/104/comments"},"review_comment":{"href":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/pulls/104/commits"},"statuses":{"href":"https://api.github.com/repos/bigcommerce/bigcommerce-api-ruby/statuses/126bc0a3cb78f588ef93add1bca8dc90068fad5e"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":6,"review_comments":0,"commits":2,"additions":64,"deletions":6,"changed_files":1}}
{"actor":{"display_login":"pedelman"}}