Faveod / arel-extensions

Extending Arel
MIT License
142 stars 24 forks source link

ArelExtensions::Nodes::Case broken on rails 6 #28

Closed fsateler closed 4 years ago

fsateler commented 4 years ago

https://github.com/Faveod/arel-extensions/blob/c6da215dfad8a21f9fa2778fb1e4bbec0b540a27/lib/arel_extensions/nodes/case.rb#L3

https://github.com/Faveod/arel-extensions/blob/c6da215dfad8a21f9fa2778fb1e4bbec0b540a27/lib/arel_extensions.rb#L39

This breaks because Arel::VERSION in rails 6 is "10.0.0", and that is < "7.1.0" :anguished: . I think wrapping both with Gem::Version.new should fix the issue

fsateler commented 4 years ago

Indeed: Gem::Version.new(Arel::VERSION) < Gem::Version.new("7.1.0") does the right thing.

jdelporte commented 4 years ago

Thank you for your contribution and sorry for the delay. fixed with e3aff5858a6d0ce2f9413671f2f3d4ce688943e4