summaryrefslogtreecommitdiff
path: root/manifests/install.pp
blob: c5453399742ce5561f4c1a8b83c9e5f27ff6023d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
) 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',
    }
  }

}