Skip to content

Commit

Permalink
Remove Twitter::API#end_session
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Sep 17, 2012
1 parent 3b2d2b8 commit 23668bc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 32 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 661 examples and runs in under 2 seconds on a MacBook
* The spec suite contains 659 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
15 changes: 0 additions & 15 deletions lib/twitter/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ module API
:direct_messages => true,
:direct_messages_received => true,
:direct_messages_sent => true,
:end_session => false,
:fav => false,
:fave => false,
:favorite => false,
Expand Down Expand Up @@ -204,20 +203,6 @@ def verify_credentials(options={})
end
alias current_user verify_credentials

# Ends the session of the authenticating user
#
# @see https://dev.twitter.com/docs/api/1.1/post/account/end_session
# @rate_limited No
# @authentication_required Requires user context
# @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
# @return [Hash]
# @param options [Hash] A customizable set of options.
# @example End the session of the authenticating user
# Twitter.end_session
def end_session(options={})
post("/1.1/account/end_session.json", options)[:body]
end

# Sets which device Twitter delivers updates to for the authenticating user
#
# @see https://dev.twitter.com/docs/api/1.1/post/account/update_delivery_device
Expand Down
16 changes: 0 additions & 16 deletions spec/twitter/api/account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,6 @@
end
end

describe "#end_session" do
before do
stub_post("/1.1/account/end_session.json").
to_return(:body => fixture("end_session.json"), :headers => {:content_type => "application/json; charset=utf-8"})
end
it "requests the correct resource" do
@client.end_session
a_post("/1.1/account/end_session.json").
should have_been_made
end
it "returns a null cookie" do
end_session = @client.end_session
end_session[:error].should eq "Logged out."
end
end

describe "#update_delivery_device" do
before do
stub_post("/1.1/account/update_delivery_device.json").
Expand Down

0 comments on commit 23668bc

Please sign in to comment.