lib/kuzushi.rb in kuzushi-0.0.17 vs lib/kuzushi.rb in kuzushi-0.0.18
- old
+ new
@@ -1,10 +1,9 @@
require 'rubygems'
require 'json'
require 'restclient'
require 'ostruct'
-require 'rush'
require 'ohai'
require 'erb'
## IDEAS
@@ -197,10 +196,10 @@
def handle_crontab(src, user = "root", &blk)
## FIXME - this is getting a little silly calling tmpfile twice - should be able to pass erb to fetch as an opton...
## unify code for process crontabs + process files
fetch(src) do |file|
- tmpfile(blk.call) do |tmp|
+ tmpfile(blk.call(file)) do |tmp|
task "process crontab for #{user}" do
shell "crontab -u #{user} #{tmp}"
end
end
end