Skip to content

Commit

Permalink
Remove Brittish English aliases 🇺🇸
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Sep 24, 2013
1 parent 04c81e9 commit 572813b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions lib/twitter/rest/api/favorites.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand All @@ -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
#
Expand All @@ -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
#
Expand All @@ -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
Expand Down
5 changes: 0 additions & 5 deletions lib/twitter/tweet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/twitter/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 572813b

Please sign in to comment.