Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed deprecated `Twitter::Tweet#oembed` method

  • Loading branch information...
commit 16f09cf7053f2109a740ea43461e89b504335c50 1 parent bf08485
@sferik authored
Showing with 1 addition and 24 deletions.
  1. +1 −1  README.md
  2. +0 −6 lib/twitter/tweet.rb
  3. +0 −17 spec/twitter/tweet_spec.rb
View
2  README.md
@@ -273,7 +273,7 @@ Here are some fun facts about the 3.0 release:
* The entire library is implemented in just 2,000 lines of code
* With over 5,000 lines of specs, the spec-to-code ratio is over 2.5:1
-* The spec suite contains 667 examples and runs in under 2 seconds on a MacBook
+* The spec suite contains 665 examples and runs in under 2 seconds on a MacBook
* This project has 100% C0 code coverage (the tests execute every line of
source code at least once)
* At the time of release, this library is comprehensive: you can request all
View
6 lib/twitter/tweet.rb
@@ -67,12 +67,6 @@ def metadata
@metadata ||= Twitter::Metadata.fetch_or_new(@attrs[:metadata])
end
- # @deprecated This method will be removed in version 4.
- # @return [Twitter::OEmbed]
- def oembed(options={})
- @oembed ||= Twitter.oembed(@attrs[:id], options)
- end
-
# @return [Twitter::Place]
def place
@place ||= Twitter::Place.fetch_or_new(@attrs[:place])
View
17 spec/twitter/tweet_spec.rb
@@ -153,23 +153,6 @@
end
end
- describe "#oembed" do
- before do
- stub_get("/1.1/statuses/oembed.json?id=25938088801").
- to_return(:body => fixture("oembed.json"), :headers => {:content_type => "application/json; charset=utf-8"})
- @tweet = Twitter::Tweet.new(:id => 25938088801)
- end
- it "requests the correct resource" do
- @tweet.oembed
- a_get("/1.1/statuses/oembed.json?id=25938088801").
- should have_been_made
- end
- it "returns an OEmbed instance" do
- oembed = @tweet.oembed
- oembed.should be_a Twitter::OEmbed
- end
- end
-
describe "#place" do
it "returns a Twitter::Place when set" do
tweet = Twitter::Tweet.new(:id => 28669546014, :place => {:id => "247f43d441defc03"})
Please sign in to comment.
Something went wrong with that request. Please try again.