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

use of arrays and keys in custom_cfg_[prepend,append].. #273

Closed
wants to merge 15 commits into from

Conversation

grooverdan
Copy link
Contributor

location_cfg_{prepend,append} and vhost_cfg_{ssl_,}{prepend,append} parameters.

Forms a merger of #266 and #201

Doing a separate PR to see if travis passes it.

ese and others added 14 commits March 5, 2014 17:05
Allow arrays to be specified as values in location_cfg_{prepend,append} and
vhost_cfg_{ssl_,}{prepend,append} parameters.
Resolved Conflicts:
	spec/defines/resource_location_spec.rb
	templates/vhost/vhost_location_alias.erb
	templates/vhost/vhost_location_directory.erb
	templates/vhost/vhost_location_empty.erb
	templates/vhost/vhost_location_fastcgi.erb
	templates/vhost/vhost_location_proxy.erb
	templates/vhost/vhost_location_stub_status.erb
…eader,footer}. fix vhost_location_alias/vhost_location_directory. Add {location_custom_cfg_prepend,append} to vhost_location_fastcgi, vhost_location_proxy and vhost_location_stub_status.
@grooverdan
Copy link
Contributor Author

also closes #207 and #174

@ese
Copy link
Contributor

ese commented Mar 12, 2014

related to your last commit, sort_by is neccesary becouse its expected order values.

I see two type of errors

     Failure/Error: (lines & Array(param[:match])).should == Array(param[:match])
       expected: ["    allow test value 3;", "    test1 test value 1a;", "    test1 test value 1b;", "    test2 test value 2;", "    test4 subtest1 \"sub test value1a\";", "    test4 subtest1 \"sub test value1b\";", "    test4 subtest2 \"sub test value2\";"]
            got: ["    allow test value 3;", "    test1 test value 1a;", "    test1 test value 1b;", "    test2 test value 2;"] (using ==)

This is caused by different spacing

<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%>
<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%>
<% Array(subvalue).each do |asubvalue| -%>
   <%= key %> <%= subkey %> <%= asubvalue %>;
<% end -%>
<% end -%><% else -%>
<% Array(value).each do |asubvalue| -%>
    #<%= key %> <%= asubvalue %>;
<% end -%>
<% end -%>

I replaced the extra space with # to highlight it

     Failure/Error: (lines & Array(param[:match])).should == Array(param[:match])
       expected: ["    allow test value 3;", "    test1 test value 1a;", "    test1 test value 1b;", "    test2 test value 2;", "    test4 subtest1 \"sub test value1a\";", "    test4 subtest1 \"sub test value1b\";", "    test4 subtest2 \"sub test value2\";"]
            got: ["    allow test value 3;", "    test1 test value 1a;", "    test1 test value 1b;", "    test2 test value 2;", "    test4 subtest2 \"sub test value2\";", "    test4 subtest1 \"sub test value1a\";"] (using ==)

In this case seems not render test4 subtest1 "sub test value1b"; but all test that i did it was render fine and i cant resolve it :(

@grooverdan
Copy link
Contributor Author

related to your last commit, sort_by is neccesary

Opps. forgot to push the revert. Done now.

  1. ... spacing

fixed in two places.

:( yep, saw that. I can't see the cause either.

@grooverdan
Copy link
Contributor Author

closing - see #266

@grooverdan grooverdan closed this Mar 17, 2014
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