voxpupuli / puppet-augeas

Helper for using augeas with puppet
Apache License 2.0
43 stars 82 forks source link

Include augeas 'super' class when not declared. #45

Closed jordiclariana closed 8 years ago

jordiclariana commented 9 years ago

This change should be retrocompatible with already declared augeas classes with parameters and solves problems that I found using the postfix module.

The point is you should'nt have to instance augeas class because you are using postfix. It should do it itself when needed.

mcanevet commented 9 years ago

@jordiclariana maybe the include should be done in the postfix module because doing it in augeas::lens mey lead to duplicate declarations if you already have declared the init class with parameters.

@raphink what do you think?

jordiclariana commented 9 years ago

It's safe to use include several times, (https://docs.puppetlabs.com/puppet/3.7/reference/lang_classes.html#using-include), and in the case that you already have the augeas class declared with parameters, the include is not executed (I already tested it)

jordiclariana commented 9 years ago

I've seen the travis error. I'll fix it if you agree with this change.

raphink commented 9 years ago

@jordiclariana sorry for the delay in getting back to you.

I'm ok with that change. Could you please fix travis and rebase/squash, and I'll merge. Thank you!

lingfish commented 8 years ago

Hi, wondering when this fix will hit a release?

raphink commented 8 years ago

@lingfish @jordiclariana the unit tests don't pass on this PR.

raphink commented 8 years ago

Merged as dc09c4eb2808f39d61e2ddd9ef6e7d67d73aad93 and tests fixed as 108205b8915af54bcac8d6805c3d910759b2c063