{"action":"created","comment":{"url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/comments/67508812","id":67508812,"diff_hunk":"@@ -49,9 +49,11 @@ test('it resolves with a new cart on ShopClient#create', function (assert) {\n   delete cartAttrs[GUID_KEY];\n \n   localStorage.setItem = function (key, value) {\n-    assert.ok(key.match(/shopify-buy\\.\\d+\\.\\d+/));\n-    assert.deepEqual(JSON.parse(value).cart.line_items, cartAttrs.line_items);\n-    assert.equal(JSON.parse(value).cart.subtotal_price, cartAttrs.subtotal_price);\n+    if (key !== '__storage_test__') {","path":"tests/integration/shop-client-cart-test.js","position":7,"original_position":7,"commit_id":"bca0fe1fa6f8f19c7ecd957ec97f569199c49045","original_commit_id":"bca0fe1fa6f8f19c7ecd957ec97f569199c49045","user":{"login":"minasmart","id":568174,"avatar_url":"https://avatars.githubusercontent.com/u/568174?v=3","gravatar_id":"","url":"https://api.github.com/users/minasmart","html_url":"https://github.com/minasmart","followers_url":"https://api.github.com/users/minasmart/followers","following_url":"https://api.github.com/users/minasmart/following{/other_user}","gists_url":"https://api.github.com/users/minasmart/gists{/gist_id}","starred_url":"https://api.github.com/users/minasmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minasmart/subscriptions","organizations_url":"https://api.github.com/users/minasmart/orgs","repos_url":"https://api.github.com/users/minasmart/repos","events_url":"https://api.github.com/users/minasmart/events{/privacy}","received_events_url":"https://api.github.com/users/minasmart/received_events","type":"User","site_admin":false},"body":"That way, these tests could remain untounched.","created_at":"2016-06-17T13:22:28Z","updated_at":"2016-06-17T13:22:28Z","html_url":"https://github.com/Shopify/js-buy-sdk/pull/143#discussion_r67508812","pull_request_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/143","_links":{"self":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/comments/67508812"},"html":{"href":"https://github.com/Shopify/js-buy-sdk/pull/143#discussion_r67508812"},"pull_request":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/143"}}},"pull_request":{"url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/143","id":74081038,"html_url":"https://github.com/Shopify/js-buy-sdk/pull/143","diff_url":"https://github.com/Shopify/js-buy-sdk/pull/143.diff","patch_url":"https://github.com/Shopify/js-buy-sdk/pull/143.patch","issue_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/143","number":143,"state":"open","locked":false,"title":"store cart in memory if localStorage not available","user":{"login":"tessalt","id":1789029,"avatar_url":"https://avatars.githubusercontent.com/u/1789029?v=3","gravatar_id":"","url":"https://api.github.com/users/tessalt","html_url":"https://github.com/tessalt","followers_url":"https://api.github.com/users/tessalt/followers","following_url":"https://api.github.com/users/tessalt/following{/other_user}","gists_url":"https://api.github.com/users/tessalt/gists{/gist_id}","starred_url":"https://api.github.com/users/tessalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tessalt/subscriptions","organizations_url":"https://api.github.com/users/tessalt/orgs","repos_url":"https://api.github.com/users/tessalt/repos","events_url":"https://api.github.com/users/tessalt/events{/privacy}","received_events_url":"https://api.github.com/users/tessalt/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/Shopify/js-buy-sdk/issues/133\r\n\r\nSafari in private browsing mode throws `QuotaExceededError: Dom exception 22` on `localStorage.setItem` (and returns `null` for `localStorage.getItem`). Carts should still work in private browsing mode, so fall back to storing carts in memory. This is pretty much the quickest/simplest implementation, not sure if it would be better to create a separate \"adapter\" instead and check for localStorage before assigning an adapter to the `carts` type. \r\n\r\n@minasmart @harismahmood89 @richgilbank ","created_at":"2016-06-16T13:32:17Z","updated_at":"2016-06-17T13:22:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1402bf9a3029c600eb115c9e9ff1eaa40fdefe2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/143/commits","review_comments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/143/comments","review_comment_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/143/comments","statuses_url":"https://api.github.com/repos/Shopify/js-buy-sdk/statuses/bca0fe1fa6f8f19c7ecd957ec97f569199c49045","head":{"label":"Shopify:in-memory-cart","ref":"in-memory-cart","sha":"bca0fe1fa6f8f19c7ecd957ec97f569199c49045","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":49018115,"name":"js-buy-sdk","full_name":"Shopify/js-buy-sdk","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/js-buy-sdk","description":"The JS Buy SDK is a lightweight library that allows you to build ecommerce into any website. It is based on Shopify's API and provides the ability to retrieve products and collections from your shop, add products to a cart, and checkout.","fork":false,"url":"https://api.github.com/repos/Shopify/js-buy-sdk","forks_url":"https://api.github.com/repos/Shopify/js-buy-sdk/forks","keys_url":"https://api.github.com/repos/Shopify/js-buy-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/js-buy-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/js-buy-sdk/teams","hooks_url":"https://api.github.com/repos/Shopify/js-buy-sdk/hooks","issue_events_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/js-buy-sdk/events","assignees_url":"https://api.github.com/repos/Shopify/js-buy-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/js-buy-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/js-buy-sdk/tags","blobs_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/js-buy-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/js-buy-sdk/languages","stargazers_url":"https://api.github.com/repos/Shopify/js-buy-sdk/stargazers","contributors_url":"https://api.github.com/repos/Shopify/js-buy-sdk/contributors","subscribers_url":"https://api.github.com/repos/Shopify/js-buy-sdk/subscribers","subscription_url":"https://api.github.com/repos/Shopify/js-buy-sdk/subscription","commits_url":"https://api.github.com/repos/Shopify/js-buy-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/js-buy-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/js-buy-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/js-buy-sdk/merges","archive_url":"https://api.github.com/repos/Shopify/js-buy-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/js-buy-sdk/downloads","issues_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/js-buy-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/js-buy-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/js-buy-sdk/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/js-buy-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/deployments","created_at":"2016-01-04T19:26:34Z","updated_at":"2016-06-16T03:37:49Z","pushed_at":"2016-06-17T13:16:51Z","git_url":"git://github.com/Shopify/js-buy-sdk.git","ssh_url":"git@github.com:Shopify/js-buy-sdk.git","clone_url":"https://github.com/Shopify/js-buy-sdk.git","svn_url":"https://github.com/Shopify/js-buy-sdk","homepage":"https://shopify.github.io/js-buy-sdk","size":1040,"stargazers_count":107,"watchers_count":107,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":23,"forks":11,"open_issues":23,"watchers":107,"default_branch":"master"}},"base":{"label":"Shopify:master","ref":"master","sha":"ca1d2cd6b2cc66dc5a73f4518f1177f3cf8b9a23","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":49018115,"name":"js-buy-sdk","full_name":"Shopify/js-buy-sdk","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/js-buy-sdk","description":"The JS Buy SDK is a lightweight library that allows you to build ecommerce into any website. It is based on Shopify's API and provides the ability to retrieve products and collections from your shop, add products to a cart, and checkout.","fork":false,"url":"https://api.github.com/repos/Shopify/js-buy-sdk","forks_url":"https://api.github.com/repos/Shopify/js-buy-sdk/forks","keys_url":"https://api.github.com/repos/Shopify/js-buy-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/js-buy-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/js-buy-sdk/teams","hooks_url":"https://api.github.com/repos/Shopify/js-buy-sdk/hooks","issue_events_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/js-buy-sdk/events","assignees_url":"https://api.github.com/repos/Shopify/js-buy-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/js-buy-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/js-buy-sdk/tags","blobs_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/js-buy-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/js-buy-sdk/languages","stargazers_url":"https://api.github.com/repos/Shopify/js-buy-sdk/stargazers","contributors_url":"https://api.github.com/repos/Shopify/js-buy-sdk/contributors","subscribers_url":"https://api.github.com/repos/Shopify/js-buy-sdk/subscribers","subscription_url":"https://api.github.com/repos/Shopify/js-buy-sdk/subscription","commits_url":"https://api.github.com/repos/Shopify/js-buy-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/js-buy-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/js-buy-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/js-buy-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/js-buy-sdk/merges","archive_url":"https://api.github.com/repos/Shopify/js-buy-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/js-buy-sdk/downloads","issues_url":"https://api.github.com/repos/Shopify/js-buy-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/js-buy-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/js-buy-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/js-buy-sdk/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/js-buy-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/Shopify/js-buy-sdk/deployments","created_at":"2016-01-04T19:26:34Z","updated_at":"2016-06-16T03:37:49Z","pushed_at":"2016-06-17T13:16:51Z","git_url":"git://github.com/Shopify/js-buy-sdk.git","ssh_url":"git@github.com:Shopify/js-buy-sdk.git","clone_url":"https://github.com/Shopify/js-buy-sdk.git","svn_url":"https://github.com/Shopify/js-buy-sdk","homepage":"https://shopify.github.io/js-buy-sdk","size":1040,"stargazers_count":107,"watchers_count":107,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":23,"forks":11,"open_issues":23,"watchers":107,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/143"},"html":{"href":"https://github.com/Shopify/js-buy-sdk/pull/143"},"issue":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/143"},"comments":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/Shopify/js-buy-sdk/statuses/bca0fe1fa6f8f19c7ecd957ec97f569199c49045"}}}}
{"actor":{"display_login":"minasmart"}}