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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/imgur/models/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def delete

def add_to_gallery(options = {})
data = connection.add_to_gallery(id, options).body['data']
connection.gallery_images.new(data)
new(data)
end
end
2 changes: 1 addition & 1 deletion lib/imgur/models/images.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def upload(options={})
raise ArgumentError, "Invalid image value"
end
data = connection.upload_image(options).body["data"]
connection.gallery_images.new(data)
new(data)
end

private
Expand Down
2 changes: 1 addition & 1 deletion lib/imgur/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Imgur
VERSION = "0.04"
VERSION = '0.05'
end