Jira (PUP-2318) Ruby open classes functionality breaks when used in ERB templates

2017-05-19 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-2318 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Ruby open classes functionality breaks when used in ERB templates  
 
 
 
 
 
 
 
 
 
 
Don't use the workaround!! Don't open Ruby classes and put stuff in them unless you are a system tool - it is as bad as monkeypatching! 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2318) Ruby open classes functionality breaks when used in ERB templates

2017-05-18 Thread Moses Mendoza (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Moses Mendoza updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-2318 
 
 
 
  Ruby open classes functionality breaks when used in ERB templates  
 
 
 
 
 
 
 
 
 

Change By:
 
 Moses Mendoza 
 
 
 

Labels:
 
 triaged 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2318) Ruby open classes functionality breaks when used in ERB templates

2017-05-16 Thread Maggie Dreyer (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Maggie Dreyer updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-2318 
 
 
 
  Ruby open classes functionality breaks when used in ERB templates  
 
 
 
 
 
 
 
 
 

Change By:
 
 Maggie Dreyer 
 
 
 

Labels:
 
 triaged 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2318) Ruby open classes functionality breaks when used in ERB templates

2014-05-05 Thread Felix Frank (JIRA)
Title: Message Title










 

 Felix Frank assigned an issue to Felix Frank


















 Puppet /  PUP-2318



  Ruby open classes functionality breaks when used in ERB templates 










Change By:

 Felix Frank




Assignee:

 FelixFrank












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2318) Ruby open classes functionality breaks when used in ERB templates

2014-05-05 Thread Felix Frank (JIRA)
Title: Message Title










 

 Felix Frank commented on an issue


















  Re: Ruby open classes functionality breaks when used in ERB templates 










I'm not sure about this one, but I do note that unlike the CLI, puppet will bind the template to a Puppet::Parser::TemplateWrapper instance (to enable access to puppet variables via @varname syntax etc.)
This likely leads to your code creating a nested Array class with a to_sudo method instead of adding to the array class.
And yay: I found a solution. Use this syntax



%
class ::Array
 def to_sudo
...















   

 Add Comment

























 Puppet /  PUP-2318



  Ruby open classes functionality breaks when used in ERB templates 







 {noformat}  %  class Array  def to_sudo  self.map{|i| /some/path/to/prepend/*/#{i} }.join(',')  end  end   command_list1 = %w (command1.sh command2.sh command3.sh).to_sudo  command_list2 = %w (command4.sh command5.sh command6.sh).to_sudo  %   Cmnd_Alias CMD1 = %= command_list1 %  Cmnd_Alias CMD2 = %= command_list2 %  {noformat}   The ERB te...















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 

 

Jira (PUP-2318) Ruby open classes functionality breaks when used in ERB templates

2014-05-05 Thread Felix Frank (JIRA)
Title: Message Title










 

 Felix Frank updated an issue


















 Puppet /  PUP-2318



  Ruby open classes functionality breaks when used in ERB templates 










Change By:

 Felix Frank




Assignee:

 FelixFrank MikeReznik












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2318) Ruby open classes functionality breaks when used in ERB templates

2014-05-05 Thread Felix Frank (JIRA)
Title: Message Title










 

 Felix Frank assigned an issue to Felix Frank


















 Puppet /  PUP-2318



  Ruby open classes functionality breaks when used in ERB templates 










Change By:

 Felix Frank




Assignee:

 FelixFrank












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-2318) Ruby open classes functionality breaks when used in ERB templates

2014-04-22 Thread Mike Reznik (JIRA)
Title: Message Title










 

 Mike Reznik created an issue


















 Puppet /  PUP-2318



  Ruby open classes functionality breaks when used in ERB templates 










Issue Type:

  Bug




Assignee:


 Unassigned




Created:


 22/Apr/14 6:13 AM




Priority:

  Normal




Reporter:

 Mike Reznik












%
class Array
 def to_sudo
  self.map{|i| /some/path/to/prepend/*/#{i} }.join(',')
 end
end

command_list1 = %w (command1.sh command2.sh command3.sh).to_sudo
command_list2 = %w (command4.sh command5.sh command6.sh).to_sudo
%

Cmnd_Alias CMD1 = %= command_list1 %
Cmnd_Alias CMD2 = %= command_list2 %



The ERB template above complies and produces the desired output when ran directly on command-line. However, when executed via Puppet, it produces the following error:


Detail: undefined method `to_sudo' for #Array:0x7fe8e50fd680















   

 Add Comment





   

Jira (PUP-2318) Ruby open classes functionality breaks when used in ERB templates

2014-04-22 Thread Mike Reznik (JIRA)
Title: Message Title










 

 Mike Reznik updated an issue


















 Puppet /  PUP-2318



  Ruby open classes functionality breaks when used in ERB templates 










Change By:

 Mike Reznik









 {noformat}%classArraydefto_sudoself.map{|i|/some/path/to/prepend/*/#{i}}.join(',')endendcommand_list1=%w(command1.shcommand2.shcommand3.sh).to_sudocommand_list2=%w(command4.shcommand5.shcommand6.sh).to_sudo%Cmnd_AliasCMD1=%=command_list1%Cmnd_AliasCMD2=%=command_list2%{noformat}TheERBtemplateabovecompliesandproducesthedesiredoutputwhen ran run directlyoncommand-line.However,whenexecutedviaPuppet,itproducesthefollowingerror:{noformat}Detail:undefinedmethod`to_sudo'for#Array:0x7fe8e50fd680{noformat}












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)




 














-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.