{"action":"created","comment":{"url":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/comments/50988262","id":50988262,"diff_hunk":"@@ -0,0 +1,139 @@\n+/**\n+ * @file\n+ *  Add path related behaviours.\n+ */\n+var CW = CW || {};\n+\n+(function($) {\n+\n+  'use strict';\n+    \n+  CW.Path = {\n+\n+    initialized: false,\n+    \n+    uri: document.location.href,\n+    \n+    urlProtocol: '',\n+    urlHostname: '',\n+    urlPath: '',\n+    urlSearch: '',\n+    urlQueryParam: [],\n+    urlFragment: '',\n+    \n+    initializeIfNecessary: function() {\n+      if( !this.initialized ) {\n+        this.parseURI();\n+        this.initialized = true;\n+      }\n+    },    \n+    \n+    getURI: function() {\n+      return this.uri;\n+    },\n+    \n+    setURI: function( uri ) {\n+      this.uri = uri;\n+    },\n+    \n+    getUrlProtocol: function() {\n+      this.initializeIfNecessary();\n+      return this.urlProtocol;  \n+    },\n+    \n+    setUrlProtocol: function( val ) {\n+      this.urlProtocol = val;\n+    },\n+    \n+    getUrlHostname: function() {\n+      this.initializeIfNecessary();\n+      return this.urlHostname;  \n+    },\n+\n+    getUrlBaseHostname: function() {\n+      if (!this.isIPAddress(this.getUrlHostname())) {\n+        var components = this.getUrlHostname().split('.');\n+        return components.slice(-2).join('.');\n+      }\n+      return this.getUrlHostname();\n+    },\n+    \n+    setUrlHostname: function( val ) {\n+      this.urlHostname = val;\n+    },\n+    \n+    getUrlPath: function() {\n+      this.initializeIfNecessary();\n+      return this.urlPath;  \n+    },\n+    \n+    setUrlPath: function( val ) {\n+      this.urlPath = val;\n+    },\n+    \n+    getUrlSearch: function() {\n+      this.initializeIfNecessary();\n+      return this.urlSearch;  \n+    },\n+    \n+    setUrlSearch: function( val ) {\n+      this.urlSearch = val;\n+    },\n+    \n+    getUrlFragment: function() {\n+      this.initializeIfNecessary();\n+      return this.urlFragment;  \n+    },\n+    \n+    setUrlFragment: function( val ) {\n+      this.urlFragment = val;\n+    },\n+    \n+    //Parameters\n+    parseURI: function() {\n+      var urlElement = document.createElement('a');\n+      urlElement.href = this.getURI();","path":"javascript/cw_tool.path.js","position":95,"original_position":95,"commit_id":"0c519b450397289cafd7eff5510e75d1654dbd07","original_commit_id":"0c519b450397289cafd7eff5510e75d1654dbd07","user":{"login":"itarato","id":49009,"avatar_url":"https://avatars.githubusercontent.com/u/49009?v=3","gravatar_id":"","url":"https://api.github.com/users/itarato","html_url":"https://github.com/itarato","followers_url":"https://api.github.com/users/itarato/followers","following_url":"https://api.github.com/users/itarato/following{/other_user}","gists_url":"https://api.github.com/users/itarato/gists{/gist_id}","starred_url":"https://api.github.com/users/itarato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itarato/subscriptions","organizations_url":"https://api.github.com/users/itarato/orgs","repos_url":"https://api.github.com/users/itarato/repos","events_url":"https://api.github.com/users/itarato/events{/privacy}","received_events_url":"https://api.github.com/users/itarato/received_events","type":"User","site_admin":false},"body":"I don't see calling ```setURI``` anywhere which seems the only way the covered variable is set. How is this coordinated?","created_at":"2016-01-27T14:15:58Z","updated_at":"2016-01-27T14:15:58Z","html_url":"https://github.com/cameronandwilding/CWTool/pull/4#discussion_r50988262","pull_request_url":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/comments/50988262"},"html":{"href":"https://github.com/cameronandwilding/CWTool/pull/4#discussion_r50988262"},"pull_request":{"href":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/4","id":57362101,"html_url":"https://github.com/cameronandwilding/CWTool/pull/4","diff_url":"https://github.com/cameronandwilding/CWTool/pull/4.diff","patch_url":"https://github.com/cameronandwilding/CWTool/pull/4.patch","issue_url":"https://api.github.com/repos/cameronandwilding/CWTool/issues/4","number":4,"state":"open","locked":false,"title":"EIL-707 Adding javascript url managers.","user":{"login":"gguridi","id":6469520,"avatar_url":"https://avatars.githubusercontent.com/u/6469520?v=3","gravatar_id":"","url":"https://api.github.com/users/gguridi","html_url":"https://github.com/gguridi","followers_url":"https://api.github.com/users/gguridi/followers","following_url":"https://api.github.com/users/gguridi/following{/other_user}","gists_url":"https://api.github.com/users/gguridi/gists{/gist_id}","starred_url":"https://api.github.com/users/gguridi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gguridi/subscriptions","organizations_url":"https://api.github.com/users/gguridi/orgs","repos_url":"https://api.github.com/users/gguridi/repos","events_url":"https://api.github.com/users/gguridi/events{/privacy}","received_events_url":"https://api.github.com/users/gguridi/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-27T13:51:57Z","updated_at":"2016-01-27T14:15:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3dcee20f772f684605ef351b3591cd6e37e47d1","assignee":{"login":"itarato","id":49009,"avatar_url":"https://avatars.githubusercontent.com/u/49009?v=3","gravatar_id":"","url":"https://api.github.com/users/itarato","html_url":"https://github.com/itarato","followers_url":"https://api.github.com/users/itarato/followers","following_url":"https://api.github.com/users/itarato/following{/other_user}","gists_url":"https://api.github.com/users/itarato/gists{/gist_id}","starred_url":"https://api.github.com/users/itarato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itarato/subscriptions","organizations_url":"https://api.github.com/users/itarato/orgs","repos_url":"https://api.github.com/users/itarato/repos","events_url":"https://api.github.com/users/itarato/events{/privacy}","received_events_url":"https://api.github.com/users/itarato/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/4/commits","review_comments_url":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/4/comments","review_comment_url":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cameronandwilding/CWTool/issues/4/comments","statuses_url":"https://api.github.com/repos/cameronandwilding/CWTool/statuses/0c519b450397289cafd7eff5510e75d1654dbd07","head":{"label":"cameronandwilding:EIL-707-adding-javascript-url-managers","ref":"EIL-707-adding-javascript-url-managers","sha":"0c519b450397289cafd7eff5510e75d1654dbd07","user":{"login":"cameronandwilding","id":6458484,"avatar_url":"https://avatars.githubusercontent.com/u/6458484?v=3","gravatar_id":"","url":"https://api.github.com/users/cameronandwilding","html_url":"https://github.com/cameronandwilding","followers_url":"https://api.github.com/users/cameronandwilding/followers","following_url":"https://api.github.com/users/cameronandwilding/following{/other_user}","gists_url":"https://api.github.com/users/cameronandwilding/gists{/gist_id}","starred_url":"https://api.github.com/users/cameronandwilding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cameronandwilding/subscriptions","organizations_url":"https://api.github.com/users/cameronandwilding/orgs","repos_url":"https://api.github.com/users/cameronandwilding/repos","events_url":"https://api.github.com/users/cameronandwilding/events{/privacy}","received_events_url":"https://api.github.com/users/cameronandwilding/received_events","type":"Organization","site_admin":false},"repo":{"id":38963733,"name":"CWTool","full_name":"cameronandwilding/CWTool","owner":{"login":"cameronandwilding","id":6458484,"avatar_url":"https://avatars.githubusercontent.com/u/6458484?v=3","gravatar_id":"","url":"https://api.github.com/users/cameronandwilding","html_url":"https://github.com/cameronandwilding","followers_url":"https://api.github.com/users/cameronandwilding/followers","following_url":"https://api.github.com/users/cameronandwilding/following{/other_user}","gists_url":"https://api.github.com/users/cameronandwilding/gists{/gist_id}","starred_url":"https://api.github.com/users/cameronandwilding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cameronandwilding/subscriptions","organizations_url":"https://api.github.com/users/cameronandwilding/orgs","repos_url":"https://api.github.com/users/cameronandwilding/repos","events_url":"https://api.github.com/users/cameronandwilding/events{/privacy}","received_events_url":"https://api.github.com/users/cameronandwilding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cameronandwilding/CWTool","description":"Drupal 7 sub-framework to handle entities and provide structure for common operations","fork":false,"url":"https://api.github.com/repos/cameronandwilding/CWTool","forks_url":"https://api.github.com/repos/cameronandwilding/CWTool/forks","keys_url":"https://api.github.com/repos/cameronandwilding/CWTool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cameronandwilding/CWTool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cameronandwilding/CWTool/teams","hooks_url":"https://api.github.com/repos/cameronandwilding/CWTool/hooks","issue_events_url":"https://api.github.com/repos/cameronandwilding/CWTool/issues/events{/number}","events_url":"https://api.github.com/repos/cameronandwilding/CWTool/events","assignees_url":"https://api.github.com/repos/cameronandwilding/CWTool/assignees{/user}","branches_url":"https://api.github.com/repos/cameronandwilding/CWTool/branches{/branch}","tags_url":"https://api.github.com/repos/cameronandwilding/CWTool/tags","blobs_url":"https://api.github.com/repos/cameronandwilding/CWTool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cameronandwilding/CWTool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cameronandwilding/CWTool/git/refs{/sha}","trees_url":"https://api.github.com/repos/cameronandwilding/CWTool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cameronandwilding/CWTool/statuses/{sha}","languages_url":"https://api.github.com/repos/cameronandwilding/CWTool/languages","stargazers_url":"https://api.github.com/repos/cameronandwilding/CWTool/stargazers","contributors_url":"https://api.github.com/repos/cameronandwilding/CWTool/contributors","subscribers_url":"https://api.github.com/repos/cameronandwilding/CWTool/subscribers","subscription_url":"https://api.github.com/repos/cameronandwilding/CWTool/subscription","commits_url":"https://api.github.com/repos/cameronandwilding/CWTool/commits{/sha}","git_commits_url":"https://api.github.com/repos/cameronandwilding/CWTool/git/commits{/sha}","comments_url":"https://api.github.com/repos/cameronandwilding/CWTool/comments{/number}","issue_comment_url":"https://api.github.com/repos/cameronandwilding/CWTool/issues/comments{/number}","contents_url":"https://api.github.com/repos/cameronandwilding/CWTool/contents/{+path}","compare_url":"https://api.github.com/repos/cameronandwilding/CWTool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cameronandwilding/CWTool/merges","archive_url":"https://api.github.com/repos/cameronandwilding/CWTool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cameronandwilding/CWTool/downloads","issues_url":"https://api.github.com/repos/cameronandwilding/CWTool/issues{/number}","pulls_url":"https://api.github.com/repos/cameronandwilding/CWTool/pulls{/number}","milestones_url":"https://api.github.com/repos/cameronandwilding/CWTool/milestones{/number}","notifications_url":"https://api.github.com/repos/cameronandwilding/CWTool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cameronandwilding/CWTool/labels{/name}","releases_url":"https://api.github.com/repos/cameronandwilding/CWTool/releases{/id}","deployments_url":"https://api.github.com/repos/cameronandwilding/CWTool/deployments","created_at":"2015-07-12T13:56:59Z","updated_at":"2016-01-27T13:51:22Z","pushed_at":"2016-01-27T13:51:57Z","git_url":"git://github.com/cameronandwilding/CWTool.git","ssh_url":"git@github.com:cameronandwilding/CWTool.git","clone_url":"https://github.com/cameronandwilding/CWTool.git","svn_url":"https://github.com/cameronandwilding/CWTool","homepage":null,"size":10980,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"v3"}},"base":{"label":"cameronandwilding:v3","ref":"v3","sha":"f2a0350c76ab614f0099b10e9ec206affa81b488","user":{"login":"cameronandwilding","id":6458484,"avatar_url":"https://avatars.githubusercontent.com/u/6458484?v=3","gravatar_id":"","url":"https://api.github.com/users/cameronandwilding","html_url":"https://github.com/cameronandwilding","followers_url":"https://api.github.com/users/cameronandwilding/followers","following_url":"https://api.github.com/users/cameronandwilding/following{/other_user}","gists_url":"https://api.github.com/users/cameronandwilding/gists{/gist_id}","starred_url":"https://api.github.com/users/cameronandwilding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cameronandwilding/subscriptions","organizations_url":"https://api.github.com/users/cameronandwilding/orgs","repos_url":"https://api.github.com/users/cameronandwilding/repos","events_url":"https://api.github.com/users/cameronandwilding/events{/privacy}","received_events_url":"https://api.github.com/users/cameronandwilding/received_events","type":"Organization","site_admin":false},"repo":{"id":38963733,"name":"CWTool","full_name":"cameronandwilding/CWTool","owner":{"login":"cameronandwilding","id":6458484,"avatar_url":"https://avatars.githubusercontent.com/u/6458484?v=3","gravatar_id":"","url":"https://api.github.com/users/cameronandwilding","html_url":"https://github.com/cameronandwilding","followers_url":"https://api.github.com/users/cameronandwilding/followers","following_url":"https://api.github.com/users/cameronandwilding/following{/other_user}","gists_url":"https://api.github.com/users/cameronandwilding/gists{/gist_id}","starred_url":"https://api.github.com/users/cameronandwilding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cameronandwilding/subscriptions","organizations_url":"https://api.github.com/users/cameronandwilding/orgs","repos_url":"https://api.github.com/users/cameronandwilding/repos","events_url":"https://api.github.com/users/cameronandwilding/events{/privacy}","received_events_url":"https://api.github.com/users/cameronandwilding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cameronandwilding/CWTool","description":"Drupal 7 sub-framework to handle entities and provide structure for common operations","fork":false,"url":"https://api.github.com/repos/cameronandwilding/CWTool","forks_url":"https://api.github.com/repos/cameronandwilding/CWTool/forks","keys_url":"https://api.github.com/repos/cameronandwilding/CWTool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cameronandwilding/CWTool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cameronandwilding/CWTool/teams","hooks_url":"https://api.github.com/repos/cameronandwilding/CWTool/hooks","issue_events_url":"https://api.github.com/repos/cameronandwilding/CWTool/issues/events{/number}","events_url":"https://api.github.com/repos/cameronandwilding/CWTool/events","assignees_url":"https://api.github.com/repos/cameronandwilding/CWTool/assignees{/user}","branches_url":"https://api.github.com/repos/cameronandwilding/CWTool/branches{/branch}","tags_url":"https://api.github.com/repos/cameronandwilding/CWTool/tags","blobs_url":"https://api.github.com/repos/cameronandwilding/CWTool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cameronandwilding/CWTool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cameronandwilding/CWTool/git/refs{/sha}","trees_url":"https://api.github.com/repos/cameronandwilding/CWTool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cameronandwilding/CWTool/statuses/{sha}","languages_url":"https://api.github.com/repos/cameronandwilding/CWTool/languages","stargazers_url":"https://api.github.com/repos/cameronandwilding/CWTool/stargazers","contributors_url":"https://api.github.com/repos/cameronandwilding/CWTool/contributors","subscribers_url":"https://api.github.com/repos/cameronandwilding/CWTool/subscribers","subscription_url":"https://api.github.com/repos/cameronandwilding/CWTool/subscription","commits_url":"https://api.github.com/repos/cameronandwilding/CWTool/commits{/sha}","git_commits_url":"https://api.github.com/repos/cameronandwilding/CWTool/git/commits{/sha}","comments_url":"https://api.github.com/repos/cameronandwilding/CWTool/comments{/number}","issue_comment_url":"https://api.github.com/repos/cameronandwilding/CWTool/issues/comments{/number}","contents_url":"https://api.github.com/repos/cameronandwilding/CWTool/contents/{+path}","compare_url":"https://api.github.com/repos/cameronandwilding/CWTool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cameronandwilding/CWTool/merges","archive_url":"https://api.github.com/repos/cameronandwilding/CWTool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cameronandwilding/CWTool/downloads","issues_url":"https://api.github.com/repos/cameronandwilding/CWTool/issues{/number}","pulls_url":"https://api.github.com/repos/cameronandwilding/CWTool/pulls{/number}","milestones_url":"https://api.github.com/repos/cameronandwilding/CWTool/milestones{/number}","notifications_url":"https://api.github.com/repos/cameronandwilding/CWTool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cameronandwilding/CWTool/labels{/name}","releases_url":"https://api.github.com/repos/cameronandwilding/CWTool/releases{/id}","deployments_url":"https://api.github.com/repos/cameronandwilding/CWTool/deployments","created_at":"2015-07-12T13:56:59Z","updated_at":"2016-01-27T13:51:22Z","pushed_at":"2016-01-27T13:51:57Z","git_url":"git://github.com/cameronandwilding/CWTool.git","ssh_url":"git@github.com:cameronandwilding/CWTool.git","clone_url":"https://github.com/cameronandwilding/CWTool.git","svn_url":"https://github.com/cameronandwilding/CWTool","homepage":null,"size":10980,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"v3"}},"_links":{"self":{"href":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/4"},"html":{"href":"https://github.com/cameronandwilding/CWTool/pull/4"},"issue":{"href":"https://api.github.com/repos/cameronandwilding/CWTool/issues/4"},"comments":{"href":"https://api.github.com/repos/cameronandwilding/CWTool/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cameronandwilding/CWTool/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/cameronandwilding/CWTool/statuses/0c519b450397289cafd7eff5510e75d1654dbd07"}}}}