Skip to content

Commit

Permalink
Merge pull request #139 from mklette/fix-for-strict_variables
Browse files Browse the repository at this point in the history
compatibiliy fix: ensure variables are defined
  • Loading branch information
solarkennedy committed Jun 19, 2015
2 parents a9ab506 + 8e7f43f commit a196ac3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
- PUPPET_VERSION="~> 3.4.0"
- PUPPET_VERSION="~> 3.5.0"
- PUPPET_VERSION="~> 3.7.0"
- PUPPET_VERSION="~> 3.7.4" FUTURE_PARSER=yes
- PUPPET_VERSION="~> 3.7.4" FUTURE_PARSER=yes STRICT_VARIABLES=yes
matrix:
exclude:
- rvm: 1.9.3
Expand Down
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,14 @@

if $config_hash_real['data_dir'] {
$data_dir = $config_hash_real['data_dir']
} else {
$data_dir = undef
}

if $config_hash_real['ui_dir'] {
$ui_dir = $config_hash_real['ui_dir']
} else {
$ui_dir = undef
}

if ($ui_dir and ! $data_dir) {
Expand Down
3 changes: 2 additions & 1 deletion spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
c.default_facts = {
:architecture => 'x86_64',
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
:lsbdistrelease => '10.04',
:kernel => 'Linux',
}
Expand All @@ -29,7 +30,7 @@
}}
it { expect { should compile }.to raise_error(/is not a boolean/) }
end

context 'When passing a non-bool as manage_service' do
let(:params) {{
:manage_service => 'hello'
Expand Down

0 comments on commit a196ac3

Please sign in to comment.