Sha256: 7e6854cf7bb234872451926c4d099b77f83dd2d0e3073fb8823cefbc249aeecc

Contents?: true

Size: 448 Bytes

Versions: 2

Compression:

Stored size: 448 Bytes

Contents

require_relative 'src/<%= bot_name %>.rb'
require 'twitter'
twitter = Twitter::REST::Client.new do |config|
  config.consumer_key = ENV['TWITTER_CONSUMER_KEY']
  config.consumer_secret = ENV['TWITTER_CONSUMER_SECRET']
  config.access_token = ENV['TWITTER_ACCESS_TOKEN']
  config.access_token_secret = ENV['TWITTER_ACCESS_SECRET']
  end

loop do
  begin
    twitter.update <%= class_name %>.generate
  ensure
    sleep 10800 + (rand 5400)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
twitter_bot_generator-0.1.4 lib/twitter_bot_generator/templates/bot.rb.erb
twitter_bot_generator-0.1.2 lib/twitter_bot_generator/templates/bot.rb.erb