Puppet Class: ruby

Defined in:
manifests/init.pp

Overview

Class: ruby

This module installs a full rbenv-driven ruby stack

Parameters:

  • provider (Any) (defaults to: $ruby::provider)
  • prefix (Any) (defaults to: $ruby::prefix)
  • user (Any) (defaults to: $ruby::user)


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
# File 'manifests/init.pp', line 5

class ruby(
  $provider = $ruby::provider,
  $prefix   = $ruby::prefix,
  $user     = $ruby::user,
) {
  if $::osfamily == 'Darwin' {
    include boxen::config
  }

  include ruby::build

  $provider_class = "ruby::${provider}"
  include $provider_class

  if $::osfamily == 'Darwin' {
    boxen::env_script { 'ruby':
      content  => template('ruby/ruby.sh'),
      priority => 'higher',
    }
  }

  file { '/opt/rubies':
    ensure => directory,
    owner  => $user,
  }

  Class['ruby::build'] ->
    Ruby::Definition <| |> ->
    Class[$provider_class] ->
    Ruby <| |> ->
    Ruby_gem <| |>
}