MODULES-2889 - remove unneeded whitespace in source.list template
authorAndreas Mauf <a.mauf@syseleven.de>
Mon, 14 Dec 2015 09:20:40 +0000 (10:20 +0100)
committerAndreas Mauf <a.mauf@syseleven.de>
Mon, 14 Dec 2015 09:20:40 +0000 (10:20 +0100)
spec/defines/source_compat_spec.rb
spec/defines/source_spec.rb
templates/source.list.erb

index 2e813f327bfbfe318a4882819f1df001e6334aa6..0b98176e2a6923f177e38b0c79bdb4e7e8090014 100644 (file)
@@ -117,7 +117,7 @@ describe 'apt::source', :type => :define do
       }
     end
 
-    it { is_expected.to contain_apt__setting('list-my_source').with_content(/# my_source\ndeb \[arch=x86_64 \] http:\/\/debian\.mirror\.iweb\.ca\/debian\/ wheezy main\n/)
+    it { is_expected.to contain_apt__setting('list-my_source').with_content(/# my_source\ndeb \[arch=x86_64\] http:\/\/debian\.mirror\.iweb\.ca\/debian\/ wheezy main\n/)
     }
   end
 
index 8a2cfcc7475698bb477061131c885475eb15ea28..cfae55cc8f7e2ae01989a4fd2e26dedde6687bad 100644 (file)
@@ -227,7 +227,7 @@ describe 'apt::source' do
 
     it { is_expected.to contain_apt__setting('list-my_source').with({
       :ensure => 'present',
-    }).with_content(/# my_source\ndeb-src \[arch=x86_64 \] hello.there wheezy main\n/)
+    }).with_content(/# my_source\ndeb-src \[arch=x86_64\] hello.there wheezy main\n/)
     }
   end
 
index fe7f55941a1ac43098ed15b2e9aed0461818d499..84cd2cf72862bedcb557823b6d5a690cd6119b10 100644 (file)
@@ -1,11 +1,9 @@
 # <%= @comment %>
 <%- if @_include['deb'] then -%>
 deb <%- if @architecture or @_allow_unsigned -%>
-[<%- if @architecture %>arch=<%= @architecture %> <% end %><% if @_allow_unsigned %>trusted=yes<% end -%>
-] <%- end %><%= @location %> <%= @_release %> <%= @repos %>
+[<%- if @architecture %>arch=<%= @architecture %><% end %><%if @architecture and @_allow_unsigned %> <% end%><% if @_allow_unsigned %>trusted=yes<% end %>] <%- end %><%= @location %> <%= @_release %> <%= @repos %>
 <%- end -%>
 <%- if @_include['src'] then -%>
 deb-src <%- if @architecture or @_allow_unsigned -%>
-[<%- if @architecture %>arch=<%= @architecture %> <% end %><% if @_allow_unsigned %>trusted=yes<% end -%>
-] <%- end %><%= @location %> <%= @_release %> <%= @repos %>
+[<%- if @architecture %>arch=<%= @architecture %><% end %><%if @architecture and @_allow_unsigned %> <% end%><% if @_allow_unsigned %>trusted=yes<% end %>] <%- end %><%= @location %> <%= @_release %> <%= @repos %>
 <%- end -%>