From ac246717557ea02565a1d93b3f9a975e7fd39874 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Sat, 11 Jan 2014 13:34:18 +0100 Subject: [PATCH] Add deprecation warnings to oauth_token and oauth_token_secret accessors --- lib/twitter/client.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/twitter/client.rb b/lib/twitter/client.rb index 122d0a545..aa28cbdbf 100644 --- a/lib/twitter/client.rb +++ b/lib/twitter/client.rb @@ -1,14 +1,16 @@ require 'addressable/uri' require 'simple_oauth' +require 'twitter/utils' require 'twitter/version' module Twitter class Client + include Twitter::Utils attr_accessor :access_token, :access_token_secret, :consumer_key, :consumer_secret - alias_method :oauth_token, :access_token - alias_method :oauth_token=, :access_token= - alias_method :oauth_token_secret, :access_token_secret - alias_method :oauth_token_secret=, :access_token_secret= + deprecate_alias :oauth_token, :access_token + deprecate_alias :oauth_token=, :access_token= + deprecate_alias :oauth_token_secret, :access_token_secret + deprecate_alias :oauth_token_secret=, :access_token_secret= # Initializes a new Client object #