#
# This file is managed by puppet class 'uwsgi::app'
#
# uwsgi app config for '<%= @name %>'
#
[uwsgi]
uid = <%= @uid %>
gid = <%= @gid %>
<%
if @application_options
  @application_options.sort.each do |key, value|
-%>
<%= key %> = <%= value%>
<%
  end
end

if @environment_variables
  @environment_variables.sort.each do |key, value|
-%>
env = <%= key %>=<%= value %>
<%
  end
end
-%>

#
# This file is managed by puppet class 'uwsgi::app'
#
# uwsgi app config for '<%= @name %>'
#
[uwsgi]
uid = <%= @uid %>
gid = <%= @gid %>
<%
if @application_options
  @application_options.sort.each do |key, value|
    if value.is_a? Array
      value.each do |v|
-%>
<%= key %> = <%= v%>
<%
      end
    else
-%>
<%= key %> = <%= value%>
<%
    end
  end
end

if @environment_variables
  @environment_variables.sort.each do |key, value|
-%>
env = <%= key %>=<%= value %>
<%
  end
end
-%>

Support repeated application options by passing an array of values
Support repeated application options by passing an array of values

The motivating example was:

  $application_options => {
    py-autoreload => 1,
    touch-reload => [
      'file1',
      'file2',
      'file3',
    ],
  }

Signed-off-by: Ray Lehtiniemi <87d85b9f6da1e02702161aa067fc687173810d2f@mail.com>
