Skip to content
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

issue #170: Produce proper DNS quoted strings for TXT and SPF records #171

Merged
merged 5 commits into from Aug 18, 2016
Merged

issue #170: Produce proper DNS quoted strings for TXT and SPF records #171

merged 5 commits into from Aug 18, 2016

Conversation

ghost
Copy link

@ghost ghost commented Aug 15, 2016

#170 This change modifies the zone_record.erb template so that it

processes the data values for TXT and SPF records to produce proper
DNS quoted strings (of no more than 255 characters, with embedded
quotes and backslashes escaped with backslashes).

It also adds SPEC tests for the TXT record type.

This change modifies the `zone_record.erb` template so that it
processes the data values for TXT and SPF records to produce proper
DNS quoted strings (of no more than 255 characters, with embedded
quotes and backslashes escaped with backslashes).

It also adds SPEC tests for the TXT record type.
# for TXT and SPF records, transform the data item into a valid text record value:
# use String.unpack to split the text value into 255 character chunks;
# then use Array.collect to turn each chunk into a valid quoted character string;
# finally join the quoted character strings together, separated by a space.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did a great job documenting why we do this in the issue, can you put the abridged version here? (at least link to the RFC)

@solarkennedy
Copy link
Collaborator

Still just want a docstring so it is noted "somewhere" that a user doesn't have to do their own escaping.

Also @danzilio @ajjahn, @jearls is the #3 contributor and the last pull requests have all only needed minor adjustments. I recommend giving them collaborator access. (so a least one less fork)

@ghost
Copy link
Author

ghost commented Aug 17, 2016

I guess I don't understand what you are asking for. What do you mean by a docstring? Do you mean you want the comment block at the top of manifests/record/txt.pp filled out?

@solarkennedy
Copy link
Collaborator

Yes. I would link you to the "puppet doc" format to that but they've removed in favor of the "puppet strings" stuff which isn't fully baked yet.

@ghost
Copy link
Author

ghost commented Aug 17, 2016

Markdown source code for last version of Puppet style guide that included the Puppet Doc section: https://raw.githubusercontent.com/puppetlabs/puppet-docs/462e3350c548d2b0ee9c91d2a68aabb9b6d2c87e/source/guides/style_guide.markdown - go to the end for section 13 on Puppet Doc

@solarkennedy solarkennedy merged commit ec4af41 into ajjahn:master Aug 18, 2016
@solarkennedy
Copy link
Collaborator

Thanks!

@darkfoxprime darkfoxprime deleted the #170-properly-format-txt-records branch August 25, 2016 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants