bstopp / puppet-aem

Puppet module for managing AEM Installations.
https://forge.puppet.com/bstopp/aem
Apache License 2.0
30 stars 30 forks source link

Support regex in dispatcher config #106

Closed bdhoine closed 5 years ago

bdhoine commented 6 years ago

Now it is possible to define a POSIX regex in the filter config. See updated docs for more info.

Think for this PR it is best to bump the major version because the new approach is not backward compatible with existing configs (due to quotes in selector, suffix and extension now defaults to double quotes)

Resolves #100

bdhoine commented 6 years ago

@bstopp can you please provide some feedback on my implementation and fix codeclimate?

royteeuwen commented 6 years ago

+1. Any update on this @bstopp ?

Archethect commented 6 years ago

+1

johanruttens commented 6 years ago

+1

bstopp commented 6 years ago

So i understand the need for this, and good catch for the fact i didn't include the regex support originally.

Is it necessary to do the output via a puppet function? Is there any way we can just get the syntax for the farm defines type to either:

If we do need to have a puppet function, then it should be in a puppet_x module

bdhoine commented 6 years ago

I was thinking about this as well but I found out that the fact they are using single and double quotes in the config to determine the type did not make it easy to implement it in a nice way, lets keep this open and I will try to come up with a clever way to satisfy one of your points but I already thinked it through several times, any advice or suggestions here?

I never saw the Puppet module extension approach in any other modules, I will read the docs and come back later on this! Thanks for the input

cwoeltge commented 6 years ago

@bdhoine I got inspired by your approach but thought I don't like the "implicit" style of it too much. In fact, I don't like the Dispatcher.any approach of using the same parameter just with a different quote set too much first place, as it's the opposite as most other languages (where single quotes are to use it literally, double quotes to interpret) and not very easy to detect. In addition, I found sections uncovered for enhanced ruleset by the original code in the dispatcher.any.erb, where rules only supported simple glob as we still wanted more parameters. Pls. have a look at #122 as an alternative approach. It needs more documentation and updated tests tho.

bdhoine commented 5 years ago

duplicate of #112