From b91d6abfa931b8ef63594092d841701d3ee23280 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 20 Nov 2012 19:19:21 -0500 Subject: add some backwards compatibility update documentation/comments to reflect reality --- README.md | 2 +- manifests/install.pp | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f0b8c53..ad636c9 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ https://github.com/evanstachowiak/puppet-bundler bundler) By default this will install bundler with RVM, if you wish to use another method, you can pass any puppet package provider to the class as - 'install_method', or just use undef if you wish the puppet parser to + 'install_method', or just use '' if you wish the puppet parser to automatically chose the best method for your platform. Examples: class { 'bundler::install': install_method => 'fink' }; diff --git a/manifests/install.pp b/manifests/install.pp index 4111d52..898cfea 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -4,8 +4,8 @@ # # == Parameters # -# [*use_rvm*] -# Sets whether rvm is used. Defaults to true. +# [*install_method*] +# How to install bundler, 'rvm' is the default # [*ruby_version*] # Ruby version that bundler will use. # @@ -21,13 +21,25 @@ class bundler::install ( $ruby_version = undef, $ensure = 'present', $install_method = 'rvm', + $use_rvm = '', ) inherits bundler::params { + # deprecation warning + if $use_rvm != '' { + warning('$use_rvm is deprecated, please use $install_method instead') + } + if $install_method == undef { $provider_method = undef } else { - $provider_method = $bundler::params::install_method + # backwards compatibility + if $use_rvm == false { + $provider_method = gem + } + else { + $provider_method = $bundler::params::install_method + } } if $provider_method == 'rvm' { -- cgit v1.2.3