lib/negroku/helpers/watch.rb in negroku-2.0.0 vs lib/negroku/helpers/watch.rb in negroku-2.0.1

- old
+ new

@@ -1,8 +1,14 @@ def watch_process(name, options = {}) processes = fetch(:eye_watched_processes, {}) - options[:template] ||= "tasks/eye/_#{name}.erb" + options[:name] ||= name + + options[:template] ||= name.to_sym + + if options[:template].kind_of?(Symbol) + options[:template] = "tasks/eye/_#{options[:template]}.erb" + end processes[name] = options set :eye_watched_processes, processes end