Skip to content

Commit

Permalink
Merge pull request #489 from dhoppe/fix_provider
Browse files Browse the repository at this point in the history
Remove support for providers yum, zypper
  • Loading branch information
bastelfreak authored May 26, 2019
2 parents 461f8d1 + 91fb9b9 commit 13279bc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 46 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -778,11 +778,9 @@ The name of the package to be installed via the provider
##### `provider`
The supported installation modes for this module

* yum
* bundle
* puppet_gem
* gem
* zypper

##### `install_options`
Options to pass to the `provider` declaration
Expand Down
5 changes: 2 additions & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
$real_package_name = 'ruby22-r10k'
}
}
'yum': { $real_package_name = 'rubygem-r10k' }
default: { $real_package_name = 'r10k' }
}
} else {
Expand All @@ -30,7 +29,7 @@
'bundle': {
include r10k::install::bundle
}
'puppet_gem', 'gem', 'openbsd', 'yum', 'zypper': {
'puppet_gem', 'gem', 'openbsd': {
if $provider == 'gem' {
class { 'r10k::install::gem':
manage_ruby_dependency => $manage_ruby_dependency,
Expand Down Expand Up @@ -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'") }
}
}
41 changes: 0 additions & 41 deletions spec/classes/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,47 +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

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

0 comments on commit 13279bc

Please sign in to comment.