Permalink
Browse files

can not see why this sudo woudl be needed, resolves #13

  • Loading branch information...
1 parent 693657a commit d2f1eab814a29701812ce0c7829b8fe6bfe7d696 @yyyc514 yyyc514 committed Sep 16, 2011
Showing with 5 additions and 5 deletions.
  1. +4 −4 lib/sprinkle/verifiers/ruby.rb
  2. +1 −1 spec/sprinkle/verify_spec.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
@@ -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

0 comments on commit d2f1eab

Please sign in to comment.