From 21e920079f470af91518a476453efd072cf77f7c Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Tue, 6 Jan 2015 14:51:02 -0500 Subject: [PATCH] slack: --- lib/tasks/slack.rake | 49 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/lib/tasks/slack.rake b/lib/tasks/slack.rake index 6ace0f4..2bac488 100644 --- a/lib/tasks/slack.rake +++ b/lib/tasks/slack.rake @@ -4,10 +4,53 @@ require "net/http" namespace :slack do desc "TODO" task webhook: :environment do + time = Time.new + out = {} - out[:text] = "Hello World" - out[:color] = "good" - out[:pretext] = "pretext!" + out[:text] = "Last updated at #{time.strftime("%Y-%m-%d %Hgg:%M:%S")}" + out[:color] = "#829495" + out[:pretext] = "Roadmap" + out[:fields] = [] + + column_1 = {} + column_1[:title] = "Active Project(s)" + column_1[:value] = "\n\n\n" + column_1[:short] = true + + column_2 = {} + column_2[:title] = "Furthest Status" + column_2[:value] = "Planning\nPlanning\nComplete\nOverdue :warning:" + column_2[:short] = true + + out[:fields] << column_1 + out[:fields] << column_2 + + column_1 = {} + column_1[:title] = "Upcoming Project(s)" + column_1[:value] = "\n\n\n" + column_1[:short] = true + + column_2 = {} + column_2[:title] = "Furthest Status" + column_2[:value] = "Planning\nPlanning\nComplete\nOverdue :warning:" + column_2[:short] = true + + out[:fields] << column_1 + out[:fields] << column_2 + + column_1 = {} + column_1[:title] = "Backlog Project(s)" + column_1[:value] = "\n\n\n" + column_1[:short] = true + + column_2 = {} + column_2[:title] = "Furthest Status" + column_2[:value] = "Planning\nPlanning\nComplete\nOverdue :warning:" + column_2[:short] = true + + out[:fields] << column_1 + out[:fields] << column_2 +