Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
tardate committed Jun 30, 2009
1 parent 58c5e41 commit 4429990
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/oauth_system.rb
Expand Up @@ -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


Expand Down
25 changes: 19 additions & 6 deletions lib/twitter_oauth.rb
Expand Up @@ -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 )
Expand Down Expand Up @@ -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

0 comments on commit 4429990

Please sign in to comment.