----- "Markus Roberts" <[email protected]> a écrit :

Hello Markus,


| I don't know enough about pkgin to give you feedback on that, but I
| can offer some more general suggestions on the patch with regards to
| the puppet process and ruby coding technique.  First, for submitting
| patches:
| 
| * Use spaces, not tabs, for indentation.  For the next few weeks the
| standard is four space indentation; with the release of Rowlf we will
| be switching to the more common two space indentation.

I have been told the same on IRC, I've setup my editor accordingly
 
| * Submit patches with the "rake email_patches" rake task, rather than
| as an attachment; inline patches are much more likely to get read and
| commented on.

Same thing :) As my first "git format-patch" produced 4838 patches I don't know 
what would have happened ;)

| * Include tests with the code; we're trying to maintain a policy of
| not accepting any new code without tests.  If you need examples to
| get
| you started, look in the spec directory.

I started to write test but I'm kinda stuck about it. Brice proposed to help me
about this :D
 
| If you need help on any of these things, feel free to ask.  This is
| in
| general a very helpful and supportive group.
| 
| Also, while our existing code base is a rich source of examples it is
| by no means as clear or concise as it could be.  Consider the
| "instances" method, which is structured very similarly to many other
| providers:
| 
| 1. Rather than initializing the hash at the top of the loop and then
| having to reinitialize it after each use, you could just initialize
| it
| before each use, but even better
| 2. Rather than initializing it and then setting the values you could
| just create it with the values in it like so:
| 

[ ... snip the many tips ... ]

| That's half the size of the original, and could be further simplified
| by doing more in the same vein.  The moral: use the existing code for
| examples, but feel free to improve upon, as there is plenty of room
| for improvement.

My ruby-fu needs improvement :) and I'm glad for the tips :)

Nico.

-- 
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.

Reply via email to