diff --git a/README.md b/README.md index 37d011f..fb03980 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,14 @@ To install rbenv and ruby_build; Include each recipe in one of your cookbook's r include_recipe "rbenv::default" include_recipe "rbenv::ruby_build" -## Installing rbenv-vars +## Installing rbenv-vars and/or rbenv-bundler -To install rbenv-vars; Include this recipe in one of your cookbook's recipes +To install rbenv-vars and/or rbenv-bundler; Include this recipe in one of your cookbook's recipes include_recipe "rbenv::rbenv_vars" + include_recipe "rbenv::rbenv_bundler" + ## Installing a Ruby And now to install a Ruby use the `rbenv_ruby` LWRP diff --git a/attributes/default.rb b/attributes/default.rb index b762b9d..6fe93b7 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -33,3 +33,6 @@ default[:rbenv_vars][:git_repository] = "git://github.com/sstephenson/rbenv-vars.git" default[:rbenv_vars][:git_revision] = "master" + +default[:rbenv_bundler][:git_repository] = "git://github.com/carsomyr/rbenv-bundler.git" +default[:rbenv_bundler][:git_revision] = "master" diff --git a/recipes/rbenv_bundler.rb b/recipes/rbenv_bundler.rb new file mode 100644 index 0000000..de61744 --- /dev/null +++ b/recipes/rbenv_bundler.rb @@ -0,0 +1,32 @@ +# +# Cookbook Name:: rbenv +# Recipe:: rbenv_bundler +# +# Author:: Guilhem Lettron +# +# Copyright 2013, Optiflows +# +# 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 = ::File.join(node[:rbenv][:root], "plugins", "rbenv-bundler") + +git plugin_path do + repository node[:rbenv_bundler][:git_repository] + reference node[:rbenv_bundler][:git_revision] + action :sync + user node[:rbenv][:user] + group node[:rbenv][:group] +end