Skip to content

Commit

Permalink
Merge pull request voxpupuli#77 from mayflower/param_ensure_handling
Browse files Browse the repository at this point in the history
$ensure handling for module and extensions
  • Loading branch information
fpletz committed Apr 29, 2015
2 parents f61066d + c214c2c commit fc9b34a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@

$real_extensions = hiera_hash('php::extensions', $extensions)
create_resources('::php::extension', $real_extensions, {
ensure => $ensure,
require => Class['::php::cli'],
before => Anchor['php::end']
})
Expand Down
4 changes: 2 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#
class php::params {

$ensure = 'latest'
$ensure = 'present'
$fpm_service_enable = true
$composer_source = 'https://getcomposer.org/composer.phar'
$composer_path = '/usr/local/bin/composer'
$composer_max_age = 30
$pear_ensure = 'latest'
$pear_ensure = 'present'
$pear_package_suffix = 'pear'
$phpunit_source = 'https://phar.phpunit.de/phpunit.phar'
$phpunit_path = '/usr/local/bin/phpunit'
Expand Down
14 changes: 7 additions & 7 deletions spec/classes/php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
describe 'when called with no parameters on Debian' do
it {
should contain_package('php5-cli').with({
'ensure' => 'latest',
'ensure' => 'present',
})
should contain_class('php::fpm')
should contain_package('php5-fpm').with({
'ensure' => 'latest',
'ensure' => 'present',
})
should contain_package('php5-dev').with({
'ensure' => 'latest',
'ensure' => 'present',
})
should contain_package('php-pear').with({
'ensure' => 'latest',
'ensure' => 'present',
})
should contain_class('php::composer')
}
Expand All @@ -31,13 +31,13 @@
:path => '/usr/local/bin:/usr/bin:/bin' } }
it {
should contain_package('php5').with({
'ensure' => 'latest',
'ensure' => 'present',
})
should contain_package('php5-devel').with({
'ensure' => 'latest',
'ensure' => 'present',
})
should contain_package('php5-pear').with({
'ensure' => 'latest',
'ensure' => 'present',
})
should_not contain_package('php5-cli')
should_not contain_package('php5-dev')
Expand Down

0 comments on commit fc9b34a

Please sign in to comment.