Skip to content

Commit

Permalink
can not see why this sudo woudl be needed, resolves sprinkle-tool#13
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Sep 16, 2011
1 parent 693657a commit d2f1eab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/sprinkle/verifiers/ruby.rb
Expand Up @@ -15,10 +15,10 @@ def ruby_can_load(*files)
@commands << "ruby -e \"#{files.join(';')}\"" @commands << "ruby -e \"#{files.join(';')}\""
end end


# Checks if a gem exists by calling "sudo gem list" and grepping against it. # Checks if a gem exists by calling "gem list" and grepping against it.
def has_gem(name, version=nil) def has_gem(name, version = nil)
version = version.nil? ? '' : "--version '#{version}'" version = version ? "--version '#{version}'" : ''
@commands << "sudo gem list '#{name}' --installed #{version} > /dev/null" @commands << "gem list '#{name}' --installed #{version} > /dev/null"
end end
end end
end end
Expand Down
2 changes: 1 addition & 1 deletion spec/sprinkle/verify_spec.rb
Expand Up @@ -90,7 +90,7 @@
end end


it 'should check that a ruby gem is installed' do 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 end


it 'should check that an RPM is installed' do it 'should check that an RPM is installed' do
Expand Down

0 comments on commit d2f1eab

Please sign in to comment.