Permalink
Browse files

Use proper name for rehash execution

  • Loading branch information...
1 parent cde7a1a commit 9efd7a6ab97e00703b833dc3686cebb5d3200492 @alup committed Oct 1, 2012
Showing with 10 additions and 12 deletions.
  1. +9 −11 manifests/compile.pp
  2. +1 −1 spec/defines/rbenv__compile_spec.rb
View
@@ -64,19 +64,17 @@
creates => "${versions}/${ruby}",
path => $path,
require => Rbenv::Plugin["rbenv::plugin::rubybuild::${user}"],
- before => Exec["rbenv::rehash ${user}"],
+ before => Exec["rbenv::rehash ${user} ${ruby}"],
}
- if ! defined( Exec["rbenv::rehash ${user}"] ) {
- exec { "rbenv::rehash ${user}":
- command => "rbenv rehash && rm -f ${root_path}/.rehash",
- user => $user,
- group => $group,
- cwd => $home_path,
- onlyif => "[ -e '${root_path}/.rehash' ]",
- environment => [ "HOME=${home_path}" ],
- path => $path,
- }
+ exec { "rbenv::rehash ${user} ${ruby}":
+ command => "rbenv rehash && rm -f ${root_path}/.rehash",
+ user => $user,
+ group => $group,
+ cwd => $home_path,
+ onlyif => "[ -e '${root_path}/.rehash' ]",
+ environment => [ "HOME=${home_path}" ],
+ path => $path,
}
# Install bundler
@@ -13,7 +13,7 @@
end
it "issues a rehash command" do
- should contain_exec("rbenv::rehash #{user}").
+ should contain_exec("rbenv::rehash #{user} #{ruby_version}").
with_command("rbenv rehash && rm -f #{dot_rbenv}/.rehash")
end

0 comments on commit 9efd7a6

Please sign in to comment.