Issue #593 has been updated by Jeff McCune.

Felix Frank wrote:
> Jeff,
> 
> thanks for following up on both ends. I'm still not sure if I'm on the right 
> track wrt. variable scoping, but I'll just try and access everything via 
> "self." if possible.

In these examples the methods you've added are class methods and not instance 
methods.  This should help understand how the scope comes into place.  This 
tutorial seems to be a pretty good description of the various scope 
considerations in Ruby: <http://marakana.com/bookshelf/ruby_tutorial/scope.html>

> I'd love to introduce tests, as a matter of fact. I had a hard time getting 
> my head around the whole topic, so the pointers are most appreciated!

Sure thing, please start with those files I mentioned and see if you can add 
some examples to the existing example groups contained in those files.  As you 
run into questions I'll be happy to review the code if you have it pushed to a 
topic branch or something.

> API documentation resides in rdoc, right? I shall try and update the 
> pertaining sections.

We're actually using YARD for API documentation, not rdoc.  Since you're adding 
a method that parse file providers are meant to override please include the 
@api public keyword.  A list of YARD tags is available at: 
<http://rubydoc.info/docs/yard/file/docs/Tags.md>  Finally, you might want to 
look at some of the recent commits to Facter and Puppet from Henrik and Patrick 
for some recent examples of patches that add YARD documentation to the codebase.

----------------------------------------
Bug #593: Puppet's cron type struggles with vixie-cron
https://projects.puppetlabs.com/issues/593#change-80677

Author: Peter Abrahamsen
Status: Tests Insufficient
Priority: Normal
Assignee: 
Category: cron
Target version: 
Affected Puppet version: 0.25.1
Keywords: cronfixit
Branch: 


After making a few changes to my cron job in my manifest, my crontab begins to 
look like:
<pre>
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Thu Apr 12 12:16:01 2007)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
# HEADER This file was autogenerated at Thu Apr 12 12:16:01 -0700 2007 by 
puppet.
# HEADER While it can still be managed manually, it is definitely 
notrecommended.
# HEADER Note particularly that the comments starting with 'Puppet Name' should
# HEADER not be deleted, as doing so could cause duplicate cron jobs.
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Wed Apr 11 16:42:40 2007)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Tue Apr 10 13:49:45 2007)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Thu Apr  5 17:36:42 2007)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.XXXXWxMPKB installed on Thu Apr  5 17:08:07 2007)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
# Puppet Name: websync
*/10 * * * * <snip>
</pre>
If puppet would put its notice just before the first job it manages, I think it 
would avoid this problem.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to