summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Pinson <raphael.pinson@camptocamp.com>2013-04-29 02:27:13 -0700
committerRaphaël Pinson <raphael.pinson@camptocamp.com>2013-04-29 02:27:13 -0700
commit0c75e1584827e52c3af20d304a76111f37307c48 (patch)
tree987c42142c548ab1f3db7df9392bec306bd29f2f
parent3cdeb92a29db581f0d0f8a987c22de0a94971726 (diff)
parent9b1bec2ace7f4d9529c6593e4a23990216eb1319 (diff)
Merge pull request #25 from raphink/review/PR24
PR #24 + specs
-rw-r--r--manifests/params.pp7
-rw-r--r--spec/hosts/simple_debian_wheezy_spec.rb5
2 files changed, 8 insertions, 4 deletions
diff --git a/manifests/params.pp b/manifests/params.pp
index ee2dbea..9998308 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -12,9 +12,10 @@ class augeas::params {
}
'Debian': {
- $ruby_pkg = $::lsbdistcodename ? {
- 'wheezy' => 'libaugeas-ruby1.9.1',
- default => 'libaugeas-ruby1.8',
+ if versioncmp($::rubyversion, '1.9.1') >= 0 {
+ $ruby_pkg = 'libaugeas-ruby1.9.1'
+ } else {
+ $ruby_pkg = 'libaugeas-ruby1.8'
}
$augeas_pkgs = ['augeas-lenses', 'libaugeas0', 'augeas-tools']
}
diff --git a/spec/hosts/simple_debian_wheezy_spec.rb b/spec/hosts/simple_debian_wheezy_spec.rb
index 23c0d1d..8985e28 100644
--- a/spec/hosts/simple_debian_wheezy_spec.rb
+++ b/spec/hosts/simple_debian_wheezy_spec.rb
@@ -1,9 +1,10 @@
require 'spec_helper'
-describe 'simple_debian_squeeze' do
+describe 'simple_debian_wheezy' do
let (:facts) { {
:osfamily => 'Debian',
:lsbdistcodename => 'wheezy',
+ :rubyversion => '1.9.1',
} }
context 'when versions are not specified' do
@@ -26,6 +27,7 @@ describe 'simple_debian_squeeze' do
let (:facts) { {
:osfamily => 'Debian',
:lsbdistcodename => 'wheezy',
+ :rubyversion => '1.9.1',
:augeas_version => '1.2.3',
:augeas_ruby_version => '3.2.1',
} }
@@ -68,6 +70,7 @@ describe 'simple_debian_squeeze' do
let (:facts) { {
:osfamily => 'Debian',
:lsbdistcodename => 'wheezy',
+ :rubyversion => '1.9.1',
:augeas_lens_dir => '/opt/augeas/lenses'
} }