},
{
:release => 'custom',
+ },
+ {
+ :architecture => 'amd64',
}
].each do |param_set|
describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do
let :content do
content = "# #{title}"
- content << "\ndeb #{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n"
+ if param_hash[:architecture]
+ arch = "[arch=#{param_hash[:architecture]}]"
+ end
+ content << "\ndeb #{arch} #{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n"
+
if param_hash[:include_src]
- content << "deb-src #{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n"
+ content << "deb-src #{arch} #{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n"
end
content
end
# <%= @name %>
-deb <%= @location %> <%= @release_real %> <%= @repos %>
+deb <% if @architecture %>[arch=<%= @architecture %>]<% end %> <%= @location %> <%= @release_real %> <%= @repos %>
<%- if @include_src then -%>
-deb-src <%= @location %> <%= @release_real %> <%= @repos %>
+deb-src <% if @architecture %>[arch=<%= @architecture %>]<% end %> <%= @location %> <%= @release_real %> <%= @repos %>
<%- end -%>