{"action":"opened","number":3,"pull_request":{"url":"https://api.github.com/repos/brainshave/broccoli-zetzer/pulls/3","id":38609210,"html_url":"https://github.com/brainshave/broccoli-zetzer/pull/3","diff_url":"https://github.com/brainshave/broccoli-zetzer/pull/3.diff","patch_url":"https://github.com/brainshave/broccoli-zetzer/pull/3.patch","issue_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/issues/3","number":3,"state":"open","locked":false,"title":"[FIX] Fixed issue when a template had the same name that a directory","user":{"login":"raiseandfall","id":512327,"avatar_url":"https://avatars.githubusercontent.com/u/512327?v=3","gravatar_id":"","url":"https://api.github.com/users/raiseandfall","html_url":"https://github.com/raiseandfall","followers_url":"https://api.github.com/users/raiseandfall/followers","following_url":"https://api.github.com/users/raiseandfall/following{/other_user}","gists_url":"https://api.github.com/users/raiseandfall/gists{/gist_id}","starred_url":"https://api.github.com/users/raiseandfall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raiseandfall/subscriptions","organizations_url":"https://api.github.com/users/raiseandfall/orgs","repos_url":"https://api.github.com/users/raiseandfall/repos","events_url":"https://api.github.com/users/raiseandfall/events{/privacy}","received_events_url":"https://api.github.com/users/raiseandfall/received_events","type":"User","site_admin":false},"body":"Hey there,\r\n\r\nI improved the ```find_closest_match``` function.\r\nI recently switched from stencil to zetzer on a project, and wasn't allowed to re-write the it.include() calls (after finding out the bug that I'm trying to fix here).\r\n\r\n\r\nI realised that if you have the following in the templates folder : \r\n```\r\ntemplates/component.dot.html\r\ntemplates/component/component.dot.html\r\ntemplates/component-sub.dot.html\r\n```\r\n\r\nAnd if you are including the following in a page : \r\n```\r\n{{= it.include(\"component\") }}\r\n```\r\n\r\nThen zetzer wouldn't be loading ```templates/component.dot.html``` as intended, but was trying to load the directory ```templates/component/```, or ```templates/component-sub.dot.html``` if no folder.\r\n\r\nI updated the find_closest_match function to fix it, and I also added some unit test.","created_at":"2015-06-26T01:06:47Z","updated_at":"2015-06-26T01:06:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/pulls/3/commits","review_comments_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/pulls/3/comments","review_comment_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/issues/3/comments","statuses_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/statuses/712cba245b0fe29093c7d121f3d49ea36a94b646","head":{"label":"raiseandfall:moved-mkdirp-to-devdependencies","ref":"moved-mkdirp-to-devdependencies","sha":"712cba245b0fe29093c7d121f3d49ea36a94b646","user":{"login":"raiseandfall","id":512327,"avatar_url":"https://avatars.githubusercontent.com/u/512327?v=3","gravatar_id":"","url":"https://api.github.com/users/raiseandfall","html_url":"https://github.com/raiseandfall","followers_url":"https://api.github.com/users/raiseandfall/followers","following_url":"https://api.github.com/users/raiseandfall/following{/other_user}","gists_url":"https://api.github.com/users/raiseandfall/gists{/gist_id}","starred_url":"https://api.github.com/users/raiseandfall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raiseandfall/subscriptions","organizations_url":"https://api.github.com/users/raiseandfall/orgs","repos_url":"https://api.github.com/users/raiseandfall/repos","events_url":"https://api.github.com/users/raiseandfall/events{/privacy}","received_events_url":"https://api.github.com/users/raiseandfall/received_events","type":"User","site_admin":false},"repo":{"id":33623513,"name":"broccoli-zetzer","full_name":"raiseandfall/broccoli-zetzer","owner":{"login":"raiseandfall","id":512327,"avatar_url":"https://avatars.githubusercontent.com/u/512327?v=3","gravatar_id":"","url":"https://api.github.com/users/raiseandfall","html_url":"https://github.com/raiseandfall","followers_url":"https://api.github.com/users/raiseandfall/followers","following_url":"https://api.github.com/users/raiseandfall/following{/other_user}","gists_url":"https://api.github.com/users/raiseandfall/gists{/gist_id}","starred_url":"https://api.github.com/users/raiseandfall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raiseandfall/subscriptions","organizations_url":"https://api.github.com/users/raiseandfall/orgs","repos_url":"https://api.github.com/users/raiseandfall/repos","events_url":"https://api.github.com/users/raiseandfall/events{/privacy}","received_events_url":"https://api.github.com/users/raiseandfall/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/raiseandfall/broccoli-zetzer","description":"Broccoli plugin for Zetzer","fork":true,"url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer","forks_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/forks","keys_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/teams","hooks_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/hooks","issue_events_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/issues/events{/number}","events_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/events","assignees_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/assignees{/user}","branches_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/branches{/branch}","tags_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/tags","blobs_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/git/refs{/sha}","trees_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/statuses/{sha}","languages_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/languages","stargazers_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/stargazers","contributors_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/contributors","subscribers_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/subscribers","subscription_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/subscription","commits_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/commits{/sha}","git_commits_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/git/commits{/sha}","comments_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/comments{/number}","issue_comment_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/issues/comments{/number}","contents_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/contents/{+path}","compare_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/merges","archive_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/downloads","issues_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/issues{/number}","pulls_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/pulls{/number}","milestones_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/milestones{/number}","notifications_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/labels{/name}","releases_url":"https://api.github.com/repos/raiseandfall/broccoli-zetzer/releases{/id}","created_at":"2015-04-08T18:06:54Z","updated_at":"2015-04-08T18:06:54Z","pushed_at":"2015-06-26T01:05:10Z","git_url":"git://github.com/raiseandfall/broccoli-zetzer.git","ssh_url":"git@github.com:raiseandfall/broccoli-zetzer.git","clone_url":"https://github.com/raiseandfall/broccoli-zetzer.git","svn_url":"https://github.com/raiseandfall/broccoli-zetzer","homepage":"https://github.com/brainshave/zetzer","size":100,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"brainshave:master","ref":"master","sha":"ada11c5c3f77b50a000f88801c4eaa53dfc096f9","user":{"login":"brainshave","id":1305140,"avatar_url":"https://avatars.githubusercontent.com/u/1305140?v=3","gravatar_id":"","url":"https://api.github.com/users/brainshave","html_url":"https://github.com/brainshave","followers_url":"https://api.github.com/users/brainshave/followers","following_url":"https://api.github.com/users/brainshave/following{/other_user}","gists_url":"https://api.github.com/users/brainshave/gists{/gist_id}","starred_url":"https://api.github.com/users/brainshave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brainshave/subscriptions","organizations_url":"https://api.github.com/users/brainshave/orgs","repos_url":"https://api.github.com/users/brainshave/repos","events_url":"https://api.github.com/users/brainshave/events{/privacy}","received_events_url":"https://api.github.com/users/brainshave/received_events","type":"User","site_admin":false},"repo":{"id":18081920,"name":"broccoli-zetzer","full_name":"brainshave/broccoli-zetzer","owner":{"login":"brainshave","id":1305140,"avatar_url":"https://avatars.githubusercontent.com/u/1305140?v=3","gravatar_id":"","url":"https://api.github.com/users/brainshave","html_url":"https://github.com/brainshave","followers_url":"https://api.github.com/users/brainshave/followers","following_url":"https://api.github.com/users/brainshave/following{/other_user}","gists_url":"https://api.github.com/users/brainshave/gists{/gist_id}","starred_url":"https://api.github.com/users/brainshave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brainshave/subscriptions","organizations_url":"https://api.github.com/users/brainshave/orgs","repos_url":"https://api.github.com/users/brainshave/repos","events_url":"https://api.github.com/users/brainshave/events{/privacy}","received_events_url":"https://api.github.com/users/brainshave/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brainshave/broccoli-zetzer","description":"Broccoli plugin for Zetzer","fork":false,"url":"https://api.github.com/repos/brainshave/broccoli-zetzer","forks_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/forks","keys_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/teams","hooks_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/hooks","issue_events_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/issues/events{/number}","events_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/events","assignees_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/assignees{/user}","branches_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/branches{/branch}","tags_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/tags","blobs_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/git/refs{/sha}","trees_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/statuses/{sha}","languages_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/languages","stargazers_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/stargazers","contributors_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/contributors","subscribers_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/subscribers","subscription_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/subscription","commits_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/commits{/sha}","git_commits_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/git/commits{/sha}","comments_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/comments{/number}","issue_comment_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/issues/comments{/number}","contents_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/contents/{+path}","compare_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/merges","archive_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/downloads","issues_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/issues{/number}","pulls_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/pulls{/number}","milestones_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/milestones{/number}","notifications_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/labels{/name}","releases_url":"https://api.github.com/repos/brainshave/broccoli-zetzer/releases{/id}","created_at":"2014-03-24T23:00:22Z","updated_at":"2015-04-24T16:54:01Z","pushed_at":"2015-06-26T01:06:47Z","git_url":"git://github.com/brainshave/broccoli-zetzer.git","ssh_url":"git@github.com:brainshave/broccoli-zetzer.git","clone_url":"https://github.com/brainshave/broccoli-zetzer.git","svn_url":"https://github.com/brainshave/broccoli-zetzer","homepage":"https://github.com/brainshave/zetzer","size":238,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brainshave/broccoli-zetzer/pulls/3"},"html":{"href":"https://github.com/brainshave/broccoli-zetzer/pull/3"},"issue":{"href":"https://api.github.com/repos/brainshave/broccoli-zetzer/issues/3"},"comments":{"href":"https://api.github.com/repos/brainshave/broccoli-zetzer/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/brainshave/broccoli-zetzer/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/brainshave/broccoli-zetzer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brainshave/broccoli-zetzer/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/brainshave/broccoli-zetzer/statuses/712cba245b0fe29093c7d121f3d49ea36a94b646"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":131,"deletions":9,"changed_files":14}}