Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #38 from yyyc514/master

Remove extra sudo for checking for gem installtion
  • Loading branch information...
commit 3b5ee4e3e06872552b630e7b9ab25abf1ae26b68 2 parents d02215c + d2f1eab
@crafterm authored
Showing with 5 additions and 5 deletions.
  1. +4 −4 lib/sprinkle/verifiers/ruby.rb
  2. +1 −1  spec/sprinkle/verify_spec.rb
View
8 lib/sprinkle/verifiers/ruby.rb
@@ -15,10 +15,10 @@ def ruby_can_load(*files)
@commands << "ruby -e \"#{files.join(';')}\""
end
- # Checks if a gem exists by calling "sudo gem list" and grepping against it.
- def has_gem(name, version=nil)
- version = version.nil? ? '' : "--version '#{version}'"
- @commands << "sudo gem list '#{name}' --installed #{version} > /dev/null"
+ # Checks if a gem exists by calling "gem list" and grepping against it.
+ def has_gem(name, version = nil)
+ version = version ? "--version '#{version}'" : ''
+ @commands << "gem list '#{name}' --installed #{version} > /dev/null"
end
end
end
View
2  spec/sprinkle/verify_spec.rb
@@ -90,7 +90,7 @@
end
it 'should check that a ruby gem is installed' do
- @verification.commands.should include("sudo gem list 'rails' --installed --version '2.1.0' > /dev/null")
+ @verification.commands.should include("gem list 'rails' --installed --version '2.1.0' > /dev/null")
end
it 'should check that an RPM is installed' do
Please sign in to comment.
Something went wrong with that request. Please try again.