Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Commit

Permalink
better debug effort in run.
Browse files Browse the repository at this point in the history
  • Loading branch information
gleuch committed Oct 3, 2009
1 parent f7f7989 commit 5225a1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion retweet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) ])

Expand Down

0 comments on commit 5225a1b

Please sign in to comment.