Permalink
Browse files

Ensure Ruby/gemset is installed in rvm_shell provider.

  • Loading branch information...
1 parent c7657ff commit 44a3a7eeea37648bfc66acf3b09b335e73f0ab05 @fnichol fnichol committed Aug 23, 2011
Showing with 8 additions and 10 deletions.
  1. +8 −10 providers/shell.rb
View
@@ -31,22 +31,20 @@ def load_current_resource
end
action :run do
- next if skip_shell?
+ # ensure ruby is installed and gemset exists
+ unless env_exists?(@ruby_string)
+ e = rvm_environment @ruby_string do
+ user new_resource.user
+ action :nothing
+ end
+ e.run_action(:create)
+ end
script_wrapper :run
end
private
-def skip_shell?
- if env_exists?(@ruby_string)
- false
- else
- Chef::Log.warn("rvm_environment[#{ruby_string}] not created, so skipping")
- true
- end
-end
-
##
# Wraps the script resource for RVM-dependent code.
#

0 comments on commit 44a3a7e

Please sign in to comment.