From d41bd0d50c8f42a094fcfda7bfdf93756c9f7278 Mon Sep 17 00:00:00 2001 From: Dennis Hoppe Date: Fri, 10 May 2019 14:52:49 +0200 Subject: [PATCH 1/2] Remove support for provider `yum` --- README.md | 1 - manifests/install.pp | 5 ++--- spec/classes/install_spec.rb | 17 ----------------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index e197a886..f08a83f2 100644 --- a/README.md +++ b/README.md @@ -778,7 +778,6 @@ The name of the package to be installed via the provider ##### `provider` The supported installation modes for this module -* yum * bundle * puppet_gem * gem diff --git a/manifests/install.pp b/manifests/install.pp index eadeeef4..c180f5f4 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -19,7 +19,6 @@ $real_package_name = 'ruby22-r10k' } } - 'yum': { $real_package_name = 'rubygem-r10k' } default: { $real_package_name = 'r10k' } } } else { @@ -30,7 +29,7 @@ 'bundle': { include r10k::install::bundle } - 'puppet_gem', 'gem', 'openbsd', 'yum', 'zypper': { + 'puppet_gem', 'gem', 'openbsd', 'zypper': { if $provider == 'gem' { class { 'r10k::install::gem': manage_ruby_dependency => $manage_ruby_dependency, @@ -63,6 +62,6 @@ } } - default: { fail("${module_name}: ${provider} is not supported. Valid values are: 'gem', 'puppet_gem', 'bundle', 'openbsd', 'yum', 'zypper'") } + default: { fail("${module_name}: ${provider} is not supported. Valid values are: 'gem', 'puppet_gem', 'bundle', 'openbsd', 'zypper'") } } } diff --git a/spec/classes/install_spec.rb b/spec/classes/install_spec.rb index 01791461..4a341aa6 100644 --- a/spec/classes/install_spec.rb +++ b/spec/classes/install_spec.rb @@ -149,23 +149,6 @@ it { is_expected.to contain_class('r10k::install::bundle') } it { is_expected.not_to contain_package('r10k') } end - - context 'with yum provider' do - let :params do - { - install_options: '', - keywords: '', - manage_ruby_dependency: 'declare', - package_name: 'rubygem-r10k', - provider: 'yum', - version: 'latest', - puppet_master: true - } - end - - it { is_expected.not_to contain_class('git') } - it { is_expected.to contain_package('rubygem-r10k') } - end end end From 91fb9b91960fff03ed7a5d024a93ef00fc5cdb7b Mon Sep 17 00:00:00 2001 From: Dennis Hoppe Date: Mon, 20 May 2019 11:39:21 +0200 Subject: [PATCH 2/2] Remove support for provider `zypper` --- README.md | 1 - manifests/install.pp | 4 ++-- spec/classes/install_spec.rb | 24 ------------------------ 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index f08a83f2..28b8a3dc 100644 --- a/README.md +++ b/README.md @@ -781,7 +781,6 @@ The supported installation modes for this module * bundle * puppet_gem * gem -* zypper ##### `install_options` Options to pass to the `provider` declaration diff --git a/manifests/install.pp b/manifests/install.pp index c180f5f4..f997738f 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -29,7 +29,7 @@ 'bundle': { include r10k::install::bundle } - 'puppet_gem', 'gem', 'openbsd', 'zypper': { + 'puppet_gem', 'gem', 'openbsd': { if $provider == 'gem' { class { 'r10k::install::gem': manage_ruby_dependency => $manage_ruby_dependency, @@ -62,6 +62,6 @@ } } - default: { fail("${module_name}: ${provider} is not supported. Valid values are: 'gem', 'puppet_gem', 'bundle', 'openbsd', 'zypper'") } + default: { fail("${module_name}: ${provider} is not supported. Valid values are: 'gem', 'puppet_gem', 'bundle', 'openbsd'") } } } diff --git a/spec/classes/install_spec.rb b/spec/classes/install_spec.rb index 4a341aa6..ecd0c007 100644 --- a/spec/classes/install_spec.rb +++ b/spec/classes/install_spec.rb @@ -151,28 +151,4 @@ end end end - - context 'with zypper provider' do - let :params do - { - install_options: '', - keywords: '', - manage_ruby_dependency: 'declare', - package_name: 'r10k', - provider: 'zypper', - version: 'latest', - puppet_master: true - } - end - let :facts do - { - osfamily: 'Suse', - operatingsystemrelease: '11.3', - puppetversion: Puppet.version - } - end - - it { is_expected.not_to contain_class('git') } - it { is_expected.to contain_package('r10k') } - end end