Permalink
Browse files

use patched version of chef-client if ruby-2.0.0-p0 is detected

  • Loading branch information...
Scott Klein
Scott Klein committed Mar 11, 2013
1 parent 45b74a2 commit 2032ab0ecb34985b7d93737699604fc39f67f8b6
Showing with 26 additions and 1 deletion.
  1. +3 −0 metadata.rb
  2. +23 −1 recipes/default.rb
View
@@ -6,6 +6,9 @@
version "1.0.0"
recipe "ruby-src", "Installs system ruby from source."
depends "build-essential"
depends "git" # feel free to remove this if you aren't building ruby 2
%w{ ubuntu debian }.each do |os|
supports os
end
View
@@ -37,4 +37,26 @@
gem_package "bundler" do
options(:prerelease => true)
end
gem_package "chef"
if node[:ruby][:version].include?('2.0.0')
# need to check out chef repo and build manually
# current chef (3/12/13) bombs with rubygems 2.0
git "#{Chef::Config[:file_cache_path]}/chef" do
repository "git@github.com:opscode/chef.git"
reference "CHEF-3935"
action :checkout
notifies :run, "bash[install_custom_chef]"
end
bash "install_custom_chef" do
user "root"
cwd "#{Chef::Config[:file_cache_path]}/chef"
code <<-EOH
gem build chef.gemspec
gem install chef-11.4.0.gem --no-ri --no-rdoc
EOH
action :nothing
end
else
gem_package "chef"
end

0 comments on commit 2032ab0

Please sign in to comment.