Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 21 lines (18 sloc) 0.659 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
require 'rubygems'
gem 'twitter'
require 'twitter'
require 'open-uri'

require File.join(File.dirname(__FILE__), 'helpers', 'config_store')
settings = ConfigStore.new(File.join(File.dirname(__FILE__), '.twitter'))
#oauth = Twitter::OAuth.new(config['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']
end

if (1 + rand(10) == 5)
  Twitter.direct_message_create('suttree', "What are you worried about? - #{SecureRandom.hex[0..4]}")
else
  puts "Nothing to worry about"
end
Something went wrong with that request. Please try again.