From: Andreas Mauf Date: Mon, 14 Dec 2015 09:20:40 +0000 (+0100) Subject: MODULES-2889 - remove unneeded whitespace in source.list template X-Git-Tag: 2.2.2~10^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6698cbe94bffec8469fe82b8dfafffe2ee3e6089;hp=72528a014c8ffc87938097b15c86311e0a0294f2;p=puppet-modules%2Fpuppetlabs-apt.git MODULES-2889 - remove unneeded whitespace in source.list template --- diff --git a/spec/defines/source_compat_spec.rb b/spec/defines/source_compat_spec.rb index 2e813f3..0b98176 100644 --- a/spec/defines/source_compat_spec.rb +++ b/spec/defines/source_compat_spec.rb @@ -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 diff --git a/spec/defines/source_spec.rb b/spec/defines/source_spec.rb index 8a2cfcc..cfae55c 100644 --- a/spec/defines/source_spec.rb +++ b/spec/defines/source_spec.rb @@ -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 diff --git a/templates/source.list.erb b/templates/source.list.erb index fe7f559..84cd2cf 100644 --- a/templates/source.list.erb +++ b/templates/source.list.erb @@ -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 -%>