summaryrefslogtreecommitdiff
path: root/manifests/install.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/install.pp')
-rw-r--r--manifests/install.pp39
1 files changed, 39 insertions, 0 deletions
diff --git a/manifests/install.pp b/manifests/install.pp
new file mode 100644
index 0000000..57e0cf5
--- /dev/null
+++ b/manifests/install.pp
@@ -0,0 +1,39 @@
+# Class bundler::install
+#
+# Installs bundler Ruby gem manager
+#
+# == Parameters
+#
+# [*use_rvm*]
+# Sets whether rvm is used. Defaults to true.
+# [*ruby_version*]
+# Ruby version that bundler will use.
+#
+# == Examples
+#
+#
+# == Requires:
+#
+# If use_rvm = 'true':
+# include rvm::system
+#
+class bundler::install (
+ $use_rvm = $bundler::params::use_rvm,
+ $ruby_version = $bundler::params::ruby_version
+) inherits bundler::params {
+
+ if $use_rvm == 'true' {
+ #Install bundler with correct RVM
+ rvm_gem { 'bundler':
+ ensure => 'present',
+ ruby_version => $ruby_version,
+ }
+ }
+ else {
+ package { 'bundler':
+ ensure => 'present',
+ provider => 'gem',
+ }
+ }
+
+}