Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (19 sloc) 685 Bytes
require 'rubygems'
gem 'twitter'
require 'twitter'
require 'open-uri'
require 'securerandom'
require File.join(File.dirname(__FILE__), 'helpers', 'config_store')
settings =, '.twitter'))
#oauth =['token'], config['secret'])
Twitter.configure do |config|
config.consumer_key = settings['ckey']
config.consumer_secret = settings['csecret']
config.oauth_token = settings['atoken']
config.oauth_token_secret = settings['asecret']
if (1 + rand(10) == 5)
Twitter.direct_message_create('troisienne', "What are you worried about? - #{SecureRandom.hex[0..4]}")
puts "Nothing to worry about"
Something went wrong with that request. Please try again.