Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tidy up

  • Loading branch information...
commit 44299900c65743a0fbf96577d37d235eb062e1db 1 parent 58c5e41
@tardate authored
Showing with 21 additions and 8 deletions.
  1. +2 −2 lib/oauth_system.rb
  2. +19 −6 lib/twitter_oauth.rb
View
4 lib/oauth_system.rb
@@ -58,9 +58,9 @@ def callback
protected
- # Inclusion hook to make #current_user, #logged_in?, :authorized? available as ActionView helper methods.
+ # Inclusion hook to make #current_user, #logged_in? available as ActionView helper methods.
def self.included(base)
- base.send :helper_method, :current_user, :logged_in?,:authorized? if base.respond_to? :helper_method
+ base.send :helper_method, :current_user, :logged_in? if base.respond_to? :helper_method
end
View
25 lib/twitter_oauth.rb
@@ -47,12 +47,6 @@ def exchange_request_for_access_token( request_token, request_token_secret, oau
raise err
end
end
-
- # helper
-# def request_token( request_token, request_token_secret )
-# #RAILS_DEFAULT_LOGGER.info "TwitterOauth. request_token: request_token=#{request_token}, request_token_secret=#{request_token_secret}"
-# OAuth::RequestToken.new(self.consumer, request_token, request_token_secret)
-# end
# gets a request token to be used for the authorization request to twitter
def get_request_token( oauth_callback = TWOAUTH_CALLBACK )
@@ -289,6 +283,25 @@ def mentions( since_id = nil, max_id = nil , count = nil, page = nil )
end
+ # debug routines
+
+ def dump_friends( screen_name = nil )
+ puts "friends list for #{ screen_name ? screen_name : 'self' }.."
+ friends = self.friends( screen_name )
+ friends.each do |friend|
+ puts "\t#{friend['screen_name']}"
+ end
+ puts "end friends list for #{ screen_name ? screen_name : 'self' }.."
+ end
+
+ def dump_followers( screen_name = nil )
+ puts "followers list for #{ screen_name ? screen_name : 'self' }.."
+ friends = self.followers( screen_name )
+ friends.each do |friend|
+ puts "\t#{friend['screen_name']}"
+ end
+ puts "end followers list for #{ screen_name ? screen_name : 'self' }.."
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.