Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Followers + authentication errors #2

Merged
merged 6 commits into from
Feb 18, 2014
Merged

Followers + authentication errors #2

merged 6 commits into from
Feb 18, 2014

Conversation

kdonovan
Copy link

@kdonovan kdonovan commented Feb 4, 2014

Thanks for the redvine gem! This pull request adds the #followers and #following methods + full specs for them both.

It also raises a custom exception detailing what went wrong when authorization fails.

@kdonovan
Copy link
Author

kdonovan commented Feb 4, 2014

Added passing an option to #connect to skip raising the exception to make existing code easier to port. Also improved the custom exception to extract the code separately from the error message.

@kdonovan
Copy link
Author

kdonovan commented Feb 5, 2014

Also raising a custom exception if the user tries to make API calls requiring authentication before actually authenticating. Without this change, if you forget to call client.connect before any other API calls you end up raising an obscure "can't call strip on nil" error from Ruby's standardlib (tracked down to passing {'vine-session-id' => nil} as a header).

stakes pushed a commit that referenced this pull request Feb 18, 2014
Followers + authentication errors
@stakes stakes merged commit 27187f1 into stakes:master Feb 18, 2014
@stakes
Copy link
Owner

stakes commented Feb 18, 2014

Awesome - thanks for the contributions and improvements! I'll merge this and then bump the version of the gem itself tomorrow.

@stakes
Copy link
Owner

stakes commented Feb 18, 2014

Here you go sir: http://rubygems.org/gems/redvine updated. Happy to add you as an author as well if you like!

@kdonovan
Copy link
Author

kdonovan commented Mar 5, 2014

Thanks, Jay! I'm happy submitting pull requests for now, but I'll let you know if we end up needing to make any major changes. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants