-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to PDK, fix log behavior with newer Puppet #44
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Make sure mocks run with mocha
This commit fixes multiple issues found with the ruby code and spec tests as documented by Rubocop. Add some recommend extensions Document variable shadow with no clear resolution It is unclear if assignment on line 336 is supposed to be to "v" instead of "value" Use Ruby 1.9 hash format Use not_to instead of to_not Use %r around regex Single quotes around string literals Fixup most lint level rubocop warnings Remove "should" from example wording Use map instead of collect Use new key methods Rename is_to_s to to_s? Use start_with rather than anchored regex Clear up duplicate resource names in spec tests Fixup abiguous assignment and compare statements. Use throwaway value for unused variables Update error type for some specs to RuntimeError
Regex in a start_with call isn't available in Ruby 2.4, and using a regex in start_with removes any performance benefits of start_with anyway.
Still seeing the underlying bug with #43 on this updated branch, working on this some more. |
It turns out that the @property_hash for the resource is mostly empty, as if the type isn't populating it fully before passing it on to the provider.
|
The type uses ruby symbols for the name, but the provider was using strings inside the inspect method. The create method did not get all of the parameters it needed from the resource object. Instances were not being destroyed properly. Flush was always getting called even if the object wasn't "dirty."
OK this is ready to merge. It turns out there were a number of issues, the biggest of which were:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Convert the module to use the latest, greatest Puppet development kit.
Lint fix various puppet modules
Fix multiple issues with the ruby code, including some ambiguous assignments and comparisons that weren't evaluating in the right order on all versions of ruby.
This pull request is admittedly a big one, but there wasn't an easy way for me to check for various Ruby ambiguities without having a working rubocop or test framework around.
Unit tests now pass for Puppet 5, 6, and 7.
Fixes #43