From 572813b373a1c3001ff6c1bb729f092434d17bab Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Tue, 24 Sep 2013 21:22:06 +0200 Subject: [PATCH] Remove Brittish English aliases :us: --- README.md | 7 +++++++ lib/twitter/rest/api/favorites.rb | 8 -------- lib/twitter/tweet.rb | 5 ----- lib/twitter/user.rb | 1 + 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d92036e88..9d868b2d4 100644 --- a/README.md +++ b/README.md @@ -382,6 +382,13 @@ at the beginning: * `#saved_search_destroy` is now `#destroy_saved_search` * `#status_destroy` is now `#destroy_status` +### Remove British English aliases +Earlier versions of this library aliased `favourites` to `favorites`. These +aliases have been removed. Ruby is implemented in American English. The +`initialize` method is spelled with a "z", not an "s", and Ruby provides no +alias. Likewise, this library does not provide aliases for Commonwealthers. +Merica. :us: + ### Errors The `Twitter::Error::ClientError` and `Twitter::Error::ServerError` class hierarchy has been removed. All errors now inherit directly from diff --git a/lib/twitter/rest/api/favorites.rb b/lib/twitter/rest/api/favorites.rb index 6df655100..d94dbf1ca 100644 --- a/lib/twitter/rest/api/favorites.rb +++ b/lib/twitter/rest/api/favorites.rb @@ -34,7 +34,6 @@ def favorites(*args) merge_user!(arguments.options, arguments.pop) if arguments.last objects_from_response(Twitter::Tweet, :get, "/1.1/favorites/list.json", arguments.options) end - alias favourites favorites # Un-favorites the specified Tweets as the authenticating user # @@ -52,10 +51,7 @@ def unfavorite(*args) threaded_objects_from_response(Twitter::Tweet, :post, "/1.1/favorites/destroy.json", args) end alias destroy_favorite unfavorite - alias destroy_favourite unfavorite - alias unfavourite unfavorite deprecate_alias :favorite_destroy, :unfavorite - deprecate_alias :favourite_destroy, :unfavourite # Favorites the specified Tweets as the authenticating user # @@ -82,9 +78,7 @@ def favorite(*args) end alias fav favorite alias fave favorite - alias favourite favorite deprecate_alias :favorite_create, :favorite - deprecate_alias :favourite_create, :favourite # Favorites the specified Tweets as the authenticating user and raises an error if one has already been favorited # @@ -111,11 +105,9 @@ def favorite!(*args) end end alias create_favorite! favorite! - alias create_favourite! favorite! alias fav! favorite! alias fave! favorite! deprecate_alias :favorite_create!, :favorite! - deprecate_alias :favourite_create!, :favorite! end end diff --git a/lib/twitter/tweet.rb b/lib/twitter/tweet.rb index c5738b0be..6e7ef462f 100644 --- a/lib/twitter/tweet.rb +++ b/lib/twitter/tweet.rb @@ -7,12 +7,7 @@ class Tweet < Twitter::Identity :in_reply_to_attrs_id, :in_reply_to_status_id, :in_reply_to_user_id, :lang, :retweet_count, :retweeted, :source, :text, :truncated alias favorites_count favorite_count - alias favourite_count favorite_count - alias favourites_count favorite_count alias favoriters_count favorite_count - alias favouriters_count favorite_count - alias favourited favorited - alias favourited? favorited? alias in_reply_to_tweet_id in_reply_to_status_id alias retweeters_count retweet_count object_attr_reader :GeoCreator, :geo diff --git a/lib/twitter/user.rb b/lib/twitter/user.rb index 9b53f805b..856ec88ee 100644 --- a/lib/twitter/user.rb +++ b/lib/twitter/user.rb @@ -18,6 +18,7 @@ class User < Twitter::BasicUser :profile_use_background_image, :protected, :statuses_count, :time_zone, :utc_offset, :verified alias favorites_count favourites_count + remove_method :favourites_count alias profile_background_image_uri profile_background_image_url alias profile_background_image_uri_https profile_background_image_url_https alias translator? is_translator