You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Garage assumes instance of Hashie::Mash to be a instance including Garage::Representer.
As a result of it, it fails at here with a message "NoMethodError: undefined method `params' for Hashie::Mash:Class ".
I suggest specifying Hashie < 3.0.0 in gemspec.
The text was updated successfully, but these errors were encountered:
I think specifying Hashie < 3.0.0 has bad side, that garage gem restricts users to use Hashie 3.0.0 above.
The one of alternatives is not checking the value responds to represent! but checking the value includes Garage::Representer. Because the value must respond to params= and partial= and more, checking againt represent! is not enought.
I think alternative plan is reasonable. How do you think?
We are facing this issue in our garage app, where hashie 3.4.3 is used.
The one of alternatives is not checking the value responds to represent! but checking the value includes Garage::Representer. Because the value must respond to params= and partial= and more, checking againt represent! is not enought.
This sounds good to me -- we are monkey patching as such and going to test with our app.
Hashie >= 3.0.0 Mash::respond_to? always returns true when given method name ending with "!", "?", "_", "=".
Ref: hashie/hashie@5ac8516#diff-167a475bc5a73269819928a9da362073R190
It breaks this garage's code:
https://github.com/cookpad/garage/blob/master/lib/garage/representer.rb#L159
Garage assumes instance of
Hashie::Mash
to be a instance includingGarage::Representer
.As a result of it, it fails at here with a message "NoMethodError: undefined method `params' for Hashie::Mash:Class ".
I suggest specifying Hashie < 3.0.0 in gemspec.
The text was updated successfully, but these errors were encountered: