{"action":"created","comment":{"url":"https://api.github.com/repos/socketstream/socketstream/pulls/comments/28083862","id":28083862,"diff_hunk":"@@ -0,0 +1,59 @@\n+'use strict';\n+\n+var path    = require('path'),\n+  fs      = require('fs'),\n+  should  = require('should'),\n+  ss      = require( '../../../lib/socketstream'),\n+  options = ss.client.options,\n+  defineAbcClient = require('./abcClient');\n+\n+describe('pack',function() {\n+\n+\n+  beforeEach(function() {\n+\n+    // back to initial client state\n+    ss.client.assets.unload();\n+    ss.client.assets.load();\n+  });\n+\n+  afterEach(function() {\n+    ss.client.forget();\n+  });\n+\n+  var newEngine = function newEngine(api,config,options) {\n+    api.should.equal(ss.api);\n+    options.should.equal(ss.client.options);\n+    return {\n+      name: 'New',\n+      process: function (template, path, id, opts) {\n+        return '<script id=\"new-' + id + '\" type=\"text/x-tmpl\">' + template + JSON.stringify(opts.constants) + '</script>';\n+      }\n+    }\n+  };\n+\n+  it('should be available in formatters pack simple css and js', function() {\n+\n+    var client = defineAbcClient({ }, function() {\n+\n+        ss.api.client.send('constant','abc','abc');\n+\n+        ss.client.formatters.add('html');\n+        ss.client.formatters.add('css');\n+        ss.client.formatters.add('javascript');\n+      });\n+\n+    ss.api.bundler.pack(client);\n+\n+    var html = fs.readFileSync(path.join(__dirname,'../../fixtures/project/client/static/assets/abc/' + client.id + '.html'),'utf-8');\n+    var js = fs.readFileSync(path.join(__dirname,'../../fixtures/project/client/static/assets/abc/' + client.id + '.js'),'utf-8');\n+    var css = fs.readFileSync(path.join(__dirname,'../../fixtures/project/client/static/assets/abc/' + client.id + '.css'),'utf-8');\n+    var expected_html = fs.readFileSync(path.join(__dirname,'../../fixtures/project/client/abc/expected.html'),'utf-8');\n+    var expected_js = fs.readFileSync(path.join(__dirname,'../../fixtures/project/client/abc/expected.js'),'utf-8');\n+\n+    html.should.equal(expected_html);\n+    js.should.equal(expected_js);","path":"test/unit/client/pack.test.js","position":55,"original_position":55,"commit_id":"320d1243f12fc6ccb1ea46313b9686d7559cf7fd","original_commit_id":"320d1243f12fc6ccb1ea46313b9686d7559cf7fd","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Identifier 'expected_js' is not in camel case.","created_at":"2015-04-09T17:36:40Z","updated_at":"2015-04-09T17:36:40Z","html_url":"https://github.com/socketstream/socketstream/pull/528#discussion_r28083862","pull_request_url":"https://api.github.com/repos/socketstream/socketstream/pulls/528","_links":{"self":{"href":"https://api.github.com/repos/socketstream/socketstream/pulls/comments/28083862"},"html":{"href":"https://github.com/socketstream/socketstream/pull/528#discussion_r28083862"},"pull_request":{"href":"https://api.github.com/repos/socketstream/socketstream/pulls/528"}}},"pull_request":{"url":"https://api.github.com/repos/socketstream/socketstream/pulls/528","id":32893729,"html_url":"https://github.com/socketstream/socketstream/pull/528","diff_url":"https://github.com/socketstream/socketstream/pull/528.diff","patch_url":"https://github.com/socketstream/socketstream/pull/528.patch","issue_url":"https://api.github.com/repos/socketstream/socketstream/issues/528","number":528,"state":"open","locked":false,"title":"Packing bundles for production","user":{"login":"thepian","id":72638,"avatar_url":"https://avatars.githubusercontent.com/u/72638?v=3","gravatar_id":"","url":"https://api.github.com/users/thepian","html_url":"https://github.com/thepian","followers_url":"https://api.github.com/users/thepian/followers","following_url":"https://api.github.com/users/thepian/following{/other_user}","gists_url":"https://api.github.com/users/thepian/gists{/gist_id}","starred_url":"https://api.github.com/users/thepian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thepian/subscriptions","organizations_url":"https://api.github.com/users/thepian/orgs","repos_url":"https://api.github.com/users/thepian/repos","events_url":"https://api.github.com/users/thepian/events{/privacy}","received_events_url":"https://api.github.com/users/thepian/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-08T19:32:43Z","updated_at":"2015-04-09T17:36:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ed01249185aec3f683cc12b1319a025b4c3ceda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/socketstream/socketstream/pulls/528/commits","review_comments_url":"https://api.github.com/repos/socketstream/socketstream/pulls/528/comments","review_comment_url":"https://api.github.com/repos/socketstream/socketstream/pulls/comments{/number}","comments_url":"https://api.github.com/repos/socketstream/socketstream/issues/528/comments","statuses_url":"https://api.github.com/repos/socketstream/socketstream/statuses/320d1243f12fc6ccb1ea46313b9686d7559cf7fd","head":{"label":"socketstream:feature/507-packing","ref":"feature/507-packing","sha":"320d1243f12fc6ccb1ea46313b9686d7559cf7fd","user":{"login":"socketstream","id":5891564,"avatar_url":"https://avatars.githubusercontent.com/u/5891564?v=3","gravatar_id":"","url":"https://api.github.com/users/socketstream","html_url":"https://github.com/socketstream","followers_url":"https://api.github.com/users/socketstream/followers","following_url":"https://api.github.com/users/socketstream/following{/other_user}","gists_url":"https://api.github.com/users/socketstream/gists{/gist_id}","starred_url":"https://api.github.com/users/socketstream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socketstream/subscriptions","organizations_url":"https://api.github.com/users/socketstream/orgs","repos_url":"https://api.github.com/users/socketstream/repos","events_url":"https://api.github.com/users/socketstream/events{/privacy}","received_events_url":"https://api.github.com/users/socketstream/received_events","type":"Organization","site_admin":false},"repo":{"id":1254218,"name":"socketstream","full_name":"socketstream/socketstream","owner":{"login":"socketstream","id":5891564,"avatar_url":"https://avatars.githubusercontent.com/u/5891564?v=3","gravatar_id":"","url":"https://api.github.com/users/socketstream","html_url":"https://github.com/socketstream","followers_url":"https://api.github.com/users/socketstream/followers","following_url":"https://api.github.com/users/socketstream/following{/other_user}","gists_url":"https://api.github.com/users/socketstream/gists{/gist_id}","starred_url":"https://api.github.com/users/socketstream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socketstream/subscriptions","organizations_url":"https://api.github.com/users/socketstream/orgs","repos_url":"https://api.github.com/users/socketstream/repos","events_url":"https://api.github.com/users/socketstream/events{/privacy}","received_events_url":"https://api.github.com/users/socketstream/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socketstream/socketstream","description":"A framework for Realtime Web Apps","fork":false,"url":"https://api.github.com/repos/socketstream/socketstream","forks_url":"https://api.github.com/repos/socketstream/socketstream/forks","keys_url":"https://api.github.com/repos/socketstream/socketstream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socketstream/socketstream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socketstream/socketstream/teams","hooks_url":"https://api.github.com/repos/socketstream/socketstream/hooks","issue_events_url":"https://api.github.com/repos/socketstream/socketstream/issues/events{/number}","events_url":"https://api.github.com/repos/socketstream/socketstream/events","assignees_url":"https://api.github.com/repos/socketstream/socketstream/assignees{/user}","branches_url":"https://api.github.com/repos/socketstream/socketstream/branches{/branch}","tags_url":"https://api.github.com/repos/socketstream/socketstream/tags","blobs_url":"https://api.github.com/repos/socketstream/socketstream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socketstream/socketstream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socketstream/socketstream/git/refs{/sha}","trees_url":"https://api.github.com/repos/socketstream/socketstream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socketstream/socketstream/statuses/{sha}","languages_url":"https://api.github.com/repos/socketstream/socketstream/languages","stargazers_url":"https://api.github.com/repos/socketstream/socketstream/stargazers","contributors_url":"https://api.github.com/repos/socketstream/socketstream/contributors","subscribers_url":"https://api.github.com/repos/socketstream/socketstream/subscribers","subscription_url":"https://api.github.com/repos/socketstream/socketstream/subscription","commits_url":"https://api.github.com/repos/socketstream/socketstream/commits{/sha}","git_commits_url":"https://api.github.com/repos/socketstream/socketstream/git/commits{/sha}","comments_url":"https://api.github.com/repos/socketstream/socketstream/comments{/number}","issue_comment_url":"https://api.github.com/repos/socketstream/socketstream/issues/comments{/number}","contents_url":"https://api.github.com/repos/socketstream/socketstream/contents/{+path}","compare_url":"https://api.github.com/repos/socketstream/socketstream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socketstream/socketstream/merges","archive_url":"https://api.github.com/repos/socketstream/socketstream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socketstream/socketstream/downloads","issues_url":"https://api.github.com/repos/socketstream/socketstream/issues{/number}","pulls_url":"https://api.github.com/repos/socketstream/socketstream/pulls{/number}","milestones_url":"https://api.github.com/repos/socketstream/socketstream/milestones{/number}","notifications_url":"https://api.github.com/repos/socketstream/socketstream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socketstream/socketstream/labels{/name}","releases_url":"https://api.github.com/repos/socketstream/socketstream/releases{/id}","created_at":"2011-01-14T11:47:16Z","updated_at":"2015-04-09T05:03:39Z","pushed_at":"2015-04-09T17:36:29Z","git_url":"git://github.com/socketstream/socketstream.git","ssh_url":"git@github.com:socketstream/socketstream.git","clone_url":"https://github.com/socketstream/socketstream.git","svn_url":"https://github.com/socketstream/socketstream","homepage":"http://socketstream.com","size":8470,"stargazers_count":3211,"watchers_count":3211,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":250,"mirror_url":null,"open_issues_count":26,"forks":250,"open_issues":26,"watchers":3211,"default_branch":"master"}},"base":{"label":"socketstream:next","ref":"next","sha":"a14c38368ccc13d783f301b1ba8f17977f8f570c","user":{"login":"socketstream","id":5891564,"avatar_url":"https://avatars.githubusercontent.com/u/5891564?v=3","gravatar_id":"","url":"https://api.github.com/users/socketstream","html_url":"https://github.com/socketstream","followers_url":"https://api.github.com/users/socketstream/followers","following_url":"https://api.github.com/users/socketstream/following{/other_user}","gists_url":"https://api.github.com/users/socketstream/gists{/gist_id}","starred_url":"https://api.github.com/users/socketstream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socketstream/subscriptions","organizations_url":"https://api.github.com/users/socketstream/orgs","repos_url":"https://api.github.com/users/socketstream/repos","events_url":"https://api.github.com/users/socketstream/events{/privacy}","received_events_url":"https://api.github.com/users/socketstream/received_events","type":"Organization","site_admin":false},"repo":{"id":1254218,"name":"socketstream","full_name":"socketstream/socketstream","owner":{"login":"socketstream","id":5891564,"avatar_url":"https://avatars.githubusercontent.com/u/5891564?v=3","gravatar_id":"","url":"https://api.github.com/users/socketstream","html_url":"https://github.com/socketstream","followers_url":"https://api.github.com/users/socketstream/followers","following_url":"https://api.github.com/users/socketstream/following{/other_user}","gists_url":"https://api.github.com/users/socketstream/gists{/gist_id}","starred_url":"https://api.github.com/users/socketstream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socketstream/subscriptions","organizations_url":"https://api.github.com/users/socketstream/orgs","repos_url":"https://api.github.com/users/socketstream/repos","events_url":"https://api.github.com/users/socketstream/events{/privacy}","received_events_url":"https://api.github.com/users/socketstream/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socketstream/socketstream","description":"A framework for Realtime Web Apps","fork":false,"url":"https://api.github.com/repos/socketstream/socketstream","forks_url":"https://api.github.com/repos/socketstream/socketstream/forks","keys_url":"https://api.github.com/repos/socketstream/socketstream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socketstream/socketstream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socketstream/socketstream/teams","hooks_url":"https://api.github.com/repos/socketstream/socketstream/hooks","issue_events_url":"https://api.github.com/repos/socketstream/socketstream/issues/events{/number}","events_url":"https://api.github.com/repos/socketstream/socketstream/events","assignees_url":"https://api.github.com/repos/socketstream/socketstream/assignees{/user}","branches_url":"https://api.github.com/repos/socketstream/socketstream/branches{/branch}","tags_url":"https://api.github.com/repos/socketstream/socketstream/tags","blobs_url":"https://api.github.com/repos/socketstream/socketstream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socketstream/socketstream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socketstream/socketstream/git/refs{/sha}","trees_url":"https://api.github.com/repos/socketstream/socketstream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socketstream/socketstream/statuses/{sha}","languages_url":"https://api.github.com/repos/socketstream/socketstream/languages","stargazers_url":"https://api.github.com/repos/socketstream/socketstream/stargazers","contributors_url":"https://api.github.com/repos/socketstream/socketstream/contributors","subscribers_url":"https://api.github.com/repos/socketstream/socketstream/subscribers","subscription_url":"https://api.github.com/repos/socketstream/socketstream/subscription","commits_url":"https://api.github.com/repos/socketstream/socketstream/commits{/sha}","git_commits_url":"https://api.github.com/repos/socketstream/socketstream/git/commits{/sha}","comments_url":"https://api.github.com/repos/socketstream/socketstream/comments{/number}","issue_comment_url":"https://api.github.com/repos/socketstream/socketstream/issues/comments{/number}","contents_url":"https://api.github.com/repos/socketstream/socketstream/contents/{+path}","compare_url":"https://api.github.com/repos/socketstream/socketstream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socketstream/socketstream/merges","archive_url":"https://api.github.com/repos/socketstream/socketstream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socketstream/socketstream/downloads","issues_url":"https://api.github.com/repos/socketstream/socketstream/issues{/number}","pulls_url":"https://api.github.com/repos/socketstream/socketstream/pulls{/number}","milestones_url":"https://api.github.com/repos/socketstream/socketstream/milestones{/number}","notifications_url":"https://api.github.com/repos/socketstream/socketstream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socketstream/socketstream/labels{/name}","releases_url":"https://api.github.com/repos/socketstream/socketstream/releases{/id}","created_at":"2011-01-14T11:47:16Z","updated_at":"2015-04-09T05:03:39Z","pushed_at":"2015-04-09T17:36:29Z","git_url":"git://github.com/socketstream/socketstream.git","ssh_url":"git@github.com:socketstream/socketstream.git","clone_url":"https://github.com/socketstream/socketstream.git","svn_url":"https://github.com/socketstream/socketstream","homepage":"http://socketstream.com","size":8470,"stargazers_count":3211,"watchers_count":3211,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":250,"mirror_url":null,"open_issues_count":26,"forks":250,"open_issues":26,"watchers":3211,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/socketstream/socketstream/pulls/528"},"html":{"href":"https://github.com/socketstream/socketstream/pull/528"},"issue":{"href":"https://api.github.com/repos/socketstream/socketstream/issues/528"},"comments":{"href":"https://api.github.com/repos/socketstream/socketstream/issues/528/comments"},"review_comments":{"href":"https://api.github.com/repos/socketstream/socketstream/pulls/528/comments"},"review_comment":{"href":"https://api.github.com/repos/socketstream/socketstream/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/socketstream/socketstream/pulls/528/commits"},"statuses":{"href":"https://api.github.com/repos/socketstream/socketstream/statuses/320d1243f12fc6ccb1ea46313b9686d7559cf7fd"}}}}