{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/comments/158102751","pull_request_review_id":84858225,"id":158102751,"diff_hunk":"@@ -187,49 +233,76 @@ If Puppet is running on a 64-bit system, the 32-bit Registry key can be explicit\n \n For more on this parameter, see the [Purge existing values section](#purge-existing-values) under Usage.\n \n+\n #### `registry_value`\n \n-##### `path`\n+Manages individual Registry values.\n \n-*Optional.* Specifies a Registry value for Puppet to manage. Valid options: a string containing a Registry path. If any of the parent keys in the path don't exist, Puppet creates them automatically. For example: `HKLM\\Software` or `HKEY_LOCAL_MACHINE\\Software\\Vendor`. Default value: the title of your declared resource.\n+The title of the resource can determine the path and value name that will be managed, for example:\n \n-If Puppet is running on a 64-bit system, the 32-bit Registry key can be explicitly managed using a prefix. For example: `32:HKLM\\Software\\Value3`.\n+The manifest below would manage the value called 'foo' in the key 'HKLM\\Software'\n \n-##### `ensure`\n+``` puppet\n+registry_value { 'HKLM\\Software\\foo':\n+  ...\n+}\n+```\n \n-Tells Puppet whether the value should or shouldn't exist. Valid options: 'present' and 'absent'. Default value: 'present'.\n+You can also manage the default value of a key by adding a backslash at the end of the path.  The manifest below would manage the default value in the key 'HKLM\\Software\\Vendor'\n \n-##### `type`\n+``` puppet\n+registry_value { 'HKLM\\Software\\Vendor\\\\':\n+  ...\n+}\n+```\n \n-*Optional.* Sets the data type of the specified value. Valid options: 'string', 'array', 'dword', 'qword', 'binary' and 'expand'. Default value: 'string'.\n+Note that when explicitly setting a `path` or `value_name` parameter it is suggested to use both to avoid unexpected behavior, for example:","path":"README.markdown","position":144,"original_position":144,"commit_id":"86bd7c0525e1a644195358f0e11e7f0ebdc7a48c","original_commit_id":"86bd7c0525e1a644195358f0e11e7f0ebdc7a48c","user":{"login":"clairecadman","id":28658680,"avatar_url":"https://avatars0.githubusercontent.com/u/28658680?v=4","gravatar_id":"","url":"https://api.github.com/users/clairecadman","html_url":"https://github.com/clairecadman","followers_url":"https://api.github.com/users/clairecadman/followers","following_url":"https://api.github.com/users/clairecadman/following{/other_user}","gists_url":"https://api.github.com/users/clairecadman/gists{/gist_id}","starred_url":"https://api.github.com/users/clairecadman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clairecadman/subscriptions","organizations_url":"https://api.github.com/users/clairecadman/orgs","repos_url":"https://api.github.com/users/clairecadman/repos","events_url":"https://api.github.com/users/clairecadman/events{/privacy}","received_events_url":"https://api.github.com/users/clairecadman/received_events","type":"User","site_admin":false},"body":"Suggestion: omit it is suggested - \"Note that when explicitly setting a `path` or `value_name` parameter, use both to avoid unexpected behavior...\"","created_at":"2017-12-20T18:39:11Z","updated_at":"2017-12-20T18:39:11Z","html_url":"https://github.com/puppetlabs/puppetlabs-registry/pull/142#discussion_r158102751","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/142","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/comments/158102751"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-registry/pull/142#discussion_r158102751"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/142"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/142","id":157727294,"html_url":"https://github.com/puppetlabs/puppetlabs-registry/pull/142","diff_url":"https://github.com/puppetlabs/puppetlabs-registry/pull/142.diff","patch_url":"https://github.com/puppetlabs/puppetlabs-registry/pull/142.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/issues/142","number":142,"state":"open","locked":false,"title":"(MODULES-2957) Allow backslashes in registry value names","user":{"login":"glennsarti","id":5819622,"avatar_url":"https://avatars0.githubusercontent.com/u/5819622?v=4","gravatar_id":"","url":"https://api.github.com/users/glennsarti","html_url":"https://github.com/glennsarti","followers_url":"https://api.github.com/users/glennsarti/followers","following_url":"https://api.github.com/users/glennsarti/following{/other_user}","gists_url":"https://api.github.com/users/glennsarti/gists{/gist_id}","starred_url":"https://api.github.com/users/glennsarti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennsarti/subscriptions","organizations_url":"https://api.github.com/users/glennsarti/orgs","repos_url":"https://api.github.com/users/glennsarti/repos","events_url":"https://api.github.com/users/glennsarti/events{/privacy}","received_events_url":"https://api.github.com/users/glennsarti/received_events","type":"User","site_admin":false},"body":"Note - Builds on PR #143\r\n\r\nPreviously the registry_value resource could not update values with a backslash\r\nin their name.  This was due to using the path as a way of expressing a unique\r\nregistry value, however values can only be uniquely named using a path and name.\r\n\r\nThis means the registry_value type needed a new parameter called `value_name`\r\nwhich is a namevar.  Fortunately registry keys can not have a backslash in their\r\nname so title_patterns could be used to split a resource title into it's path\r\nand value name components.  This meant the type could maintain a level of\r\nbackwards compatibility.\r\n\r\nThis meant however that many of the assumptions about the :path parameter were\r\nno longer true;\r\n* It no longer contained the registry value_name (that is now in a separate\r\n  param) so canonicalization is now the same as a registry_key\r\n* Trailing backslashes needed to be deleted instead of kept\r\n* Almost all of the custom code for the RegistryValuePath type was now redundant\r\n* In most of the test cases, :path was used but this is no longer enough to\r\n  identify a unique reg key value (It needs a Path and Value), however this\r\n  could simply be changed to :title and then the title_pattern matching would\r\n  extract the path and value_name.  This could also verify the backwards\r\n  compatibiltiy behaviour of using a title\r\n\r\nThis commit also updates the unit tests for the new value_name parameter.\r\n\r\nUnfortunately this is a breaking change even with the title_patterns.  Consider\r\nthe following:\r\n```puppet\r\n  registry_value { 'atitle\\value':\r\n    path => 'HKLM\\Software\\foo',\r\n  }\r\n```\r\nPreviously this would manage the value called 'foo' in the key 'HKLM\\Software'.\r\nWith this change it would manage the value called 'value' (extracted from the\r\ntitle_pattern because value_name is not specified) in the key 'HKLM\\Software\\foo'\r\n\r\n```puppet\r\n  registry_value { 'atitle':\r\n    path => 'HKLM\\Software\\foo',\r\n  }\r\n```\r\nPreviously this would manage the value called 'foo' in the key 'HKLM\\Software'.\r\nWith this change it would manage the default value (extracted from the\r\ntitle_pattern because value_name is not specified) in the key 'HKLM\\Software\\foo'\r\n\r\n- [x] Get it to work\r\n- [x] Add tests\r\n- [x] Confirm munging is no longer required\r\n- [x] Add acceptance tests\r\n- [x] Update documentation\r\n","created_at":"2017-12-12T03:16:15Z","updated_at":"2017-12-20T18:39:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b040c8b8f5fc5d7bae0608b466dd66f995f94b1a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Iristyle","id":394081,"avatar_url":"https://avatars0.githubusercontent.com/u/394081?v=4","gravatar_id":"","url":"https://api.github.com/users/Iristyle","html_url":"https://github.com/Iristyle","followers_url":"https://api.github.com/users/Iristyle/followers","following_url":"https://api.github.com/users/Iristyle/following{/other_user}","gists_url":"https://api.github.com/users/Iristyle/gists{/gist_id}","starred_url":"https://api.github.com/users/Iristyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Iristyle/subscriptions","organizations_url":"https://api.github.com/users/Iristyle/orgs","repos_url":"https://api.github.com/users/Iristyle/repos","events_url":"https://api.github.com/users/Iristyle/events{/privacy}","received_events_url":"https://api.github.com/users/Iristyle/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/142/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/142/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/issues/142/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/statuses/86bd7c0525e1a644195358f0e11e7f0ebdc7a48c","head":{"label":"glennsarti:ticket/master/MODULES-2957-backslash","ref":"ticket/master/MODULES-2957-backslash","sha":"86bd7c0525e1a644195358f0e11e7f0ebdc7a48c","user":{"login":"glennsarti","id":5819622,"avatar_url":"https://avatars0.githubusercontent.com/u/5819622?v=4","gravatar_id":"","url":"https://api.github.com/users/glennsarti","html_url":"https://github.com/glennsarti","followers_url":"https://api.github.com/users/glennsarti/followers","following_url":"https://api.github.com/users/glennsarti/following{/other_user}","gists_url":"https://api.github.com/users/glennsarti/gists{/gist_id}","starred_url":"https://api.github.com/users/glennsarti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennsarti/subscriptions","organizations_url":"https://api.github.com/users/glennsarti/orgs","repos_url":"https://api.github.com/users/glennsarti/repos","events_url":"https://api.github.com/users/glennsarti/events{/privacy}","received_events_url":"https://api.github.com/users/glennsarti/received_events","type":"User","site_admin":false},"repo":{"id":57316751,"name":"puppetlabs-registry","full_name":"glennsarti/puppetlabs-registry","owner":{"login":"glennsarti","id":5819622,"avatar_url":"https://avatars0.githubusercontent.com/u/5819622?v=4","gravatar_id":"","url":"https://api.github.com/users/glennsarti","html_url":"https://github.com/glennsarti","followers_url":"https://api.github.com/users/glennsarti/followers","following_url":"https://api.github.com/users/glennsarti/following{/other_user}","gists_url":"https://api.github.com/users/glennsarti/gists{/gist_id}","starred_url":"https://api.github.com/users/glennsarti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennsarti/subscriptions","organizations_url":"https://api.github.com/users/glennsarti/orgs","repos_url":"https://api.github.com/users/glennsarti/repos","events_url":"https://api.github.com/users/glennsarti/events{/privacy}","received_events_url":"https://api.github.com/users/glennsarti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/glennsarti/puppetlabs-registry","description":"Puppet Module for managing the Windows Registry through custom types and providers","fork":true,"url":"https://api.github.com/repos/glennsarti/puppetlabs-registry","forks_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/forks","keys_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/teams","hooks_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/hooks","issue_events_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/issues/events{/number}","events_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/events","assignees_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/assignees{/user}","branches_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/branches{/branch}","tags_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/tags","blobs_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/git/refs{/sha}","trees_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/statuses/{sha}","languages_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/languages","stargazers_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/stargazers","contributors_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/contributors","subscribers_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/subscribers","subscription_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/subscription","commits_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/commits{/sha}","git_commits_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/git/commits{/sha}","comments_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/comments{/number}","issue_comment_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/issues/comments{/number}","contents_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/contents/{+path}","compare_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/merges","archive_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/downloads","issues_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/issues{/number}","pulls_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/pulls{/number}","milestones_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/milestones{/number}","notifications_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/labels{/name}","releases_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/releases{/id}","deployments_url":"https://api.github.com/repos/glennsarti/puppetlabs-registry/deployments","created_at":"2016-04-28T16:18:40Z","updated_at":"2016-04-28T16:18:41Z","pushed_at":"2017-12-20T07:09:47Z","git_url":"git://github.com/glennsarti/puppetlabs-registry.git","ssh_url":"git@github.com:glennsarti/puppetlabs-registry.git","clone_url":"https://github.com/glennsarti/puppetlabs-registry.git","svn_url":"https://github.com/glennsarti/puppetlabs-registry","homepage":"http://forge.puppetlabs.com/puppetlabs/registry","size":381,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"fb8ed270c6095a7bb8e1064c6dadcaed3956057d","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","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":4066832,"name":"puppetlabs-registry","full_name":"puppetlabs/puppetlabs-registry","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","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/puppetlabs-registry","description":"Puppet Module for managing the Windows Registry through custom types and providers","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry","forks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/deployments","created_at":"2012-04-18T18:29:09Z","updated_at":"2017-09-05T23:22:42Z","pushed_at":"2017-12-20T07:09:49Z","git_url":"git://github.com/puppetlabs/puppetlabs-registry.git","ssh_url":"git@github.com:puppetlabs/puppetlabs-registry.git","clone_url":"https://github.com/puppetlabs/puppetlabs-registry.git","svn_url":"https://github.com/puppetlabs/puppetlabs-registry","homepage":"http://forge.puppetlabs.com/puppetlabs/registry","size":373,"stargazers_count":22,"watchers_count":22,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":61,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":61,"open_issues":5,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/142"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-registry/pull/142"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/issues/142"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/issues/142/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/142/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/pulls/142/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-registry/statuses/86bd7c0525e1a644195358f0e11e7f0ebdc7a48c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"clairecadman"}}