Permalink
Browse files

better debug effort in run.

  • Loading branch information...
1 parent f7f7989 commit 5225a1b2d99fa057041c333204b8ef4cf15f2c74 @gleuch committed Oct 3, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 retweet.rb
View
@@ -38,10 +38,12 @@ def launch_retweet_hell
@base_users.each do |user|
twitter_connect(user)
+ STDERR.puts "Loading #{user.screen_name}..."
unless @twitter_client.blank?
info = @twitter_client.info rescue nil
+ STDERR.puts "Their tweet: \"#{info}\""
- unless info.blank? || @twitter_client.info.blank? || @twitter_client.info['status']['text'].blank?
+ if !info.blank? && !info['status'].blank? && !info['status']['text'].blank?
retweet = "RT: @#{info['screen_name']}: %s #{configatron.twitter_hashtag}"
retweet = retweet.gsub(/\%s/, (info['status']['text'])[0, (142-retweet.length) ])

0 comments on commit 5225a1b

Please sign in to comment.