Sha256: 0b15cc8ebe74acff05f2b4167b67a3aa666f42d8f7906ea8e8cdb15f72a26ce2

Contents?: true

Size: 823 Bytes

Versions: 12

Compression:

Stored size: 823 Bytes

Contents

# Install a gem under rbenv for a certain user's ruby version.
# Requires rbenv::compile for the passed in user and ruby version
#
define rbenv::gem(
  $user,
  $ruby,
  $gem    = $title,
  $home   = '',
  $root   = '',
  $ensure = present
) {

  # Workaround http://projects.puppetlabs.com/issues/9848
  $home_path = $home ? { '' => "/home/${user}", default => $home }
  $root_path = $root ? { '' => "${home_path}/.rbenv", default => $root }

  if ! defined( Exec["rbenv::compile ${user} ${ruby}"] ) {
    fail("Rbenv-Ruby ${ruby} for user ${user} not found in catalog")
  }

  rbenvgem {"${user}/${ruby}/${gem}/${ensure}":
    ensure  => $ensure,
    user    => $user,
    gemname => $gem,
    ruby    => $ruby,
    rbenv   => "${root_path}/versions/${ruby}",
    require => Exec["rbenv::compile ${user} ${ruby}"],
  }
}

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
bebox-0.0.1 lib/templates/puppet/step-0/modules/rbenv/manifests/gem.pp
freighthop-0.6.1 modules/rbenv/manifests/gem.pp
freighthop-0.6.0 modules/rbenv/manifests/gem.pp
freighthop-0.5.2 modules/rbenv/manifests/gem.pp
freighthop-0.5.1 modules/rbenv/manifests/gem.pp
freighthop-0.5.0 modules/rbenv/manifests/gem.pp
freighthop-0.4.1 modules/rbenv/manifests/gem.pp
freighthop-0.4.0 modules/rbenv/manifests/gem.pp
freighthop-0.3.3 modules/rbenv/manifests/gem.pp
freighthop-0.3.2 modules/rbenv/manifests/gem.pp
freighthop-0.3.1 modules/rbenv/manifests/gem.pp
freighthop-0.3.0 modules/rbenv/manifests/gem.pp