From 953a921188b98c0f2ca7a48015334a06c1d6a436 Mon Sep 17 00:00:00 2001 From: darkstego Date: Thu, 2 Feb 2017 16:47:05 -0500 Subject: [PATCH 1/3] Switched apt::source key from string to hash. --- manifests/package/debian.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/package/debian.pp b/manifests/package/debian.pp index af9efccab..08e074a14 100644 --- a/manifests/package/debian.pp +++ b/manifests/package/debian.pp @@ -37,21 +37,21 @@ apt::source { 'nginx': location => "https://nginx.org/packages/${distro}", repos => 'nginx', - key => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62', + key => {'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62'}, } } 'nginx-mainline': { apt::source { 'nginx': location => "https://nginx.org/packages/mainline/${distro}", repos => 'nginx', - key => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62', + key => {'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62'}, } } 'passenger': { apt::source { 'nginx': location => 'https://oss-binaries.phusionpassenger.com/apt/passenger', repos => 'main', - key => '16378A33A6EF16762922526E561F9B9CAC40B2F7', + key => {'id' => '16378A33A6EF16762922526E561F9B9CAC40B2F7'}, } ensure_packages([ 'apt-transport-https', 'ca-certificates' ]) From 6d29d54c81e9096b7cc6e170e26902d6619c1bab Mon Sep 17 00:00:00 2001 From: darkstego Date: Sun, 5 Feb 2017 21:50:14 -0500 Subject: [PATCH 2/3] Updated unit test to check for new Apt syntax --- spec/classes/nginx_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/classes/nginx_spec.rb b/spec/classes/nginx_spec.rb index 53ad6ddf5..b56d291b1 100644 --- a/spec/classes/nginx_spec.rb +++ b/spec/classes/nginx_spec.rb @@ -159,7 +159,7 @@ is_expected.to contain_apt__source('nginx').with( 'location' => "https://nginx.org/packages/#{operatingsystem.downcase}", 'repos' => 'nginx', - 'key' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' + 'key' => {'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62'} ) end it { is_expected.to contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::debian]') } @@ -183,7 +183,7 @@ is_expected.to contain_apt__source('nginx').with( 'location' => 'https://oss-binaries.phusionpassenger.com/apt/passenger', 'repos' => 'main', - 'key' => '16378A33A6EF16762922526E561F9B9CAC40B2F7' + 'key' => {'id' => '16378A33A6EF16762922526E561F9B9CAC40B2F7'} ) end end From 3962ab3cd8b0621f33ea80174d082410705da8b5 Mon Sep 17 00:00:00 2001 From: darkstego Date: Tue, 7 Feb 2017 16:38:59 -0500 Subject: [PATCH 3/3] Added Spaces in the curly brackets so RuboCop-san will be happy. --- spec/classes/nginx_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/classes/nginx_spec.rb b/spec/classes/nginx_spec.rb index b56d291b1..9ac82295a 100644 --- a/spec/classes/nginx_spec.rb +++ b/spec/classes/nginx_spec.rb @@ -159,7 +159,7 @@ is_expected.to contain_apt__source('nginx').with( 'location' => "https://nginx.org/packages/#{operatingsystem.downcase}", 'repos' => 'nginx', - 'key' => {'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62'} + 'key' => { 'id' => '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62' } ) end it { is_expected.to contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::debian]') } @@ -183,7 +183,7 @@ is_expected.to contain_apt__source('nginx').with( 'location' => 'https://oss-binaries.phusionpassenger.com/apt/passenger', 'repos' => 'main', - 'key' => {'id' => '16378A33A6EF16762922526E561F9B9CAC40B2F7'} + 'key' => { 'id' => '16378A33A6EF16762922526E561F9B9CAC40B2F7' } ) end end