podio / podio-rb

The official Ruby wrapper for the Podio API used and maintained by the Podio team
https://podio.com
MIT License
66 stars 53 forks source link

Faraday 0.9 compatibility and ActiveModel Update #17

Closed ticktricktrack closed 9 years ago

ticktricktrack commented 10 years ago

Due to a version conflict with Faraday and ActiveModel I had to update podio-rb to make it work. Faraday 0.9 introduced a couple of breaking changes.

The Faraday Connection creates an Options Struct with fixed attributes, rather than allowing a Hash that would store whatever is passed in. My first try was to piggyback on an existing attribute. That did work, but felt a bit messy.

I then looked up how Podio.client obtains the client, and since it just pulls it out of Thread.current, why not use that directly and no longer pass the client object to Faraday.

andreas commented 10 years ago

Thanks for the PR! Do the changes work with version 3.x of activemodel and activesupport or do they require 4.x?

ticktricktrack commented 10 years ago

I think > 3 would probably be the best option. It works with ActiveModel 3 just fine, all specs are green and I just confirmed it by posting to an actual app.

ticktricktrack commented 10 years ago
ticktricktrack commented 10 years ago

Technically, you could say s.add_dependency('faraday', '>= 0.8.0') The tests pass and I don't see a reason why that wouldn't work. It's only that my live tests are limited to the few api calls we do with it.

mcfilib commented 10 years ago

:+1:

theflow commented 9 years ago

Sorry this took so long. Fixed in 65da2839bbed01624c23e55e056b4ab557950ad2