-
Notifications
You must be signed in to change notification settings - Fork 19
Improve viewer class (fully qualify ht_crypt, add tests & pdk update) #58
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
Conversation
Hey folks - Just prodding this PR here. Without the changes proposed in this PR, the viewer class is broken on modern versions of Puppet. |
@DLeich The repo just migrated to Voxpupuli. Lets give this PR the love it deserves :-) |
This is commented out and not required anymore.
The new HTTP client was introduced in puppetlabs/puppet#7826. First released in Puppet 6.11.0. The old HTTP client is deprecated. The new implementation makes it quite easy to configure additional/custom TLS certificates. I plan to implement that in another PR.
Previously if the only change in a class was a parameter's data type from a `Float` to a `String`, then the class resource would be marked as different, but [str_diff](https://github.com/camptocamp/puppet-catalog-diff/blob/b7f3031e380502eb6154242b1710b9ab7c105b42/lib/puppet/catalog-diff/comparer.rb#L130) would return `nil` causing a `Error: undefined method split' for nil:NilClass` error [here](https://github.com/camptocamp/puppet-catalog-diff/blob/b7f3031e380502eb6154242b1710b9ab7c105b42/lib/puppet/catalog-diff/comparer.rb#L60) Fixes voxpupuli#32
There is no benefit of calling `validate_encoding()` twice if the checksums are equal. We can exit early.
Previously we called `validate_encoding()` to force the old/new strings to be UTF8. Afterwards we exit if one (or both) of the strings are `nil`. If they are actuall `nil`, `validate_encoding()` will fail. Hence it makes sense to move the return statement above the `validate_encoding()` calls.
I'm stuck in a loop trying to rebase this branch. I'm going to redo my changes fresh and open a new PR. |
@DLeich Maybe https://chuva-inc.com/blog/fast-tip-enable-git-rerere-right-now |
Closing this and replacing with #88 |
The viewer class was failing to compile when used on puppet 7. This is because the ht_crypt function usage needed to be fully qualified. While I was fixing this, I figured I might as well also add a basic spec test, which also required running
pdk update
.