Skip to content

Commit

Permalink
Updating sudoers, and adding a Rakefile with syntax checking
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhjk committed Jan 21, 2009
1 parent bb8ccd3 commit 8401624
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

desc "Test the cookbooks for syntax errors"
task :test do
puts "** Testing your cookbooks for syntax errors"
Dir[ File.join(File.dirname(__FILE__), "**", "*.rb") ].each do |recipe|
print "Testing recipe #{recipe}: "
sh %{ruby -c #{recipe}} do |ok, res|
if ! ok
raise "Syntax error in #{recipe}"
end
end
end
end

task :default => [ :test ]

2 changes: 1 addition & 1 deletion sudo/attributes/sudoers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
end

unless authorization[:sudo].has_key?(:users)
authorization[:sudo][:users] = Array.new unless
authorization[:sudo][:users] = Array.new
end

0 comments on commit 8401624

Please sign in to comment.