moiristo / deep_cloneable

This gem gives every ActiveRecord::Base object the possibility to do a deep clone that includes user specified associations.
MIT License
785 stars 89 forks source link

Rails 5.2 #92

Closed brian-kephart closed 6 years ago

brian-kephart commented 6 years ago

My installation of this gem downgraded when I updated from Rails 5.2.0rc2 to 5.2.0. The gemspec needs to be updated.

moiristo commented 6 years ago

Hello! Thanks for your contribution! I just wondered: did you drop support for ruby < 2.2 and rails 3.1 in your PR because they're EOL?

brian-kephart commented 6 years ago

Sort of. I was struggling to get a Travis build to pass for both the old and new rubies (check the Travis build history to see my various failures). In the end, I dropped support for EOL rubies just to get the build to pass. I dropped rails 3.1 because it was only being tested with older rubies anyway and wouldn't pass with newer ones.

Steps that led to that decision:

  1. The version of json in Gemfile.lock wouldn't build.
  2. bundle update json
  3. Some updated dependency of json doesn't support all the old rubies.
  4. Specify version of that dependency in various Gemfiles.
  5. Repeat steps 3 & 4 forever.

It's possible that this could be avoided if I was better at using the appraisal gem. I've never used it before, so I was creating lots of havoc in my first few attempts.

I'm not worried about getting this PR accepted or dropping old rubies, I'm just looking for support of the latest rails, and trying to contribute to the work involved. If you rewrite this, my feelings won't be hurt :)

moiristo commented 6 years ago

Seen your new PR, thanks for that! I think it's not bad to eventually clean up the EOL rubies and drop support for 3.1, we can also use the new hash syntax then and drop the protected initialize_dup line in the code. For now, I'll merge your last PR and make a patch release when everything is ok!

moiristo commented 6 years ago

Fixed in 2.3.2.