Sha256: 6beb7437c6bcf2bb45fb43f13a45220c34815043f93d88de08a62ce7f025fac7
Contents?: true
Size: 628 Bytes
Versions: 1
Compression:
Stored size: 628 Bytes
Contents
puts "patrol tasks" namespace :ppatrol do desc "Launch the patrol" task :gooooooooooooooooooooooo => :environment do log = Logger.new("/tmp/patrol.log") output = "" timestamp = Time.now.strftime("%Y-%m-%d %H:%M") output << "[#{timestamp}] Launch the patrol " output << "\n" roadmap = YAML.load_file File.join(RAILS_ROOT, "config", "patrol.yml") roadmap.values.each do |rule| output << rule["title"] output << "\n" output << "=> #{eval(rule["request"])}" output << "\n" end puts output log.info(output) PatrolMailer.report(output).deliver end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
patrol-0.2.0 | lib/tasks/patrol.rake |