kytrinyx/etsy — pull request #76 by masondesu (2014-02-16 17:13:17+00:00)
Title: Make HTTPS the default protocol

Hey there! Thanks for the great work on this gem. I've been using it for well over a year on [The Haberdash Fox](http://www.thehaberdashfox.com/) and have really enjoyed it!

This PR make HTTPS the default protocol. It appears that all new API keys that Etsy is giving out these days (as of late 2013ish) no longer allow plain HTTP. I have a set of older keys for which HTTP is still seemingly valid, but when I create a new app in my Etsy developer page, and plug the same keys into the old app, the app fails.

I monkey patched the request (per your [README](https://github.com/kytrinyx/etsy#monkey-patch)) and realized that `Etsy::EtsyJSONInvalid: API requests must be made over HTTPS`. See this tinnnnnny section of the [Etsy docs](https://www.etsy.com/developers/documentation/getting_started/api_basics#section_accessing_the_api) for more info ;P

@pupca had already done all of the hard work in #64, so my fix was just a single letter. I did take the opportunity to update the getter/setter specs in 0963c63, which passed instantly, and added a spec to verify the default protocol was HTTPS in 47cacea, which failed. I changed the default in the next commit (96982ab), which made the previous spec pass, but broke one test for Basic Client and two for Secure Client. The final commit e8267ae resolves the issue and all specs are passing.

Let me know if this PR is weird or needs adjusting. Super happy to help out. Thanks again for the hard work! :sparkles: