I am trying to write a LWRP, and following the instructions, have something
basic working, now comes the hard part, making it do what I really want.
The main problem is I don’t want to duplicate code and so want to extend a
Provider that comes with Chef (RemoteFile), but a LWP gets a class dynamically
generated for it. Is there any way to specify that the generated class in a LWP
should extend another? I tried just plopping a whole ruby class (partially
included below) in the LWP file, but when run it fails complaining " FATAL:
NameError: uninitialized constant
#Class:0x1024a9888::Chef::Provider::RemoteFile" even though I had required
I can of course copy the methods from File and RemoteFile into my LWP, but I
don’t want to do that if I can avoid it.
Thank you in advance.
Code excerpt mentioned above:
class S3File < Chef::Provider::RemoteFile