solidus_dev_support icon indicating copy to clipboard operation
solidus_dev_support copied to clipboard

Create override generator

Open aldesantis opened this issue 4 years ago • 5 comments

It would be useful to have an override generator that creates the right placeholder module in the right path.

aldesantis avatar May 16 '20 14:05 aldesantis

I like this idea, were you thinking about something like this:

PBC ~/code/my_solidus_extention # ./bin/override Spree::Product MyDecorator
  • adds override file my_decorator.rb with mod..prepend on Spree::Product
  • adds my_decorator_spec.rb
  • ?

peterberkenbosch avatar May 21 '20 08:05 peterberkenbosch

@peterberkenbosch correct, that was more or less the idea! Instead of having a bin/override though, we can just use the existing CLI.

aldesantis avatar May 22 '20 09:05 aldesantis

Should we still call them decorators? There has been, or is a discussion going on this. we could call it monkey_patch? I do not have a very strong opinion on this, but I know others might.

peterberkenbosch avatar May 22 '20 11:05 peterberkenbosch

I like decorators, although recently we have started calling them prependers. In fact, I think we should hold off on this one for a while because we're still considering whether Prependers should become a standard in the Solidus world.

aldesantis avatar May 22 '20 16:05 aldesantis

I like prependers! Looking at that repo linked again too. Will keep this on hold.

peterberkenbosch avatar May 22 '20 17:05 peterberkenbosch