Skip to content

Instantly share code, notes, and snippets.

@marcinbunsch
Forked from cziko/things-yammer-checkin
Created July 8, 2011 11:41
Show Gist options
  • Save marcinbunsch/1071656 to your computer and use it in GitHub Desktop.
Save marcinbunsch/1071656 to your computer and use it in GitHub Desktop.
Things - Yammer checkin script
#!/usr/bin/ruby
# gem install things-client --source http://gemcutter.org
# gem install broadcast
require 'rubygems'
require 'things'
require 'broadcast'
Broadcast.setup do |config|
config.yammer.consumer_key = ''
config.yammer.consumer_secret = ''
config.yammer.access_token = ''
config.yammer.access_secret = ''
end
class Poke < Broadcast::Message
medium :yammer
def body
task_list_for_today = Things::Todo.today.map(&:name)
formatted = task_list_for_today.inject([]) { |memo, task| memo.push "#{memo.size + 1}) #{task}" }
return "Check in: \n #{formatted.join("\n")}"
end
end
Poke.new.publish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment