Skip to content

Instantly share code, notes, and snippets.

@kei-s
Created June 2, 2011 14:23
Show Gist options
  • Save kei-s/1004537 to your computer and use it in GitHub Desktop.
Save kei-s/1004537 to your computer and use it in GitHub Desktop.
#coding: utf-8
require "bundler"
Bundler.setup
require "twitter"
require "pit"
pit = Pit.get("june29bot", :require => {
"consumer_key" => "consumer_key",
"consumer_secret" => "consumer_secret",
"oauth_token" => "oauth_token",
"oauth_token_secret" => "oauth_token_secret",
})
Twitter.configure do |config|
config.consumer_key = pit["consumer_key"]
config.consumer_secret = pit["consumer_secret"]
config.oauth_token = pit["oauth_token"]
config.oauth_token_secret = pit["oauth_token_secret"]
end
until Date.new.month == 6
name = "じゅ"+"ー"*rand(30)+"んさん"
text = "@june29 #{name}おめでとうございます"
tweet = text + "!" * rand(140-text.size)
Twitter.update(tweet)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment