Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ To install rbenv and ruby_build; Include each recipe in one of your cookbook's r
To install rbenv-vars; Include this recipe in one of your cookbook's recipes

include_recipe "rbenv::rbenv_vars"

## Installing rbenv-binstubs

To install rbenv-binstubs; Include this recipe in one of your cookbook's recipes

include_recipe "rbenv::rbenv_binstubs"

## Installing a Ruby

Expand Down Expand Up @@ -61,6 +67,11 @@ Be sure to include a value for the `ruby_version` attribute so the gem is instal
* `ruby_build[:git_revision]` - Revision of the ruby_build repository to checkout
* `ruby_build[:prefix]` - Path prefix where ruby_build will be installed to

## rbenv_binstubs

* `rbenv_binstubs[:git_repository]` - Git url of the rbenv-binstubs repository to clone
* `rbenv_binstubs[:git_revision]` - Revision of the rbenv-binstubs repository to checkout

# Recipes

## default
Expand All @@ -71,6 +82,10 @@ Configures a node with a system wide rbenv accessible by users in the rbenv grou

Installs ruby_build to a node which enables the `rbenv_ruby` LWRP to install Rubies to the node

## rbenv_binstubs

Installs rbenv-binstubs

## ohai_plugin

Installs an rbenv Ohai plugin onto the node to automatically populate attributes about the rbenv installation
Expand Down
3 changes: 3 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@

default[:rbenv_vars][:git_repository] = "https://github.com/sstephenson/rbenv-vars.git"
default[:rbenv_vars][:git_revision] = "master"

default[:rbenv_binstubs][:git_repository] = "https://github.com/ianheggie/rbenv-binstubs.git"
default[:rbenv_binstubs][:git_revision] = "master"
36 changes: 36 additions & 0 deletions recipes/rbenv_binstubs.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# Cookbook Name:: rbenv
# Recipe:: rbenv_binstubs
#
# Author:: David Chamard (<[email protected]>)
#
# Copyright 2011-2012, Riot Games
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

include_recipe "git"

plugin_path = "#{node[:rbenv][:root]}/plugins/rbenv-binstubs"

with_home_for_user(node[:rbenv][:user]) do

git plugin_path do
repository node[:rbenv_binstubs][:git_repository]
reference node[:rbenv_binstubs][:git_revision]
action :sync
user node[:rbenv][:user]
group node[:rbenv][:group]
end

end