Shrine is overengineered

I simply want to express my concern that this gem has been becoming yet another Trailblazer or dry-rb which are overengineered: plugins, storages, derivatives, derivation_endpoints, validation_helpers, attacher… and yet a bunch of other concepts, just simply to upload a file!!!
It would be great to stop at some point and not to blow it up.

If all you want is to upload a file, then you only need to know about “storages” (you don’t even need to know about the attacher). Below is all the code that’s needed to upload a file:

Shrine.storages = { store: }
Shrine.upload(:store, file)

Note that you don’t need to know about any of the features you’re not using (“derivatives”, “derivation endpoint”, “validation_helpers”), the code for these features won’t even be loaded. So, you’re the one deciding which concepts are useful to learn for your use case.

But I pretty-much agree regarding not adding new features, I consider Shrine to be “done”, so I don’t envision adding any more plugins.

1 Like