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

Attachment: pgpWeJ9exib0R.pgp
Description: PGP signature

Reply via email to