chriswarren / desk

A Ruby wrapper for the Desk.com V2 REST API
MIT License
66 stars 80 forks source link

Allow for 2.x versions of hashie gem dependency #37

Closed wkoffel closed 10 years ago

wkoffel commented 10 years ago

Bumped to hashie ~> 2.0, tests pass. Also smoke tests with simple real-world calls also seem to work, not thoroughly tested in-application yet.

Also needed to bump rash gem version which has been updated for hashie 2.x compatibility.

caseylang commented 10 years ago

I attempted to utilize your fork of desk @wkoffel and got this dependency error from Bundler:

Bundler could not find compatible versions for gem "hashie":
  In Gemfile:
    desk (>= 0) ruby depends on
      rash (~> 0.4.0) ruby depends on
        hashie (~> 2.0.0) ruby

    desk (>= 0) ruby depends on
      hashie (2.1.1)

Based on this issue from the Rash gem, might it be possible to transition desk away from Rash and instead use Hashie's built in Rash functionality? The digital_ocean gem seems to have dealt with something similar

wkoffel commented 10 years ago

Casey, I wonder if you have the latest branch. It should specify hashie ~> 2.x, so 2.1.1 should be compatible. I just cloned a fresh copy and the dependencies resolve, but maybe I missed something. Let me know if that doesn't work and we'll get it sorted.

chriswarren commented 10 years ago

I'll get this merged in once we've heard from @caseylang that things are working as expected.

caseylang commented 10 years ago

Definitely using your latest branch @wkoffel. The issue, I believe, is not that desk is incompatible with 2.1.1 but that Rash is. Their dependency requirement is the stricter ~> 2.0.0.

The Rash issue I linked earlier will explain why they haven't bumped the dependency yet, which leads to Hashie adding it's own version of Rash internally.

Since your branch of desk allows for anything 2.x, other gems are capable of bumping the Hashie dependency up to 2.1.1, which includes the native Rash implementation (which was introduced in 2.1.0).

In attempted to stop jabbering and summarize: ~> 2.x will result in a gem incompatibility and a namespace collision if Hashie resolves to 2.1.+.

My suggestion would be to remove the Rash dependency completely and duplicate the solution that the digital_ocean gem used.

I'm happy to implement and push up a PR if you both agree.

wkoffel commented 10 years ago

Yeah, that option sounds fine to me, Casey. Unless the rash gem is prepared to keep up with the 2.1.x Hashie line, probably better to let it get out of the way. I haven't scanned the full native Rash implementation, so can't speak to whether it will break compatibility for any existing users of this desk gem.

chriswarren commented 10 years ago

Closing in favor of #38