Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove deprecated Twitter::Status#expanded_urls method

  • Loading branch information...
commit 50d2613b1ade92c820f553d6e8389a49ec53dac1 1 parent 4259925
@sferik authored
Showing with 0 additions and 24 deletions.
  1. +0 −7 lib/twitter/status.rb
  2. +0 −17 spec/twitter/status_spec.rb
View
7 lib/twitter/status.rb
@@ -32,13 +32,6 @@ def ==(other)
super || (other.class == self.class && other.id == self.id)
end
- # @note Must include entities in your request for this method to work
- # @return [Array<String>]
- def expanded_urls
- warn "#{Kernel.caller.first}: [DEPRECATION] Twitter::Status#expanded_urls it deprecated. Use Twitter::Status#urls instead."
- urls.map(&:expanded_url) unless urls.nil?
- end
-
# @note If favoriters_count is > 50 it will return the string 50+.
# @return [String]
def favoriters_count
View
17 spec/twitter/status_spec.rb
@@ -40,23 +40,6 @@
end
end
- describe "#expanded_urls" do
- it "should return the expanded urls" do
- urls = [{'expanded_url' => 'http://example.com'}]
- expanded_urls = Twitter::Status.new('entities' => {'urls' => urls}).expanded_urls
- expanded_urls.should be_an Array
- expanded_urls.first.should == "http://example.com"
- end
- it "should return nil when not set" do
- expanded_urls = Twitter::Status.new.expanded_urls
- expanded_urls.should be_nil
- end
- it "should warn when not set" do
- Twitter::Status.new.expanded_urls
- $stderr.string.should =~ /\[DEPRECATION\] Twitter::Status#expanded_urls it deprecated\. Use Twitter::Status#urls instead\./
- end
- end
-
describe "#favoriters_count" do
it "should return the count of favoriters when favoriters_count is set" do
status = Twitter::Status.new('favoriters_count' => '1')
Please sign in to comment.
Something went wrong with that request. Please try again.