k0kubun / hamlit

High Performance Haml Implementation
https://rubygems.org/gems/hamlit
Other
981 stars 59 forks source link

hamlit v2.10.0 breaks hamlit-block v0.6.0 #149

Closed flash-gordon closed 5 years ago

flash-gordon commented 5 years ago

👋 This change in hamlit made. Hamlit::StringSplitter a Module, not a Class hamlit-block passes Hamlit::StringSplitter to a method of the temple gem. It checks if the argument is a Class, this check used to pass. Now an ArgumentError is thrown.

I'm not sure what's the best course of action here, making StringSplitter a class is the simplest thing to do, though.

I discovered this breakage during routine tasks in dry-view /cc @timriley

k0kubun commented 5 years ago

You're absolutely right. That's a great explanation.

I released hamlit-block v0.7.0 to just fix the immediate issue. I think we could loosen the tight coupling between them by inheriting how hamlit assembles filters, but at this moment that should make it work.

flash-gordon commented 5 years ago

Thank you, I can confirm it works ❤️