diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/install.pp | 14 | ||||
-rw-r--r-- | manifests/params.pp | 3 |
2 files changed, 10 insertions, 7 deletions
diff --git a/manifests/install.pp b/manifests/install.pp index e464390..73ceb59 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -18,17 +18,21 @@ # include rvm # class bundler::install ( - $ruby_version, + $ruby_version = undef, $ensure = 'present', - $use_rvm = $bundler::params::use_rvm, $install_method = $bundler::params::install_method, ) inherits bundler::params { - if $use_rvm == true { - #Install bundler with correct RVM - rvm_gem { 'bundler': + if $install_method == 'rvm' { + if $ruby_version == undef { + fail('When using rvm, you must pass a ruby_version') + } + else { + #Install bundler with correct RVM + rvm_gem { 'bundler': ensure => $ensure, ruby_version => $ruby_version, + } } } else { diff --git a/manifests/params.pp b/manifests/params.pp index b80dbab..53ca86e 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -17,8 +17,7 @@ class bundler::params { ubuntu, debian: { $user = 'root' $home_dir_base_path = '/home' - $use_rvm = true - $install_method = gem + $install_method = 'rvm' $rvm_bin = '/usr/local/rvm/bin/rvm' $rvm_gem_path = '/usr/local/rvm/gems' $rvm_gemset = 'global' |