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

Fix upload return type #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dncrht
Copy link

@dncrht dncrht commented Jun 7, 2014

I tried to use the gem but I got an error after uploading an image.
It tries to call an old gallery_images method to create an Image object (I supposed).
Now it creates the object, and specs relative to image upload are green again.

However:

  • mind if I commit Gemfile.lock too?
  • there's another spec failing, calling a method doesn't exist:
  1) images should have comments
     Failure/Error: image.comments.should_not be_empty
     NoMethodError:
       undefined method `comments' for #<Imgur::Client::Image:0x007fc9e4411e18>
     # ./spec/images_spec.rb:14:in `block (2 levels) in <top (required)>'

do you agree if I prepare a PR to remove the spec?

  • if you accept this PR, can you push it to rubygems?

Thanks

After calling upload, it tries to call the method
gallery_images on the client, which doesn't exist.
Wrap the response hash to become an Image instead.
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

1 participant