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

preview_image_url should handle unspecified capture size with options more gracefully #3

Open
rahim opened this issue Oct 7, 2015 · 0 comments

Comments

@rahim
Copy link
Collaborator

rahim commented Oct 7, 2015

Currently this happens:

2.2.2 (main):0 > Litmus::Instant.preview_image_url(email_guid, "OL2010", images: "blocked")
=> "https://OL2010.instant-api.litmus.com/v1/emails/755d1f9f-ad28-460f-8e45-632e0eceab32/previews/OL2010/{:images=>\"blocked\"}"

This is mostly a consequence of supporting 1.9.x rather than using 2.x keyword args.

We can maintain 1.9.x support by detecting whether the third arg (capture_size) is a Hash or string, if a Hash assume it's the options, and use the default capture_size.

Alternatively (given we're yet to release) we could change the method signature and move capture_size in to the options hash too.

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

No branches or pull requests

1 participant