{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/vanagon/pulls/comments/56243602","id":56243602,"diff_hunk":"@@ -339,21 +362,14 @@ def insert_child(curr, name)\n         return curr\n       end\n \n-      # strip and split the directory path into single names\n+      # strip the leading install root and the filename from the service path\n+      # and replace any \\ with /\n+      #\n       # @param [string] path string of directory\n-      def strip_path(path)\n-        if path.include?(\"/\") || path.include?(\"\\\\\")\n-          # The regex in the last part of this if warrants some\n-          # explanation. Specifically it matches any combinations\n-          # of any letters, then the : char, then finally either\n-          # the char / or the char \\. it's meant to parse out drive\n-          # roots on windows\n-          if path.start_with?(\"/\") || path.start_with?(\"\\\\\") || path.start_with?(\"SourceDir\") || path =~ (/([A-Za-z])*\\:(\\/|\\\\)/)\n-            path = path.sub(/\\/|\\\\|([A-Za-z])*\\:(\\/|\\\\)|(\\/|\\\\)?(SourceDir)(\\/|\\\\)?/, '')\n-          end\n-          names = path.split(/\\/|\\\\/)\n-        end\n-        return names\n+      # @param [@project] project object\n+      def strip_and_format_path(path, project)\n+        path_regex = /(\\\\|\\/)?SourceDir(\\\\|\\/)#{project.settings[:base_dir]}(\\\\|\\/)#{project.settings[:company_id]}(\\\\|\\/)#{project.settings[:product_id]}(\\\\|\\/)/","path":"lib/vanagon/platform/windows.rb","position":148,"original_position":148,"commit_id":"4106aeeb228377d9fc0cf4d61f13c9b81010c4f0","original_commit_id":"4106aeeb228377d9fc0cf4d61f13c9b81010c4f0","user":{"login":"mckern","id":344926,"avatar_url":"https://avatars.githubusercontent.com/u/344926?v=3","gravatar_id":"","url":"https://api.github.com/users/mckern","html_url":"https://github.com/mckern","followers_url":"https://api.github.com/users/mckern/followers","following_url":"https://api.github.com/users/mckern/following{/other_user}","gists_url":"https://api.github.com/users/mckern/gists{/gist_id}","starred_url":"https://api.github.com/users/mckern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckern/subscriptions","organizations_url":"https://api.github.com/users/mckern/orgs","repos_url":"https://api.github.com/users/mckern/repos","events_url":"https://api.github.com/users/mckern/events{/privacy}","received_events_url":"https://api.github.com/users/mckern/received_events","type":"User","site_admin":false},"body":"... that's some regex you got there.","created_at":"2016-03-15T21:25:04Z","updated_at":"2016-03-15T21:25:04Z","html_url":"https://github.com/puppetlabs/vanagon/pull/318#discussion_r56243602","pull_request_url":"https://api.github.com/repos/puppetlabs/vanagon/pulls/318","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/vanagon/pulls/comments/56243602"},"html":{"href":"https://github.com/puppetlabs/vanagon/pull/318#discussion_r56243602"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/vanagon/pulls/318"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/vanagon/pulls/318","id":62698203,"html_url":"https://github.com/puppetlabs/vanagon/pull/318","diff_url":"https://github.com/puppetlabs/vanagon/pull/318.diff","patch_url":"https://github.com/puppetlabs/vanagon/pull/318.patch","issue_url":"https://api.github.com/repos/puppetlabs/vanagon/issues/318","number":318,"state":"open","locked":false,"title":"Directorylist fixes","user":{"login":"McdonaldSeanp","id":6415932,"avatar_url":"https://avatars.githubusercontent.com/u/6415932?v=3","gravatar_id":"","url":"https://api.github.com/users/McdonaldSeanp","html_url":"https://github.com/McdonaldSeanp","followers_url":"https://api.github.com/users/McdonaldSeanp/followers","following_url":"https://api.github.com/users/McdonaldSeanp/following{/other_user}","gists_url":"https://api.github.com/users/McdonaldSeanp/gists{/gist_id}","starred_url":"https://api.github.com/users/McdonaldSeanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/McdonaldSeanp/subscriptions","organizations_url":"https://api.github.com/users/McdonaldSeanp/orgs","repos_url":"https://api.github.com/users/McdonaldSeanp/repos","events_url":"https://api.github.com/users/McdonaldSeanp/events{/privacy}","received_events_url":"https://api.github.com/users/McdonaldSeanp/received_events","type":"User","site_admin":false},"body":"This updated DirectoryList and the heat commands to create the correct directory structure in the PA MSI","created_at":"2016-03-14T04:02:09Z","updated_at":"2016-03-15T21:25:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f17af99ca0073c6e2d1df21ed38693826bcd67c4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/vanagon/pulls/318/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/vanagon/pulls/318/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/vanagon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/vanagon/issues/318/comments","statuses_url":"https://api.github.com/repos/puppetlabs/vanagon/statuses/4106aeeb228377d9fc0cf4d61f13c9b81010c4f0","head":{"label":"McdonaldSeanp:feature/RE-6470/allow_config_files_to_stay","ref":"feature/RE-6470/allow_config_files_to_stay","sha":"4106aeeb228377d9fc0cf4d61f13c9b81010c4f0","user":{"login":"McdonaldSeanp","id":6415932,"avatar_url":"https://avatars.githubusercontent.com/u/6415932?v=3","gravatar_id":"","url":"https://api.github.com/users/McdonaldSeanp","html_url":"https://github.com/McdonaldSeanp","followers_url":"https://api.github.com/users/McdonaldSeanp/followers","following_url":"https://api.github.com/users/McdonaldSeanp/following{/other_user}","gists_url":"https://api.github.com/users/McdonaldSeanp/gists{/gist_id}","starred_url":"https://api.github.com/users/McdonaldSeanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/McdonaldSeanp/subscriptions","organizations_url":"https://api.github.com/users/McdonaldSeanp/orgs","repos_url":"https://api.github.com/users/McdonaldSeanp/repos","events_url":"https://api.github.com/users/McdonaldSeanp/events{/privacy}","received_events_url":"https://api.github.com/users/McdonaldSeanp/received_events","type":"User","site_admin":false},"repo":{"id":46823262,"name":"vanagon","full_name":"McdonaldSeanp/vanagon","owner":{"login":"McdonaldSeanp","id":6415932,"avatar_url":"https://avatars.githubusercontent.com/u/6415932?v=3","gravatar_id":"","url":"https://api.github.com/users/McdonaldSeanp","html_url":"https://github.com/McdonaldSeanp","followers_url":"https://api.github.com/users/McdonaldSeanp/followers","following_url":"https://api.github.com/users/McdonaldSeanp/following{/other_user}","gists_url":"https://api.github.com/users/McdonaldSeanp/gists{/gist_id}","starred_url":"https://api.github.com/users/McdonaldSeanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/McdonaldSeanp/subscriptions","organizations_url":"https://api.github.com/users/McdonaldSeanp/orgs","repos_url":"https://api.github.com/users/McdonaldSeanp/repos","events_url":"https://api.github.com/users/McdonaldSeanp/events{/privacy}","received_events_url":"https://api.github.com/users/McdonaldSeanp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/McdonaldSeanp/vanagon","description":"All of your packages will fit into this van with this one simple trick.","fork":true,"url":"https://api.github.com/repos/McdonaldSeanp/vanagon","forks_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/forks","keys_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/teams","hooks_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/hooks","issue_events_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/issues/events{/number}","events_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/events","assignees_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/assignees{/user}","branches_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/branches{/branch}","tags_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/tags","blobs_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/git/refs{/sha}","trees_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/statuses/{sha}","languages_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/languages","stargazers_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/stargazers","contributors_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/contributors","subscribers_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/subscribers","subscription_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/subscription","commits_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/commits{/sha}","git_commits_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/git/commits{/sha}","comments_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/comments{/number}","issue_comment_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/issues/comments{/number}","contents_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/contents/{+path}","compare_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/merges","archive_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/downloads","issues_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/issues{/number}","pulls_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/pulls{/number}","milestones_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/milestones{/number}","notifications_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/labels{/name}","releases_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/releases{/id}","deployments_url":"https://api.github.com/repos/McdonaldSeanp/vanagon/deployments","created_at":"2015-11-24T22:41:48Z","updated_at":"2016-02-05T03:45:37Z","pushed_at":"2016-03-15T20:55:09Z","git_url":"git://github.com/McdonaldSeanp/vanagon.git","ssh_url":"git@github.com:McdonaldSeanp/vanagon.git","clone_url":"https://github.com/McdonaldSeanp/vanagon.git","svn_url":"https://github.com/McdonaldSeanp/vanagon","homepage":null,"size":890,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"puppetlabs:master","ref":"master","sha":"eb57a9a754b69bac0075e86d1d143839ea48873a","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":26653553,"name":"vanagon","full_name":"puppetlabs/vanagon","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/vanagon","description":"All of your packages will fit into this van with this one simple trick.","fork":false,"url":"https://api.github.com/repos/puppetlabs/vanagon","forks_url":"https://api.github.com/repos/puppetlabs/vanagon/forks","keys_url":"https://api.github.com/repos/puppetlabs/vanagon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/vanagon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/vanagon/teams","hooks_url":"https://api.github.com/repos/puppetlabs/vanagon/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/vanagon/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/vanagon/events","assignees_url":"https://api.github.com/repos/puppetlabs/vanagon/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/vanagon/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/vanagon/tags","blobs_url":"https://api.github.com/repos/puppetlabs/vanagon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/vanagon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/vanagon/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/vanagon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/vanagon/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/vanagon/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/vanagon/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/vanagon/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/vanagon/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/vanagon/subscription","commits_url":"https://api.github.com/repos/puppetlabs/vanagon/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/vanagon/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/vanagon/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/vanagon/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/vanagon/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/vanagon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/vanagon/merges","archive_url":"https://api.github.com/repos/puppetlabs/vanagon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/vanagon/downloads","issues_url":"https://api.github.com/repos/puppetlabs/vanagon/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/vanagon/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/vanagon/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/vanagon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/vanagon/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/vanagon/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/vanagon/deployments","created_at":"2014-11-14T19:17:18Z","updated_at":"2016-01-29T12:05:09Z","pushed_at":"2016-03-15T20:55:09Z","git_url":"git://github.com/puppetlabs/vanagon.git","ssh_url":"git@github.com:puppetlabs/vanagon.git","clone_url":"https://github.com/puppetlabs/vanagon.git","svn_url":"https://github.com/puppetlabs/vanagon","homepage":null,"size":1006,"stargazers_count":12,"watchers_count":12,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":6,"forks":19,"open_issues":6,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/vanagon/pulls/318"},"html":{"href":"https://github.com/puppetlabs/vanagon/pull/318"},"issue":{"href":"https://api.github.com/repos/puppetlabs/vanagon/issues/318"},"comments":{"href":"https://api.github.com/repos/puppetlabs/vanagon/issues/318/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/vanagon/pulls/318/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/vanagon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/vanagon/pulls/318/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/vanagon/statuses/4106aeeb228377d9fc0cf4d61f13c9b81010c4f0"}}}}