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

Parse media urls with Addressable::URI #248

Merged
merged 1 commit into from Sep 23, 2012

Conversation

jayeff
Copy link
Contributor

@jayeff jayeff commented Sep 23, 2012

When providing a media url with an unicode char the error URI::InvalidURIError: bad URI(is not URI?) is thrown. Using Addressable::URI.parse solves this issue.

This fix is similar to pull request #233 / issue #223 where the same error occurred and switching to Addressable solved the issue.

add support for IRIs (international domain names or filenames with a unicode
char)
@arsduo
Copy link
Owner

arsduo commented Sep 23, 2012

Looks great to me. I'll run the tests when I get home (since Travis is having problems) and if they pass (which they obviously should) get it merged in for 1.6!

@jayeff
Copy link
Contributor Author

jayeff commented Sep 23, 2012

Thanks.

To test this change you can throw a unicode char (eg \u2013) into the slate_logo url. Run the tests and you see the bad URI(is not URI?) error. Apply this change and it is replaced by another error :) - because this url is not stubbed.

Ps: I do have three failing test_users examples. Don't know why but this seems to be unrelated to my change (I have the same errors on a freshly cloned repository)

@arsduo
Copy link
Owner

arsduo commented Sep 23, 2012

Odd, which version of Ruby are you running? All tests pass for me.

arsduo added a commit that referenced this pull request Sep 23, 2012
Parse media urls with Addressable::URI
@arsduo arsduo merged commit 2ff0640 into arsduo:master Sep 23, 2012
@arsduo
Copy link
Owner

arsduo commented Sep 23, 2012

Merged, thanks!

@jayeff
Copy link
Contributor Author

jayeff commented Sep 24, 2012

I did run the test both with 1.9.3-p194 and 1.9.2-p290. Same errors with both versions. Don't know why but also didn't look closely.

arsduo added a commit that referenced this pull request Oct 3, 2012
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