diff --git a/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb b/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb index 9f5b433f..3159cf8c 100644 --- a/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb +++ b/lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb @@ -4,7 +4,8 @@ commands :rvmcmd => "/usr/local/rvm/bin/rvm" def create - rvmcmd "install", resource[:name] + options = Array(resource[:build_opts]) + rvmcmd "install", resource[:name], *options set_default if resource.value(:default_use) end diff --git a/lib/puppet/type/rvm_system_ruby.rb b/lib/puppet/type/rvm_system_ruby.rb index 59069a10..489c47c3 100644 --- a/lib/puppet/type/rvm_system_ruby.rb +++ b/lib/puppet/type/rvm_system_ruby.rb @@ -8,8 +8,14 @@ isnamevar end + newparam(:build_opts) do + desc "Build flags for RVM (e.g.: ['--movable', '--with-libyaml-dir=...', ...])" + defaultto "" + end + newproperty(:default_use) do desc "Should this Ruby be the system default for new terminals?" defaultto false end + end