update rbenv type to cdist 3.0 style

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
remotes/origin/feature_files_export
Nico Schottelius 11 years ago
parent 490bad7b26
commit 95b1ac0706
  1. 25
      cdist/conf/type/__rbenv/explorer/homedir
  2. 12
      cdist/conf/type/__rbenv/man.text
  3. 14
      cdist/conf/type/__rbenv/manifest
  4. 1
      cdist/conf/type/__rbenv/parameter/default/state
  5. 1
      cdist/conf/type/__rbenv/parameter/required

@ -1,25 +0,0 @@
#!/bin/sh
#
# 2012 Nico Schottelius (nico-cdist at schottelius.org)
#
# This file is part of cdist.
#
# cdist is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cdist is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
#
#
# Check whether repository exists
#
user="$__object_id"
su - "$user" -c "pwd -P"

@ -19,16 +19,22 @@ OPTIONAL PARAMETERS
state::
Either "present" or "absent", defaults to "present"
owner::
Which user should own the rbenv installation, defaults to root
EXAMPLES
--------
--------------------------------------------------------------------------------
# Install rbenv including ruby-build for nico
__rbenv nico
__rbenv /home/nico
# Install rbenv including ruby-build for nico
__rbenv /home/nico --owner nico
# Bastian does not need rbenv anymore, he began to code C99
__rbenv bastian --state absent
__rbenv /home/bastian --state absent
--------------------------------------------------------------------------------
@ -39,5 +45,5 @@ SEE ALSO
COPYING
-------
Copyright \(C) 2012 Nico Schottelius. Free use of this software is
Copyright \(C) 2012-2014 Nico Schottelius. Free use of this software is
granted under the terms of the GNU General Public License version 3 (GPLv3).

@ -1,6 +1,6 @@
#!/bin/sh
#
# 2012 Nico Schottelius (nico-cdist at schottelius.org)
# 2012-2014 Nico Schottelius (nico-cdist at schottelius.org)
#
# This file is part of cdist.
#
@ -19,20 +19,20 @@
#
#
homedir="$(cat "$__object/explorer/homedir")"
state_should=present
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
homedir="$__object_id"
state_should="$(cat "$__object/parameter/state")"
owner="$(cat "$__object/parameter/owner")"
rbenvdir="$homedir/.rbenv"
rubybuilddir="$rbenvdir/plugins/ruby-build"
__git "$rbenvdir" \
--source git://github.com/sstephenson/rbenv.git \
--owner "$__object_id" \
--owner "$owner" \
--state "$state_should"
#__git "$rubybuilddir" \
require="__git/$rbenvdir" __git "$rubybuilddir" \
--source git://github.com/sstephenson/ruby-build.git \
--owner "$__object_id" \
--owner "$owner" \
--state "$state_should"

Loading…
Cancel
Save