Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Propagating the user attribute to sub-resources.
  • Loading branch information
fnichol committed Aug 10, 2011
1 parent c811bbb commit f8f7f50
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion providers/default_ruby.rb
Expand Up @@ -35,7 +35,8 @@ def load_current_resource
# ensure ruby is installed and gemset exists (if specified)
unless env_exists?(@ruby_string)
e = rvm_environment @ruby_string do
action :nothing
user new_resource.user
action :nothing
end
e.run_action(:create)
end
Expand Down
4 changes: 3 additions & 1 deletion providers/environment.rb
Expand Up @@ -56,7 +56,8 @@ def gemset_resource(exec_action)
# ensure gemset is created, if specified
unless gemset_exists?(:ruby => @rubie, :gemset => @gemset)
rvm_gemset @ruby_string do
action :nothing
user new_resource.user
action :nothing
end.run_action(exec_action)
end
end
Expand All @@ -65,6 +66,7 @@ def ruby_resource(exec_action)
# ensure ruby is installed
unless ruby_installed?(@rubie)
rvm_ruby @rubie do
user new_resource.user
action :nothing
end.run_action(exec_action)
end
Expand Down
2 changes: 2 additions & 0 deletions providers/gemset.rb
Expand Up @@ -38,6 +38,7 @@ def load_current_resource
action :create do
unless ruby_installed?(@rubie)
r = rvm_ruby @rubie do
user new_resource.user
action :nothing
end
r.run_action(:install)
Expand Down Expand Up @@ -96,6 +97,7 @@ def load_current_resource
# create gemset if it doesn't exist
unless gemset_exists?(:ruby => @rubie, :gemset => @gemset)
c = rvm_gemset @ruby_string do
user new_resource.user
action :nothing
end
c.run_action(:create)
Expand Down
1 change: 1 addition & 0 deletions providers/global_gem.rb
Expand Up @@ -79,6 +79,7 @@ def gem_package_wrapper(exec_action, ruby_global_gemset)
options new_resource.options if new_resource.options
version new_resource.version if new_resource.version
gem_binary new_resource.gem_binary if new_resource.gem_binary
user new_resource.user
action :nothing
end
g.run_action(exec_action)
Expand Down
1 change: 1 addition & 0 deletions providers/wrapper.rb
Expand Up @@ -39,6 +39,7 @@ def load_current_resource
# 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)
Expand Down

0 comments on commit f8f7f50

Please sign in to comment.