robb/jekyll-embedly-client — pull request #5 by ryanburnette (2014-12-01 20:05:59+00:00)
Title: Compose embedly_url using compose_url Gem

I sat down to write this plugin but found it already written so well! I was excited it see it.

Upon using it I started having problems due to improperly formatted URLs. The query params always started with a `?` but sometimes switched back to a `?` from a `&` mid-URL. I had some progress already made towards a class that could easily be instantiated that made composing a URL with query parameters easier. I figured I'd finish that project and incorporate it here. This abstracted the URL composition logic out of the plugin and solved the issue I was having. I tested thoroughly, but as it goes it could use another set of eyes.

There was an array of embedly-specific keys that I removed. The compuse_url gem escapes all values regardless. That comparison no longer seemed necessary.

I updated the README doc with some info that appears to be correct based on my testing and reading of the Embedly API doc. Embedly doesn't seem to support color for the SoundCloud player ... at least not right now. I'm pretty sure I didn't break this with my update and any other parameter option I test works. For example, `vimeo_color` works.

Here's my compose_url Gem that I added utilization of. https://github.com/ryanburnette/compose_url

Let me know what you think of the updates.

---

It might also be nice to make this a Gem itself. That would mean Jekyll users could add it to their Gemfile, automatically installing the dependencies and just adding a file in `_plugins` that requires the Gem, but that's for another day.