Skip to content

Commit

Permalink
Removed deprecated Twitter::Tweet#oembed method
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Sep 17, 2012
1 parent bf08485 commit 16f09cf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions lib/twitter/tweet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
17 changes: 0 additions & 17 deletions spec/twitter/tweet_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"})
Expand Down

0 comments on commit 16f09cf

Please sign in to comment.