From ab0327bc672199b73ffe703e7546c87f10d530ae 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 58c9c85775bd3f8d0fd06f17799c5cd3b072f2e9 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 04114f920b117ffb07e1987656e3e8f19800750d 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