diff options
author | lucywyman <wyman.lucy@gmail.com> | 2014-11-19 13:38:29 -0800 |
---|---|---|
committer | lucywyman <wyman.lucy@gmail.com> | 2014-11-19 13:38:29 -0800 |
commit | 924d75fd5b79b03e623cc657c5bef73e96f94465 (patch) | |
tree | 9269215631961400949780c568a866ce6caa17da /lib/chef | |
parent | 9179b18eeb2e476480fd0a4a4a5f8b36f75e5982 (diff) | |
download | chef-924d75fd5b79b03e623cc657c5bef73e96f94465.tar.gz |
Setting version to an empty string in tests
Check for nil and length on version in package/rubygems tests
In gemspec test change @new_resource.instance_variable_set()
to @new_resource.version()
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/provider/package/rubygems.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index 6304a7ef63..dd731adee4 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -536,7 +536,7 @@ class Chef else src = @new_resource.source && " --source=#{@new_resource.source} --source=https://rubygems.org" end - if version + if !version.nil? && version.length > 0 shell_out!("#{gem_binary_path} install #{name} -q --no-rdoc --no-ri -v \"#{version}\"#{src}#{opts}", :env=>nil) else shell_out!("#{gem_binary_path} install \"#{name}\" -q --no-rdoc --no-ri #{src}#{opts}", :env=>nil) |