-
-
Notifications
You must be signed in to change notification settings - Fork 881
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
Use double, vs single quotes around add_header values (#991) #992
Conversation
TODO: also need to add a test case where a value has single quotes in it, e.g., |
@xaque208 @bastelfreak does this change make sense to you all? |
@wyardley This looks like the tests are lying to us. That |
@xaque208 IIRC, we use For example (I'm not a Ruby person, so sorry if this is not the best or most idiomatic):
returns
|
@rnelson0 @bastelfreak Any thoughts on the tests issue? Also, more generally, does anyone have an opinion about whether there are any cases where the change to double quotes would cause a problem here? |
I don't see how it would matter here, since this is inside the plain text portion of the ERB, not the interpreted portion. Because we don't know how it is passing, I would change either L1199 or L1205-1207 so they do not match and see how that behaves. |
Seems to still pass for me even if I change puppet-nginx/spec/defines/resource_server_spec.rb Line 1199 in 1d903c1
|
Wow, that's amazing, clearly a bad test. |
@xaque208 looking at it more closely, this does seem kind of odd to me; not totally getting why there are the nested %r expressions:
Having it all on one line does seem to work, though it's messy and make a long line (but does pass rubocop)
|
This will also work, though not sure if it's an improvement in terms of readability. |
I'm going to update it to use the test that should actually work, even if it could be formatted more nicely... if folks have suggestions on how to do it in a prettier way, let me know. |
@wyardley This looks better to me. |
Use double, vs single quotes around add_header values (voxpupuli#991)
Use double, vs single quotes around add_header values (voxpupuli#991)
Not sure how
https://github.com/voxpupuli/puppet-nginx/blob/master/spec/defines/resource_server_spec.rb#L1197-L1227
passes either before / after, but this seems to pass tests. I'm going to mark this as in-progress, though.