jesjos / active_record_upsert

Upsert for Rails 5 / Active Record 5
MIT License
207 stars 51 forks source link

Support pg version 1.0.0 #47

Closed gaffneyc closed 6 years ago

gaffneyc commented 6 years ago

The version constraint for the dependency on pg may be too strict and isn't allowing 1.0+ of the pg gem. Would be great to make sure version 1.0.0 is supported and relax the version constraint.

olleolleolle commented 6 years ago

Care to make the check?

gaffneyc commented 6 years ago

Sure, I can take a look

olleolleolle commented 6 years ago

20+ days ago this was committed to Rails' repo: and this is in the 5.2.0.rc1

https://github.com/rails/rails/commit/f820dc2dea3775f6c05c5ca77631ac27a9d3c954#diff-d7ae9a835adce5aead1bf757f121e359

gaffneyc commented 6 years ago

After a quick check it appears that ActiveRecord 5.1.4 (and probably older) have a version constraint hard coded for gem "pg", "~> 0.18"

Edit: Just saw that and this issue: https://github.com/rails/rails/pull/31671

gaffneyc commented 6 years ago

As far as ActiveRecord goes, it looks like pg 1.0 won't be supported until 5.0.7, 5.1.5, and 5.2.0. This is kind of a tricky issue that I'm not sure how to model in a Gemspec. Since ActiveRecord doesn't declare a constraint in it's gemspec it's left up to users of the gem to add the correct constraints to their Gemfile.

olleolleolle commented 6 years ago

v0.7.2 has been released.

gaffneyc commented 6 years ago

Thanks! :+1: