Added config, since the repo is private

This commit is contained in:
Simon Szustkowski 2014-09-03 10:32:03 +02:00
parent d037433eb9
commit 425aef81fa
3 changed files with 16 additions and 9 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
config.yaml

16
bot.rb
View File

@ -9,15 +9,15 @@ require 'uri'
CONFIG_FILE = 'config.yaml' CONFIG_FILE = 'config.yaml'
$config = YAML::load(File.open(File.join(File.dirname(__FILE__), CONFIG_FILE))) $config = YAML::load(File.open(File.join(File.dirname(__FILE__), CONFIG_FILE)))
# Configure and create the twitter client ## Configure and create the twitter client
Twitter.configure do |config| #Twitter.configure do |config|
config.consumer_key = $config['oauth']['consumer_key'] # config.consumer_key = $config['oauth']['consumer_key']
config.consumer_secret = $config['oauth']['consumer_secret'] # config.consumer_secret = $config['oauth']['consumer_secret']
config.oauth_token = $config['oauth']['request_token'] # config.oauth_token = $config['oauth']['request_token']
config.oauth_token_secret = $config['oauth']['request_secret'] # config.oauth_token_secret = $config['oauth']['request_secret']
end #end
client = Twitter::Client.new #client = Twitter::Client.new
# Read last known status from cache # Read last known status from cache
last_status = $config['worker']['last_status'].to_s last_status = $config['worker']['last_status'].to_s

8
config.yaml Normal file
View File

@ -0,0 +1,8 @@
---
oauth:
consumer_key: 2sd6IvhVm2SuWIiA1F7yQ
consumer_secret: PCnvVXWeNZofxdKE5TDEUmJO88N8ElwzrjJdEV90
request_token: 873661934-15exavg3cWFux0ON5WGhfHMXthcPeKVUrRk8nCBK
request_secret: 9kJoWvYMVEEbWIEUGtqpb4ib1QUfegQp2BGK6dw
worker:
last_status: unknown