{"action":"created","comment":{"url":"https://api.github.com/repos/hapijs/vision/pulls/comments/43334788","id":43334788,"diff_hunk":"@@ -634,3 +634,53 @@ describe('views()', function () {\n         done();\n     });\n });\n+\n+describe('Plugin', function () {\n+\n+    it('can be registered before connections', function (done) {\n+\n+        var plugin = function (server, options, next) {\n+\n+            server.dependency('vision');\n+            server.connection();\n+            next();\n+        };\n+\n+        plugin.attributes = {\n+            connections: false,\n+            name: 'test'\n+        };\n+\n+        var server = new Hapi.Server();\n+        server.register([Vision, plugin], Hoek.ignore);\n+\n+        expect(server.views).to.be.a.function();\n+        server.initialize(function (err) {\n+\n+            if (err) {\n+                return done(err);\n+            }\n+\n+            server.stop(done);\n+        });\n+    });\n+\n+    it('only registers once', function (done) {","path":"test/index.js","position":35,"original_position":35,"commit_id":"26e1960abe2552346db46af9247022cb203b944e","original_commit_id":"26e1960abe2552346db46af9247022cb203b944e","user":{"login":"jagoda","id":655686,"avatar_url":"https://avatars.githubusercontent.com/u/655686?v=3","gravatar_id":"","url":"https://api.github.com/users/jagoda","html_url":"https://github.com/jagoda","followers_url":"https://api.github.com/users/jagoda/followers","following_url":"https://api.github.com/users/jagoda/following{/other_user}","gists_url":"https://api.github.com/users/jagoda/gists{/gist_id}","starred_url":"https://api.github.com/users/jagoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagoda/subscriptions","organizations_url":"https://api.github.com/users/jagoda/orgs","repos_url":"https://api.github.com/users/jagoda/repos","events_url":"https://api.github.com/users/jagoda/events{/privacy}","received_events_url":"https://api.github.com/users/jagoda/received_events","type":"User","site_admin":false},"body":"It seemed unnecessary to me since when the plugin registration fails it passes an error to `done()` which in turn causes the test to fail. I'm fine adding an explicit `expect` though if this isn't explicit enough.","created_at":"2015-10-28T23:58:12Z","updated_at":"2015-10-28T23:58:12Z","html_url":"https://github.com/hapijs/vision/pull/65#discussion_r43334788","pull_request_url":"https://api.github.com/repos/hapijs/vision/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/hapijs/vision/pulls/comments/43334788"},"html":{"href":"https://github.com/hapijs/vision/pull/65#discussion_r43334788"},"pull_request":{"href":"https://api.github.com/repos/hapijs/vision/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/hapijs/vision/pulls/65","id":49083074,"html_url":"https://github.com/hapijs/vision/pull/65","diff_url":"https://github.com/hapijs/vision/pull/65.diff","patch_url":"https://github.com/hapijs/vision/pull/65.patch","issue_url":"https://api.github.com/repos/hapijs/vision/issues/65","number":65,"state":"open","locked":false,"title":"Update plugin attributes.","user":{"login":"jagoda","id":655686,"avatar_url":"https://avatars.githubusercontent.com/u/655686?v=3","gravatar_id":"","url":"https://api.github.com/users/jagoda","html_url":"https://github.com/jagoda","followers_url":"https://api.github.com/users/jagoda/followers","following_url":"https://api.github.com/users/jagoda/following{/other_user}","gists_url":"https://api.github.com/users/jagoda/gists{/gist_id}","starred_url":"https://api.github.com/users/jagoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagoda/subscriptions","organizations_url":"https://api.github.com/users/jagoda/orgs","repos_url":"https://api.github.com/users/jagoda/repos","events_url":"https://api.github.com/users/jagoda/events{/privacy}","received_events_url":"https://api.github.com/users/jagoda/received_events","type":"User","site_admin":false},"body":"In some use cases it may make sense to load vision before any\r\nconnections have been configured. Similarly, multiple plugins in an\r\napplication may try to load vision. Since vision only deals with\r\ntemplate rendering, it is possible to do both of these if the\r\n'connections' and 'once' attributes are provided in the plugin\r\nattributes.\r\n\r\nResolves #63.","created_at":"2015-10-28T23:51:46Z","updated_at":"2015-10-28T23:58:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b946049c29a521e531c8d24fd324e36618d7e5b0","assignee":null,"milestone":{"url":"https://api.github.com/repos/hapijs/vision/milestones/10","html_url":"https://github.com/hapijs/vision/milestones/3.1.0","labels_url":"https://api.github.com/repos/hapijs/vision/milestones/10/labels","id":1382474,"number":10,"title":"3.1.0","description":"","creator":{"login":"jagoda","id":655686,"avatar_url":"https://avatars.githubusercontent.com/u/655686?v=3","gravatar_id":"","url":"https://api.github.com/users/jagoda","html_url":"https://github.com/jagoda","followers_url":"https://api.github.com/users/jagoda/followers","following_url":"https://api.github.com/users/jagoda/following{/other_user}","gists_url":"https://api.github.com/users/jagoda/gists{/gist_id}","starred_url":"https://api.github.com/users/jagoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagoda/subscriptions","organizations_url":"https://api.github.com/users/jagoda/orgs","repos_url":"https://api.github.com/users/jagoda/repos","events_url":"https://api.github.com/users/jagoda/events{/privacy}","received_events_url":"https://api.github.com/users/jagoda/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-10-28T23:49:19Z","updated_at":"2015-10-28T23:51:46Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/hapijs/vision/pulls/65/commits","review_comments_url":"https://api.github.com/repos/hapijs/vision/pulls/65/comments","review_comment_url":"https://api.github.com/repos/hapijs/vision/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hapijs/vision/issues/65/comments","statuses_url":"https://api.github.com/repos/hapijs/vision/statuses/26e1960abe2552346db46af9247022cb203b944e","head":{"label":"jagoda:feat-attributes","ref":"feat-attributes","sha":"26e1960abe2552346db46af9247022cb203b944e","user":{"login":"jagoda","id":655686,"avatar_url":"https://avatars.githubusercontent.com/u/655686?v=3","gravatar_id":"","url":"https://api.github.com/users/jagoda","html_url":"https://github.com/jagoda","followers_url":"https://api.github.com/users/jagoda/followers","following_url":"https://api.github.com/users/jagoda/following{/other_user}","gists_url":"https://api.github.com/users/jagoda/gists{/gist_id}","starred_url":"https://api.github.com/users/jagoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagoda/subscriptions","organizations_url":"https://api.github.com/users/jagoda/orgs","repos_url":"https://api.github.com/users/jagoda/repos","events_url":"https://api.github.com/users/jagoda/events{/privacy}","received_events_url":"https://api.github.com/users/jagoda/received_events","type":"User","site_admin":false},"repo":{"id":25947298,"name":"vision","full_name":"jagoda/vision","owner":{"login":"jagoda","id":655686,"avatar_url":"https://avatars.githubusercontent.com/u/655686?v=3","gravatar_id":"","url":"https://api.github.com/users/jagoda","html_url":"https://github.com/jagoda","followers_url":"https://api.github.com/users/jagoda/followers","following_url":"https://api.github.com/users/jagoda/following{/other_user}","gists_url":"https://api.github.com/users/jagoda/gists{/gist_id}","starred_url":"https://api.github.com/users/jagoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagoda/subscriptions","organizations_url":"https://api.github.com/users/jagoda/orgs","repos_url":"https://api.github.com/users/jagoda/repos","events_url":"https://api.github.com/users/jagoda/events{/privacy}","received_events_url":"https://api.github.com/users/jagoda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jagoda/vision","description":"Templates rendering support for hapi.js","fork":true,"url":"https://api.github.com/repos/jagoda/vision","forks_url":"https://api.github.com/repos/jagoda/vision/forks","keys_url":"https://api.github.com/repos/jagoda/vision/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jagoda/vision/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jagoda/vision/teams","hooks_url":"https://api.github.com/repos/jagoda/vision/hooks","issue_events_url":"https://api.github.com/repos/jagoda/vision/issues/events{/number}","events_url":"https://api.github.com/repos/jagoda/vision/events","assignees_url":"https://api.github.com/repos/jagoda/vision/assignees{/user}","branches_url":"https://api.github.com/repos/jagoda/vision/branches{/branch}","tags_url":"https://api.github.com/repos/jagoda/vision/tags","blobs_url":"https://api.github.com/repos/jagoda/vision/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jagoda/vision/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jagoda/vision/git/refs{/sha}","trees_url":"https://api.github.com/repos/jagoda/vision/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jagoda/vision/statuses/{sha}","languages_url":"https://api.github.com/repos/jagoda/vision/languages","stargazers_url":"https://api.github.com/repos/jagoda/vision/stargazers","contributors_url":"https://api.github.com/repos/jagoda/vision/contributors","subscribers_url":"https://api.github.com/repos/jagoda/vision/subscribers","subscription_url":"https://api.github.com/repos/jagoda/vision/subscription","commits_url":"https://api.github.com/repos/jagoda/vision/commits{/sha}","git_commits_url":"https://api.github.com/repos/jagoda/vision/git/commits{/sha}","comments_url":"https://api.github.com/repos/jagoda/vision/comments{/number}","issue_comment_url":"https://api.github.com/repos/jagoda/vision/issues/comments{/number}","contents_url":"https://api.github.com/repos/jagoda/vision/contents/{+path}","compare_url":"https://api.github.com/repos/jagoda/vision/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jagoda/vision/merges","archive_url":"https://api.github.com/repos/jagoda/vision/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jagoda/vision/downloads","issues_url":"https://api.github.com/repos/jagoda/vision/issues{/number}","pulls_url":"https://api.github.com/repos/jagoda/vision/pulls{/number}","milestones_url":"https://api.github.com/repos/jagoda/vision/milestones{/number}","notifications_url":"https://api.github.com/repos/jagoda/vision/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jagoda/vision/labels{/name}","releases_url":"https://api.github.com/repos/jagoda/vision/releases{/id}","created_at":"2014-10-30T00:14:19Z","updated_at":"2014-11-19T18:17:42Z","pushed_at":"2015-10-28T23:50:37Z","git_url":"git://github.com/jagoda/vision.git","ssh_url":"git@github.com:jagoda/vision.git","clone_url":"https://github.com/jagoda/vision.git","svn_url":"https://github.com/jagoda/vision","homepage":null,"size":312,"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":"hapijs:master","ref":"master","sha":"3703656e14494ca550f25a24ae4aac7e49cd9b4a","user":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"repo":{"id":24220172,"name":"vision","full_name":"hapijs/vision","owner":{"login":"hapijs","id":3774533,"avatar_url":"https://avatars.githubusercontent.com/u/3774533?v=3","gravatar_id":"","url":"https://api.github.com/users/hapijs","html_url":"https://github.com/hapijs","followers_url":"https://api.github.com/users/hapijs/followers","following_url":"https://api.github.com/users/hapijs/following{/other_user}","gists_url":"https://api.github.com/users/hapijs/gists{/gist_id}","starred_url":"https://api.github.com/users/hapijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapijs/subscriptions","organizations_url":"https://api.github.com/users/hapijs/orgs","repos_url":"https://api.github.com/users/hapijs/repos","events_url":"https://api.github.com/users/hapijs/events{/privacy}","received_events_url":"https://api.github.com/users/hapijs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hapijs/vision","description":"Templates rendering support for hapi.js","fork":false,"url":"https://api.github.com/repos/hapijs/vision","forks_url":"https://api.github.com/repos/hapijs/vision/forks","keys_url":"https://api.github.com/repos/hapijs/vision/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hapijs/vision/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hapijs/vision/teams","hooks_url":"https://api.github.com/repos/hapijs/vision/hooks","issue_events_url":"https://api.github.com/repos/hapijs/vision/issues/events{/number}","events_url":"https://api.github.com/repos/hapijs/vision/events","assignees_url":"https://api.github.com/repos/hapijs/vision/assignees{/user}","branches_url":"https://api.github.com/repos/hapijs/vision/branches{/branch}","tags_url":"https://api.github.com/repos/hapijs/vision/tags","blobs_url":"https://api.github.com/repos/hapijs/vision/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hapijs/vision/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hapijs/vision/git/refs{/sha}","trees_url":"https://api.github.com/repos/hapijs/vision/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hapijs/vision/statuses/{sha}","languages_url":"https://api.github.com/repos/hapijs/vision/languages","stargazers_url":"https://api.github.com/repos/hapijs/vision/stargazers","contributors_url":"https://api.github.com/repos/hapijs/vision/contributors","subscribers_url":"https://api.github.com/repos/hapijs/vision/subscribers","subscription_url":"https://api.github.com/repos/hapijs/vision/subscription","commits_url":"https://api.github.com/repos/hapijs/vision/commits{/sha}","git_commits_url":"https://api.github.com/repos/hapijs/vision/git/commits{/sha}","comments_url":"https://api.github.com/repos/hapijs/vision/comments{/number}","issue_comment_url":"https://api.github.com/repos/hapijs/vision/issues/comments{/number}","contents_url":"https://api.github.com/repos/hapijs/vision/contents/{+path}","compare_url":"https://api.github.com/repos/hapijs/vision/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hapijs/vision/merges","archive_url":"https://api.github.com/repos/hapijs/vision/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hapijs/vision/downloads","issues_url":"https://api.github.com/repos/hapijs/vision/issues{/number}","pulls_url":"https://api.github.com/repos/hapijs/vision/pulls{/number}","milestones_url":"https://api.github.com/repos/hapijs/vision/milestones{/number}","notifications_url":"https://api.github.com/repos/hapijs/vision/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hapijs/vision/labels{/name}","releases_url":"https://api.github.com/repos/hapijs/vision/releases{/id}","created_at":"2014-09-19T07:16:10Z","updated_at":"2015-10-12T11:22:17Z","pushed_at":"2015-10-28T23:51:47Z","git_url":"git://github.com/hapijs/vision.git","ssh_url":"git@github.com:hapijs/vision.git","clone_url":"https://github.com/hapijs/vision.git","svn_url":"https://github.com/hapijs/vision","homepage":null,"size":550,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":5,"forks":17,"open_issues":5,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hapijs/vision/pulls/65"},"html":{"href":"https://github.com/hapijs/vision/pull/65"},"issue":{"href":"https://api.github.com/repos/hapijs/vision/issues/65"},"comments":{"href":"https://api.github.com/repos/hapijs/vision/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/hapijs/vision/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/hapijs/vision/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hapijs/vision/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/hapijs/vision/statuses/26e1960abe2552346db46af9247022cb203b944e"}}}}