Merge pull request #127 from puppetlabs/stable
(maint) Stable mergeback
[MODULES-4556] Remove PE requirement from metadata.json
Merge pull request #128 from puppetlabs/MODULES-4556
[MODULES-4556] Remove PE requirement from metadata.json
[maint] modulesync e25ca9 - Add locales folder and config.yaml and up…
…date default nodeset
Merge pull request #129 from puppetlabs/modules-4528
[MODULES-4528] modulesync e25ca9 - Add locales folder and config.yaml and update default nodeset
[msync] 786266 Implement puppet-module-gems, a45803 Remove metadata.j…
…son from locales config
Merge pull request #130 from puppetlabs/modules-4506
[msync] 786266 Implement puppet-module-gems, a45803 Remove metadata.json from locales config
(MODULES-4835) Update puppet compatibility with 4.7 as lower bound
The Puppet Agent support is deprecated on many of the versions suggested in the metadata. This commit updates the lower bound of the dependency to puppet agent 4.7.0.
Merge pull request #131 from lbayerlein/master
(MODULES-4835) Update puppet compatibility with 4.7 as lower bound
(MODULES-4976) Remove rspec configuration for win32_console
Previously the spec_helper would configure rspec to output all to STDOUT due to issues with the win32_console gem. However as that gem was removed in Puppet 4, it is no longer required. Also by redirecting to stdout, when using the junit formatter, the output is sent to STDOUT instead of the specificed text file. This commit removes the redundant rpsec configuration.
Merge pull request #132 from glennsarti/ticket/master/modules-4976-fi…
…x-rspec Previously the spec_helper would configure rspec to output all to STDOUT due to issues with the win32_console gem. However as that gem was removed in Puppet 4, it is no longer required. Also by redirecting to stdout, when using the junit formatter, the output is sent to STDOUT instead of the specificed text file. This commit removes the redundant rpsec configuration.
(MODULES-5157) Constrain stdlib dependency
This commit constrains the stdlib dependency so that it is not open ended anymore
Merge pull request #134 from jpogran/ticket/master/MODULES-5157-open-…
…ended-stdlib-dependency (MODULES-5157) Constrain stdlib dependency
Merge pull request #133 from hunner/bump_metadata
(MODULES-5144) Prep for puppet 5
Merge pull request #135 from puppetlabs/msync_modules5187
(MODULES-5187) mysnc puppet 5 and ruby 2.4
Merge pull request #136 from puppetlabs/maint-modsync-915cde70e20
(maint) modulesync 915cde70e20
(maint) Modify beaker task to simulate direct beaker invocation
The acceptance tests for Registry are written in standard beaker format however the preferred method is using beaker-rspec. This commit overrides the default `beaker` task, which would normally use beaker-rspec, and instead invokes beaker directly. This is only need while the module tests are migrated to the newer rspec-beaker format.
Merge pull request #138 from glennsarti/fix-beaker-tests
(maint) Modify beaker rake task to invoke beaker directly
(maint) Add Github Pull Request Template
This commit adds a github pull request template to help users submit correctly formatted PR to our projects
Merge pull request #137 from puppetlabs/msync_18sep17_892c4cf
(maint) modulesync 892c4cf
Merge pull request #140 from jpogran/maint-gh-pull-request-template
(maint) Add Github Pull Request Template
(MODULES-5976) convert beaker tests to beaker rspec tests
Merge pull request #139 from ThoughtCrhyme/MODULES-5976
(MODULES-5976) convert beaker tests to beaker rspec tests
Merge pull request #141 from puppetlabs/maint_modsync_1d81b6a
(maint) - modulesync 1d81b6a
Merge pull request #144 from puppetlabs/maint_modsync_384f4c1
(maint) - modulesync 384f4c1
(MODULES-2957) Fix registry_value tests
Previously the tests for the registry_value type were incomplete or were not testing what they said they were. This commit; * Adds a compile test for when one resource is setting a default value and another is not, but shares the same name. A fix for this was implemented in 64bba67 however there were no tests for this behaviour * Fixed a bug in the canonicalising of path names which would append a backslash every time the method was called * Actually tested that multiple backslashes are removed on the path * Raised errors when an non default, but root only path was passed into a registry value. This is different to registry keys, where this is allowed. * Added tests for autorequiring of registry_key from registry_value resources * Added tests in the registry_value provider for creating and destroying default values * Added registry_value provider tests for case-insensitive exists? method and added for creating and destroying default values * Fixed typo in the registry_key type tests whereby it was actually testing the resource aliases, not the autorequire of the type
Merge pull request #143 from glennsarti/fix-tests
(MODULES-2957) Fix registry_value tests
Merge pull request #145 from michaeltlombardi/modsync
(maint) modulesync cd884db Remove AppVeyor OpenSSL update on Ruby 2.4
Merge pull request #147 from puppetlabs/msync_MODULES-6339
(maint) modulesync 65530a4 Update Travis
(maint) Remove Puppet 3 compatiblity code
Previously the registry module was compatible with older Puppet agent versions (< 4.7.0) however as the module only now supports 4.7.0 and above, much of this code can be removed. In particular many of the FFI calls and lower level API methods are now contained within Puppet itself. These should be used instead of the custom written ones in this module to reduce code duplication and reduce the testing burden. This commit removes duplicate code, mainly from the base class with some in the providers. This commit also moves the valuename method back into the registry_value provider as it is not used in the registry_key provider so there is no need for it to be shared.
(MODULES-2957) Refactor path shared extraction
Previously the path extraction in the PuppetX::Puppetlabs::Registry conflated validating paths and extracting valuenames from a path. Only the RegistryValuePath class required this functionality so it made no sense to be shared in the RegistryKeyPath class. The refactoring then assists in MODULES-2957 which will add support for backslashes in the value name. This commit: * Moves the valuename extraction from the filter_path method into the initializer for the RegistryValuePath method. This means that the path validation is actually happening on registry paths, not path + valuename. * Now that the valuename was moved out, the code could be simplified. This also meant the subkey method was now the same between then RegistryValuePath and RegistryKeyPath classes so it could be moved into the base class
(MODULES-2957) Add support for backslashes in registry value name
Previously it was not possible to modify a registry value with a backslash in the name as the existing code used backslashes as the delimiter for registry key paths. As registry key names cannot have a backslash or be empty, the delimiter between a registry key path and value is changed to a double backslash for example: HKLM\Software\Vendor\\ValueWithA\Backslash. In this case the registry key path would be 'HKLM\Software\Vendor' and the value name 'ValueWithA\Backslash'. This commit: * Uses a double backslash by default to determine the key path and valuename from a resource title, but will revert back to the old behaviour (single backslash) if none are found * Adds tests to show the new functionality in the custom type (registry_value), the defined helper type (registry::value) and in the purging of registry_key resources
(MODULES-2957) Make value purging case insensitive
Previously when purging values, the search was case insensitive which meant some registry values would be deleted or not be deleted in error. This commit changes the eval_generate method so it compares value lists in a case insensitive way.
(MODULES-2957) Refactor provider base as module
Previously the ProviderBase was a mixin module that provided only a few common methods. However due to how puppet resource and puppet apply instantiates the object, some methods could be missing. This commit refactors the ProviderBase from a mixin back to "vanilla" method calls which removes the instantiation issue. This also moves the FFI definition into registry_value as it is not shared in registry_key. While this does result in slightly more lines of code, it is far more readable with much less indirection.
(MODULES-2957) Use Puppet 4 Data Types
Previously this module used avalidation functions from stdlib which are now deprecated due to Puppet 4 Data types. This commit: * Changes the validate_re functions to use Puppet 4 data types * Removes the stdlib dependency as it is no longer required * Adds tests for the registry::value class for parameter validation
Previously the README contained outdated or conflicting information: * The registry::value defined type is a combination of registry_key and registry_value types. It contained conflicting information about raising errors if the parent keys did not exist. It also stated that it did not support the `32:` prefix but the registry_key type does.
Merge pull request #146 from glennsarti/ticket/master/modules-2957-ba…
…ckslash-take2 (MODULES-2957) Add support for backslashes in registry value name
(MODULES-2957) Remove unneeded Windows guard
- Some constants appearing in class methods were guarded as they're only available on Windows platforms. However, since these constants appear in methods that are never touched in specs on non-Windows platforms, the guard is unnecessary.
(MODULES-2957) Refactor RegistryValuePath parsing
- Existing code has a heuristic for string splitting that can be mapped to simpler code. Giving existing test coverage, no additional tests should be necessary.
(MODULES-2957) RegistryValuePath missing \ error
- Previous code entered a flow that made little sense, given paths without at least a single \ are unsupported. For instance, `hklm` is invalid, but `hklm\` is considered valid per the documentation inside specs of type\registry_value_spec.rb Raising an error was deferred unnecessarily to the valid? check implemented on the base class, but is fixed here to make the code easier to understand.
(MODULES-2957) Refactor RegistryValuePath ctor
- Given the modifications to validation in the previous commit, the initializer for RegistryValuePath can once again be simplified.
Merge pull request #148 from Iristyle/MODULES-2957-cleanup
(MODULES-2957) Simplify code from merge of PR #146