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
|
# File 'manifests/local.pp', line 8
define ruby::local($version = undef, $ensure = present) {
include ruby
case $version {
'system': { $_ruby_local_require = undef }
undef: { $_ruby_local_require = undef }
default: {
ensure_resource('ruby::version', $version)
$_ruby_local_require = Ruby::Version[$version]
}
}
file {
"${name}/.ruby-version":
ensure => $ensure,
content => "${version}\n",
replace => true,
require => $_ruby_local_require ;
"${name}/.rbenv-version":
ensure => absent,
before => File["${name}/.ruby-version"],
require => $_ruby_local_require ;
}
}
|