GitHub PullRequestEvent at 2014-08-05 20:05:31
Repository: localForage
Actor: tofumatt
Payload: {"action":"closed","number":212,"pull_request":{"url":"https://api.github.com/repos/mozilla/localForage/pulls/212","id":18631986,"html_url":"https://github.com/mozilla/localForage/pull/212","diff_url":"https://github.com/mozilla/localForage/pull/212.diff","patch_url":"https://github.com/mozilla/localForage/pull/212.patch","issue_url":"https://api.github.com/repos/mozilla/localForage/issues/212","number":212,"state":"closed","title":"Call library methods only when ready","user":{"login":"ahbeng","id":1154867,"avatar_url":"https://avatars.githubusercontent.com/u/1154867?v=2","gravatar_id":"e2b3d2d1b5712cbfe8648a4efc30fba7","url":"https://api.github.com/users/ahbeng","html_url":"https://github.com/ahbeng","followers_url":"https://api.github.com/users/ahbeng/followers","following_url":"https://api.github.com/users/ahbeng/following{/other_user}","gists_url":"https://api.github.com/users/ahbeng/gists{/gist_id}","starred_url":"https://api.github.com/users/ahbeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahbeng/subscriptions","organizations_url":"https://api.github.com/users/ahbeng/orgs","repos_url":"https://api.github.com/users/ahbeng/repos","events_url":"https://api.github.com/users/ahbeng/events{/privacy}","received_events_url":"https://api.github.com/users/ahbeng/received_events","type":"User","site_admin":false},"body":"Defers actual library method calls until driver is loaded and ready. This renders the `ready()` calls unnecessary when using with RequireJS.\r\n\r\n```javascript\r\ndefine(['localforage'], function(localforage) {\r\n    // As a callback:\r\n    localforage.ready(function() {\r\n        localforage.setItem('mykey', 'myvalue', console.log);\r\n    });\r\n\r\n    // With a Promise:\r\n    localforage.ready().then(function() {\r\n        localforage.setItem('mykey', 'myvalue', console.log);\r\n    });\r\n});\r\n```\r\n\r\nThe above RequireJS example from the readme could simply be the following in both cases:\r\n\r\n```javascript\r\ndefine(['localforage'], function(localforage) {\r\n    localforage.setItem('mykey', 'myvalue', console.log);\r\n});\r\n```","created_at":"2014-07-20T18:07:39Z","updated_at":"2014-08-05T20:05:31Z","closed_at":"2014-08-05T20:05:31Z","merged_at":null,"merge_commit_sha":"200d4d689ffbc8597b69a92bb2127d6d924e8ad1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/localForage/pulls/212/commits","review_comments_url":"https://api.github.com/repos/mozilla/localForage/pulls/212/comments","review_comment_url":"https://api.github.com/repos/mozilla/localForage/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/localForage/issues/212/comments","statuses_url":"https://api.github.com/repos/mozilla/localForage/statuses/83204926ab32eb27d955a4f7caa996533e1a8cba","head":{"label":"ahbeng:call-when-ready","ref":"call-when-ready","sha":"83204926ab32eb27d955a4f7caa996533e1a8cba","user":{"login":"ahbeng","id":1154867,"avatar_url":"https://avatars.githubusercontent.com/u/1154867?v=2","gravatar_id":"e2b3d2d1b5712cbfe8648a4efc30fba7","url":"https://api.github.com/users/ahbeng","html_url":"https://github.com/ahbeng","followers_url":"https://api.github.com/users/ahbeng/followers","following_url":"https://api.github.com/users/ahbeng/following{/other_user}","gists_url":"https://api.github.com/users/ahbeng/gists{/gist_id}","starred_url":"https://api.github.com/users/ahbeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahbeng/subscriptions","organizations_url":"https://api.github.com/users/ahbeng/orgs","repos_url":"https://api.github.com/users/ahbeng/repos","events_url":"https://api.github.com/users/ahbeng/events{/privacy}","received_events_url":"https://api.github.com/users/ahbeng/received_events","type":"User","site_admin":false},"repo":{"id":21855333,"name":"localForage","full_name":"ahbeng/localForage","owner":{"login":"ahbeng","id":1154867,"avatar_url":"https://avatars.githubusercontent.com/u/1154867?v=2","gravatar_id":"e2b3d2d1b5712cbfe8648a4efc30fba7","url":"https://api.github.com/users/ahbeng","html_url":"https://github.com/ahbeng","followers_url":"https://api.github.com/users/ahbeng/followers","following_url":"https://api.github.com/users/ahbeng/following{/other_user}","gists_url":"https://api.github.com/users/ahbeng/gists{/gist_id}","starred_url":"https://api.github.com/users/ahbeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahbeng/subscriptions","organizations_url":"https://api.github.com/users/ahbeng/orgs","repos_url":"https://api.github.com/users/ahbeng/repos","events_url":"https://api.github.com/users/ahbeng/events{/privacy}","received_events_url":"https://api.github.com/users/ahbeng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ahbeng/localForage","description":"Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.","fork":true,"url":"https://api.github.com/repos/ahbeng/localForage","forks_url":"https://api.github.com/repos/ahbeng/localForage/forks","keys_url":"https://api.github.com/repos/ahbeng/localForage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ahbeng/localForage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ahbeng/localForage/teams","hooks_url":"https://api.github.com/repos/ahbeng/localForage/hooks","issue_events_url":"https://api.github.com/repos/ahbeng/localForage/issues/events{/number}","events_url":"https://api.github.com/repos/ahbeng/localForage/events","assignees_url":"https://api.github.com/repos/ahbeng/localForage/assignees{/user}","branches_url":"https://api.github.com/repos/ahbeng/localForage/branches{/branch}","tags_url":"https://api.github.com/repos/ahbeng/localForage/tags","blobs_url":"https://api.github.com/repos/ahbeng/localForage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ahbeng/localForage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ahbeng/localForage/git/refs{/sha}","trees_url":"https://api.github.com/repos/ahbeng/localForage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ahbeng/localForage/statuses/{sha}","languages_url":"https://api.github.com/repos/ahbeng/localForage/languages","stargazers_url":"https://api.github.com/repos/ahbeng/localForage/stargazers","contributors_url":"https://api.github.com/repos/ahbeng/localForage/contributors","subscribers_url":"https://api.github.com/repos/ahbeng/localForage/subscribers","subscription_url":"https://api.github.com/repos/ahbeng/localForage/subscription","commits_url":"https://api.github.com/repos/ahbeng/localForage/commits{/sha}","git_commits_url":"https://api.github.com/repos/ahbeng/localForage/git/commits{/sha}","comments_url":"https://api.github.com/repos/ahbeng/localForage/comments{/number}","issue_comment_url":"https://api.github.com/repos/ahbeng/localForage/issues/comments/{number}","contents_url":"https://api.github.com/repos/ahbeng/localForage/contents/{+path}","compare_url":"https://api.github.com/repos/ahbeng/localForage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ahbeng/localForage/merges","archive_url":"https://api.github.com/repos/ahbeng/localForage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ahbeng/localForage/downloads","issues_url":"https://api.github.com/repos/ahbeng/localForage/issues{/number}","pulls_url":"https://api.github.com/repos/ahbeng/localForage/pulls{/number}","milestones_url":"https://api.github.com/repos/ahbeng/localForage/milestones{/number}","notifications_url":"https://api.github.com/repos/ahbeng/localForage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ahbeng/localForage/labels{/name}","releases_url":"https://api.github.com/repos/ahbeng/localForage/releases{/id}","created_at":"2014-07-15T10:17:44Z","updated_at":"2014-07-15T10:18:17Z","pushed_at":"2014-08-02T20:10:10Z","git_url":"git://github.com/ahbeng/localForage.git","ssh_url":"git@github.com:ahbeng/localForage.git","clone_url":"https://github.com/ahbeng/localForage.git","svn_url":"https://github.com/ahbeng/localForage","homepage":"http://mozilla.github.io/localForage","size":1980,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"9cc740d5f9462ed92cdb926aeb96d46e611804a4","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=2","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":14003349,"name":"localForage","full_name":"mozilla/localForage","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=2","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/localForage","description":"Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.","fork":false,"url":"https://api.github.com/repos/mozilla/localForage","forks_url":"https://api.github.com/repos/mozilla/localForage/forks","keys_url":"https://api.github.com/repos/mozilla/localForage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/localForage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/localForage/teams","hooks_url":"https://api.github.com/repos/mozilla/localForage/hooks","issue_events_url":"https://api.github.com/repos/mozilla/localForage/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/localForage/events","assignees_url":"https://api.github.com/repos/mozilla/localForage/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/localForage/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/localForage/tags","blobs_url":"https://api.github.com/repos/mozilla/localForage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/localForage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/localForage/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/localForage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/localForage/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/localForage/languages","stargazers_url":"https://api.github.com/repos/mozilla/localForage/stargazers","contributors_url":"https://api.github.com/repos/mozilla/localForage/contributors","subscribers_url":"https://api.github.com/repos/mozilla/localForage/subscribers","subscription_url":"https://api.github.com/repos/mozilla/localForage/subscription","commits_url":"https://api.github.com/repos/mozilla/localForage/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/localForage/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/localForage/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/localForage/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/localForage/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/localForage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/localForage/merges","archive_url":"https://api.github.com/repos/mozilla/localForage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/localForage/downloads","issues_url":"https://api.github.com/repos/mozilla/localForage/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/localForage/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/localForage/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/localForage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/localForage/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/localForage/releases{/id}","created_at":"2013-10-31T00:10:06Z","updated_at":"2014-08-05T08:20:56Z","pushed_at":"2014-08-05T19:58:03Z","git_url":"git://github.com/mozilla/localForage.git","ssh_url":"git@github.com:mozilla/localForage.git","clone_url":"https://github.com/mozilla/localForage.git","svn_url":"https://github.com/mozilla/localForage","homepage":"http://mozilla.github.io/localForage","size":6899,"stargazers_count":3302,"watchers_count":3302,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":182,"mirror_url":null,"open_issues_count":48,"forks":182,"open_issues":48,"watchers":3302,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/localForage/pulls/212"},"html":{"href":"https://github.com/mozilla/localForage/pull/212"},"issue":{"href":"https://api.github.com/repos/mozilla/localForage/issues/212"},"comments":{"href":"https://api.github.com/repos/mozilla/localForage/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/localForage/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/localForage/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/localForage/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/localForage/statuses/83204926ab32eb27d955a4f7caa996533e1a8cba"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":6,"review_comments":7,"commits":3,"additions":101,"deletions":4,"changed_files":5}}