Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refactor gem_package provider.

  • Loading branch information...
commit 0df34e8d5808edbdf18d943cebed183218e6ab0d 1 parent 1d86bcc
@fnichol fnichol authored
Showing with 8 additions and 5 deletions.
  1. +8 −5 recipes/gem_package.rb
View
13 recipes/gem_package.rb
@@ -17,14 +17,17 @@
# limitations under the License.
#
-rvm_tmp = node['rvm']['gem_package']['rvm_string']
-case rvm_tmp
-when String; rvm_descriptor = rvm_tmp + " RVM Ruby"
+node_val = node['rvm']['gem_package']['rvm_string']
+case node_val
+when String
+ rvm_descriptor = node_val + " RVM Ruby"
when Array
- last = rvm_tmp.pop()
- rvm_descriptor = [ rvm_tmp.join(', '), last ].join(' & ') + " RVM Rubies"
+ last = node_val.pop
+ rvm_descriptor = [ node_val.join(', '), last ].join(' & ') + " RVM Rubies"
end
+
patch_gem_package
+
::Chef::Log.info "gem_package resource has been patched to use provider " <<
"Chef::Provider::Package::RVMRubygems and will install gems to " <<
"the #{rvm_descriptor}."
Please sign in to comment.
Something went wrong with that request. Please try again.