summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2012-11-20 19:19:21 -0500
committerMicah Anderson <micah@riseup.net>2012-11-20 19:19:21 -0500
commitb91d6abfa931b8ef63594092d841701d3ee23280 (patch)
treeec48840ba50e8661dbfb3fc1a24d2931a960c613
parentcef8d7f65cb9f7931625a900b00a53ffb2848f12 (diff)
add some backwards compatibility
update documentation/comments to reflect reality
-rw-r--r--README.md2
-rw-r--r--manifests/install.pp18
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' {