]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Trusted will be a reserved word in Puppet 4
authorMorgan Haskel <morgan@puppetlabs.com>
Wed, 21 Jan 2015 18:54:37 +0000 (10:54 -0800)
committerMorgan Haskel <morgan@puppetlabs.com>
Wed, 21 Jan 2015 18:54:37 +0000 (10:54 -0800)
Rename the new `trusted` parameter to `trusted_source`.

README.md
manifests/source.pp
spec/defines/source_spec.rb
templates/source.list.erb

index 554561d6ba48cfd0ccdeb04f9cfef1b225bf94ed..04bb3392dd7c0a353bc89cf24fa69b5df5000802 100644 (file)
--- a/README.md
+++ b/README.md
@@ -303,7 +303,7 @@ apt::sources:
 * `key_source`: See apt::key
 * `pin`: See apt::pin
 * `architecture`: can be used to specify for which architectures information should be downloaded. If this option is not set all architectures defined by the APT::Architectures option will be downloaded. Defaults to 'undef' which means all. Example values can be 'i386' or 'i386,alpha,powerpc'
-* `trusted` can be set to indicate that packages from this source are always authenticated even if the Release file is not signed or the signature can't be checked. Defaults to false. Can be 'true' or 'false'.
+* `trusted_source` can be set to indicate that packages from this source are always authenticated even if the Release file is not signed or the signature can't be checked. Defaults to false. Can be 'true' or 'false'.
 
 ### Testing
 
index 04c367119ac941d626c2a430409f650bb81b6a18..c5ed3a640289d30b1362e1b5a789fc1645e9fb68 100644 (file)
@@ -16,14 +16,14 @@ define apt::source(
   $key_source        = undef,
   $pin               = false,
   $architecture      = undef,
-  $trusted           = false,
+  $trusted_source    = false,
 ) {
 
   include apt::params
   include apt::update
 
   validate_string($architecture)
-  validate_bool($trusted)
+  validate_bool($trusted_source)
 
   $sources_list_d = $apt::params::sources_list_d
   $provider       = $apt::params::provider
index ae47ccf91e6e5dc825b54afaa26b3c0a7cf31a82..b4d379902ddf49fb1bf37865c64ecbdc0138217f 100644 (file)
@@ -55,7 +55,7 @@ describe 'apt::source', :type => :define do
         'key_source'        => 'http://apt.puppetlabs.com/pubkey.gpg',
         'pin'               => '10',
         'architecture'      => 'x86_64',
-        'trusted'           => true,
+        'trusted_source'    => true,
       }
     end
 
@@ -94,7 +94,7 @@ describe 'apt::source', :type => :define do
     }
   end
 
-  context 'trusted true' do
+  context 'trusted_source true' do
     let :facts do
       {
         :lsbdistid       => 'Debian',
@@ -104,8 +104,8 @@ describe 'apt::source', :type => :define do
     end
     let :params do
       {
-        'include_src' => false,
-        'trusted'     => true,
+        'include_src'    => false,
+        'trusted_source' => true,
       }
     end
 
index f9a878e509e377e139955084194a7de955c7844b..75147667b50eaf61a6fbe510caa2def1be984777 100644 (file)
@@ -1,12 +1,12 @@
 #file generated by puppet
 # <%= @comment %>
 <%- if @include_deb then -%>
-deb <%- if @architecture or @trusted -%>
-[<%- if @architecture %>arch=<%= @architecture %> <% end %><% if @trusted %>trusted=yes<% end -%>
+deb <%- if @architecture or @trusted_source -%>
+[<%- if @architecture %>arch=<%= @architecture %> <% end %><% if @trusted_source %>trusted=yes<% end -%>
 ] <%- end %><%= @location %> <%= @release_real %> <%= @repos %>
 <%- end -%>
 <%- if @include_src then -%>
-deb-src <%- if @architecture or @trusted -%>
-[<%- if @architecture %>arch=<%= @architecture %> <% end %><% if @trusted %>trusted=yes<% end -%>
+deb-src <%- if @architecture or @trusted_source -%>
+[<%- if @architecture %>arch=<%= @architecture %> <% end %><% if @trusted_source %>trusted=yes<% end -%>
 ] <%- end %><%= @location %> <%= @release_real %> <%= @repos %>
 <%- end -%>