tiste / middleman-meta-tags

Easy integration of meta tags into your Middleman applications
rubygems.org/gems/middleman-meta-tags
MIT License
65 stars 19 forks source link

Add middleman 4.4 support #27

Closed koppen closed 3 years ago

koppen commented 3 years ago

Without this site_data ends up returning nil on Middleman 4.4.

data from Middleman returns a Middleman::CoreExtensions::Data::DataStore, and data['site'] returns a Middleman::Util::EnhancedHash. That is all fine.

However, we then end up calling with_indifferent_access on the EnhancedHash, which hits EnhancedHash#method_missing because with_indifferent_access isn't defined. That method_missing call then returns nil which is what site_data ends up returning, breaking all subsequent [] accesses.

I am guessing Middleman 4.4 stopped requiring "active_support/core_ext/hash/indifferent_access" and we've relied on that until now, although I haven't been able to verify that.

This fixes #25, #26 as far as I can tell.

tiste commented 3 years ago

Thanks a lot @koppen!