Skip to content

Commit

Permalink
Remove deprecated RateLimit.instance method
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Sep 17, 2012
1 parent c30eb4c commit bf08485
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 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 668 examples and runs in under 2 seconds on a MacBook
* The spec suite contains 667 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/rate_limit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ class RateLimit
attr_reader :attrs
alias to_hash attrs

# @deprecated This method exists to provide backwards compatibility to when
# Twitter::RateLimit was a singleton. Safe to remove in version 4.
def self.instance
Twitter.rate_limit
end

# @return [Twitter::RateLimit]
def initialize(attrs={})
@attrs = attrs
Expand Down
7 changes: 0 additions & 7 deletions spec/twitter/rate_limit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

describe Twitter::RateLimit do

describe ".instance" do
it "delegates to Twitter.rate_limit" do
rate_limit = Twitter::RateLimit.instance
rate_limit.should eq Twitter.rate_limit
end
end

describe "#limit" do
it "returns an Integer when x-rate-limit-limit header is set" do
rate_limit = Twitter::RateLimit.new('x-rate-limit-limit' => "150")
Expand Down

0 comments on commit bf08485

Please sign in to comment.