{"action":"created","comment":{"url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/comments/36199041","id":36199041,"diff_hunk":"@@ -1,36 +1,31 @@\n /*eslint-env mocha */\n 'use strict';\n \n-var handlebarsLayouts = require('../index'),\n-\texpect = require('expect');\n+var expect = require('expect');\n \n describe('handlebars-layouts spec', function () {\n-\tvar count, hbs;\n+\tvar count, handlebars, handlebarsLayouts;\n \n \tbeforeEach(function () {\n \t\tcount = 0;\n \n-\t\thbs = {\n-\t\t\tpartials: {\n-\t\t\t\tfoo: function (data) {\n-\t\t\t\t\tcount++;\n-\n-\t\t\t\t\treturn data && data.foo || '';\n-\t\t\t\t}\n-\t\t\t},\n-\t\t\tregisterHelper: function (helpers) {\n-\t\t\t\tcount++;\n-\n-\t\t\t\texpect(helpers.extend).toBeA(Function);\n-\t\t\t\texpect(helpers.embed).toBeA(Function);\n-\t\t\t\texpect(helpers.block).toBeA(Function);\n-\t\t\t\texpect(helpers.content).toBeA(Function);\n-\t\t\t}\n-\t\t};\n+\t\t// Delete\n+\t\tdelete require.cache[require.resolve('handlebars')];\n+\t\tdelete require.cache[require.resolve('../index')];\n+\n+\t\t// Reload\n+\t\thandlebars = require('handlebars');\n+\t\thandlebarsLayouts = require('../index');","path":"test/handlebars-layouts.spec.js","position":38,"original_position":38,"commit_id":"6091f1f4eb007f48938e2f3fe6f520eea12a6df6","original_commit_id":"6091f1f4eb007f48938e2f3fe6f520eea12a6df6","user":{"login":"Florian-R","id":1374176,"avatar_url":"https://avatars.githubusercontent.com/u/1374176?v=3","gravatar_id":"","url":"https://api.github.com/users/Florian-R","html_url":"https://github.com/Florian-R","followers_url":"https://api.github.com/users/Florian-R/followers","following_url":"https://api.github.com/users/Florian-R/following{/other_user}","gists_url":"https://api.github.com/users/Florian-R/gists{/gist_id}","starred_url":"https://api.github.com/users/Florian-R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Florian-R/subscriptions","organizations_url":"https://api.github.com/users/Florian-R/orgs","repos_url":"https://api.github.com/users/Florian-R/repos","events_url":"https://api.github.com/users/Florian-R/events{/privacy}","received_events_url":"https://api.github.com/users/Florian-R/received_events","type":"User","site_admin":false},"body":"This is more or less a copy pasta for the e2e.js test file, don't know if we must / can dedupe this.","created_at":"2015-08-04T15:07:06Z","updated_at":"2015-08-04T15:07:06Z","html_url":"https://github.com/shannonmoeller/handlebars-layouts/pull/25#discussion_r36199041","pull_request_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/comments/36199041"},"html":{"href":"https://github.com/shannonmoeller/handlebars-layouts/pull/25#discussion_r36199041"},"pull_request":{"href":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/25","id":41354647,"html_url":"https://github.com/shannonmoeller/handlebars-layouts/pull/25","diff_url":"https://github.com/shannonmoeller/handlebars-layouts/pull/25.diff","patch_url":"https://github.com/shannonmoeller/handlebars-layouts/pull/25.patch","issue_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/issues/25","number":25,"state":"open","locked":false,"title":"Preserve the context in child partial","user":{"login":"Florian-R","id":1374176,"avatar_url":"https://avatars.githubusercontent.com/u/1374176?v=3","gravatar_id":"","url":"https://api.github.com/users/Florian-R","html_url":"https://github.com/Florian-R","followers_url":"https://api.github.com/users/Florian-R/followers","following_url":"https://api.github.com/users/Florian-R/following{/other_user}","gists_url":"https://api.github.com/users/Florian-R/gists{/gist_id}","starred_url":"https://api.github.com/users/Florian-R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Florian-R/subscriptions","organizations_url":"https://api.github.com/users/Florian-R/orgs","repos_url":"https://api.github.com/users/Florian-R/repos","events_url":"https://api.github.com/users/Florian-R/events{/privacy}","received_events_url":"https://api.github.com/users/Florian-R/received_events","type":"User","site_admin":false},"body":"When a partial extend a partial which itself contains a partial with hardcoded variables\r\n\r\n```\r\n{{> input label=\"foo\"}}\r\n```\r\n\r\nit's context is clobbered, due to the usage of Object.create. See this [bin](http://jsbin.com/hotowoxojo/1/edit?html,js,output), it shall demonstrate the problem.\r\n\r\nI've added lodash.deepClone, just for demonstration purpose,  but it add a lot of noise. Let me now which implementation of deepCloning you're the most happy with and i'll amend the PR.\r\n\r\nI'm not quite happy with the way i've structured and named the test file. Let me know if there's a better way to do it.","created_at":"2015-07-31T16:05:40Z","updated_at":"2015-08-04T15:07:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2b0bfbee29c7dd66f5cdc917b6036c6dbba66d2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/25/commits","review_comments_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/25/comments","review_comment_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/issues/25/comments","statuses_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/statuses/6091f1f4eb007f48938e2f3fe6f520eea12a6df6","head":{"label":"Florian-R:partial-context","ref":"partial-context","sha":"6091f1f4eb007f48938e2f3fe6f520eea12a6df6","user":{"login":"Florian-R","id":1374176,"avatar_url":"https://avatars.githubusercontent.com/u/1374176?v=3","gravatar_id":"","url":"https://api.github.com/users/Florian-R","html_url":"https://github.com/Florian-R","followers_url":"https://api.github.com/users/Florian-R/followers","following_url":"https://api.github.com/users/Florian-R/following{/other_user}","gists_url":"https://api.github.com/users/Florian-R/gists{/gist_id}","starred_url":"https://api.github.com/users/Florian-R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Florian-R/subscriptions","organizations_url":"https://api.github.com/users/Florian-R/orgs","repos_url":"https://api.github.com/users/Florian-R/repos","events_url":"https://api.github.com/users/Florian-R/events{/privacy}","received_events_url":"https://api.github.com/users/Florian-R/received_events","type":"User","site_admin":false},"repo":{"id":40008091,"name":"handlebars-layouts","full_name":"Florian-R/handlebars-layouts","owner":{"login":"Florian-R","id":1374176,"avatar_url":"https://avatars.githubusercontent.com/u/1374176?v=3","gravatar_id":"","url":"https://api.github.com/users/Florian-R","html_url":"https://github.com/Florian-R","followers_url":"https://api.github.com/users/Florian-R/followers","following_url":"https://api.github.com/users/Florian-R/following{/other_user}","gists_url":"https://api.github.com/users/Florian-R/gists{/gist_id}","starred_url":"https://api.github.com/users/Florian-R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Florian-R/subscriptions","organizations_url":"https://api.github.com/users/Florian-R/orgs","repos_url":"https://api.github.com/users/Florian-R/repos","events_url":"https://api.github.com/users/Florian-R/events{/privacy}","received_events_url":"https://api.github.com/users/Florian-R/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Florian-R/handlebars-layouts","description":"Handlebars helpers which implement layout blocks similar to Jade, Jinja, Swig, and Twig.","fork":true,"url":"https://api.github.com/repos/Florian-R/handlebars-layouts","forks_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/forks","keys_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/teams","hooks_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/hooks","issue_events_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/issues/events{/number}","events_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/events","assignees_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/assignees{/user}","branches_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/branches{/branch}","tags_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/tags","blobs_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/git/refs{/sha}","trees_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/statuses/{sha}","languages_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/languages","stargazers_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/stargazers","contributors_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/contributors","subscribers_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/subscribers","subscription_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/subscription","commits_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/commits{/sha}","git_commits_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/git/commits{/sha}","comments_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/comments{/number}","issue_comment_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/issues/comments{/number}","contents_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/contents/{+path}","compare_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/merges","archive_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/downloads","issues_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/issues{/number}","pulls_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/pulls{/number}","milestones_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/milestones{/number}","notifications_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/labels{/name}","releases_url":"https://api.github.com/repos/Florian-R/handlebars-layouts/releases{/id}","created_at":"2015-07-31T14:04:58Z","updated_at":"2015-07-31T14:04:58Z","pushed_at":"2015-08-04T15:05:09Z","git_url":"git://github.com/Florian-R/handlebars-layouts.git","ssh_url":"git@github.com:Florian-R/handlebars-layouts.git","clone_url":"https://github.com/Florian-R/handlebars-layouts.git","svn_url":"https://github.com/Florian-R/handlebars-layouts","homepage":"","size":369,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"shannonmoeller:master","ref":"master","sha":"0e6fe9eccd96f0d45c533ddb86dc54d54d9763d7","user":{"login":"shannonmoeller","id":155164,"avatar_url":"https://avatars.githubusercontent.com/u/155164?v=3","gravatar_id":"","url":"https://api.github.com/users/shannonmoeller","html_url":"https://github.com/shannonmoeller","followers_url":"https://api.github.com/users/shannonmoeller/followers","following_url":"https://api.github.com/users/shannonmoeller/following{/other_user}","gists_url":"https://api.github.com/users/shannonmoeller/gists{/gist_id}","starred_url":"https://api.github.com/users/shannonmoeller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shannonmoeller/subscriptions","organizations_url":"https://api.github.com/users/shannonmoeller/orgs","repos_url":"https://api.github.com/users/shannonmoeller/repos","events_url":"https://api.github.com/users/shannonmoeller/events{/privacy}","received_events_url":"https://api.github.com/users/shannonmoeller/received_events","type":"User","site_admin":false},"repo":{"id":11223921,"name":"handlebars-layouts","full_name":"shannonmoeller/handlebars-layouts","owner":{"login":"shannonmoeller","id":155164,"avatar_url":"https://avatars.githubusercontent.com/u/155164?v=3","gravatar_id":"","url":"https://api.github.com/users/shannonmoeller","html_url":"https://github.com/shannonmoeller","followers_url":"https://api.github.com/users/shannonmoeller/followers","following_url":"https://api.github.com/users/shannonmoeller/following{/other_user}","gists_url":"https://api.github.com/users/shannonmoeller/gists{/gist_id}","starred_url":"https://api.github.com/users/shannonmoeller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shannonmoeller/subscriptions","organizations_url":"https://api.github.com/users/shannonmoeller/orgs","repos_url":"https://api.github.com/users/shannonmoeller/repos","events_url":"https://api.github.com/users/shannonmoeller/events{/privacy}","received_events_url":"https://api.github.com/users/shannonmoeller/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shannonmoeller/handlebars-layouts","description":"Handlebars helpers which implement layout blocks similar to Jade, Jinja, Swig, and Twig.","fork":false,"url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts","forks_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/forks","keys_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/teams","hooks_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/hooks","issue_events_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/issues/events{/number}","events_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/events","assignees_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/assignees{/user}","branches_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/branches{/branch}","tags_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/tags","blobs_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/git/refs{/sha}","trees_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/statuses/{sha}","languages_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/languages","stargazers_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/stargazers","contributors_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/contributors","subscribers_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/subscribers","subscription_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/subscription","commits_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/commits{/sha}","git_commits_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/git/commits{/sha}","comments_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/comments{/number}","issue_comment_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/issues/comments{/number}","contents_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/contents/{+path}","compare_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/merges","archive_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/downloads","issues_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/issues{/number}","pulls_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls{/number}","milestones_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/milestones{/number}","notifications_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/labels{/name}","releases_url":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/releases{/id}","created_at":"2013-07-06T20:21:59Z","updated_at":"2015-08-02T18:25:17Z","pushed_at":"2015-08-04T15:05:09Z","git_url":"git://github.com/shannonmoeller/handlebars-layouts.git","ssh_url":"git@github.com:shannonmoeller/handlebars-layouts.git","clone_url":"https://github.com/shannonmoeller/handlebars-layouts.git","svn_url":"https://github.com/shannonmoeller/handlebars-layouts","homepage":"","size":831,"stargazers_count":100,"watchers_count":100,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":2,"forks":13,"open_issues":2,"watchers":100,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/25"},"html":{"href":"https://github.com/shannonmoeller/handlebars-layouts/pull/25"},"issue":{"href":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/issues/25"},"comments":{"href":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/shannonmoeller/handlebars-layouts/statuses/6091f1f4eb007f48938e2f3fe6f520eea12a6df6"}}}}