Thanks Stefan for the guidance! I will do that. For point 3 , yes I did set that Ensurable . That's how the create function is working . I tried creating a dummy temp file in the "destroy" part and it didn't create the file. Infact the type currently has only Ensurable apart from a dummy name.
thanks Ranjan On Dec 7, 10:32 pm, Stefan Schulte <[email protected]> wrote: > On Mon, Dec 06, 2010 at 11:19:50PM -0800, Mrafa wrote: > > 1. Still finding it a bit hard to understand stuff > > like :parsed , :resource . I know that most of it is in Ruby , but I > > can't find make too much sense out of it right now. Whats a good place > > to start with this ? > > I would suggest to get a good ruby book. I think a good start is > The Ruby Programming Language, Ruby Best Practices and/or > Design Patterns in Ruby. At least these are the books that I like (In > fact these are also the onlyones I have...) > > > 2. What are good ways of debugging / testing something that you > > write ? > > The tool »irb« is quite good to test ruby behaviour,http://rubular.com > is a great site to test regular expressions and if you're writing code > for puppet you can use Puppet.debug("Reached interesting point") to > print messages. Writing specs is a good way to test your code. I think > there also is a ruby debugger somewhere where you can set breakpoints in > go through the code step by step. > > Writing types and providers can be quite hard. Try to look at simple > existant types/providers like sshkey. And maybe a look at type.rb and > provider.rb itself. > > > 3. The "destroy" method of my type is not being called once i set > > ensure to "absent" . Any reason why it should not be called since the > > documentation clearly says that its always called ? > > did you specify "ensurable" in your type? > > -Stefan > > application_pgp-signature_part > < 1KViewDownload -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
