Re: [Puppet Users] any way to debug a Puppet custom function?

2016-09-20 Thread Trevor Vaughan
Hi Thomas,

This might help as a reference if you want to use rspec to test your
functions.
https://github.com/simp/pupmod-simp-simplib/tree/master/spec/functions

Thanks,

Trevor

On Mon, Sep 19, 2016 at 9:30 PM, Thomas Cheng 
wrote:

> Hi howdies,
>
>  Recently I'm picking up some legacy puppet codes in my new company. the
> puppet code base has custom functions written in ruby before.
>
> One major issue is: how to debug the custom functions to figure out the
> logic inside? Can I copy/paste into an external general ruby script and
> debug it with 'ruby -rdebug 

Re: [Puppet Users] any way to debug a Puppet custom function?

2016-09-19 Thread Martin Alfke
Hi Thomas,
> On 20 Sep 2016, at 03:30, Thomas Cheng  wrote:
> 
> Hi howdies,
> 
>  Recently I'm picking up some legacy puppet codes in my new company. the 
> puppet code base has custom functions written in ruby before.
> 
> One major issue is: how to debug the custom functions to figure out the logic 
> inside? Can I copy/paste into an external general ruby script and debug it 
> with 'ruby -rdebug 

[Puppet Users] any way to debug a Puppet custom function?

2016-09-19 Thread Thomas Cheng
Hi howdies,

 Recently I'm picking up some legacy puppet codes in my new company. the 
puppet code base has custom functions written in ruby before.

One major issue is: how to debug the custom functions to figure out the 
logic inside? Can I copy/paste into an external general ruby script and 
debug it with 'ruby -rdebug