Open rmueck opened 10 years ago
I got several syntax errors:
root@puppet1:/usr/bin# ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [i486-linux]
root@puppet1:/usr/bin# puppet --version 3.6.2
root@puppet1:/usr/bin# ruby -c report_print.rb report_print.rb:40: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' ...= {:red => " return "%s%s%s%s" % [colors.fetch(code, ""), m... ... ^ report_print.rb:46: syntax error, unexpected tCONSTANT, expecting keyword_end puts color(:bold, "Report for %s in environment %s at ... ^ report_print.rb:46: syntax error, unexpected tIDENTIFIER, expecting tCOLON2 or '[' or '.' ..., "Report for %s in environment %s at %s" % [color(:underlin... ... ^ report_print.rb:46: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '(' ...ort for %s in environment %s at %s" % [color(:underline, rep... ... ^ report_print.rb:48: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Report File: %s" % @options[:report] ^ report_print.rb:49: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Report Kind: %s" % report.kind ^ report_print.rb:50: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Puppet Version: %s" % report.puppet_version ^ report_print.rb:51: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Report Format: %s" % report.report_format ^ report_print.rb:52: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Configuration Version: %s" % report.configuration_version ^ report_print.rb:53: syntax error, unexpected tCONSTANT, expecting keyword_end ... puts " UUID: %s" % report.transaction_uu... ... ^ report_print.rb:54: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Log Lines: %s %s" % [report.logs... ^ report_print.rb:65: syntax error, unexpected keyword_do_block, expecting keyword_end report.metrics.sort_by{|i, m| m.label}.each do |i, metric| ^ report_print.rb:65: syntax error, unexpected '|', expecting '=' report_print.rb:68: syntax error, unexpected keyword_do_block, expecting keyword_end metric.values.sort_by{|i, m, v| v}.reverse.each do |i, m, v| ^ report_print.rb:68: syntax error, unexpected '|', expecting '=' report_print.rb:73: syntax error, unexpected keyword_end, expecting $end
yeaah i'm also getting this error if i select and copy the raw
works better if you clone the repo instead of copying the file like above.
I got several syntax errors:
root@puppet1:/usr/bin# ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [i486-linux]
root@puppet1:/usr/bin# puppet --version 3.6.2
root@puppet1:/usr/bin# ruby -c report_print.rb report_print.rb:40: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' ...= {:red => " return "%s%s%s%s" % [colors.fetch(code, ""), m... ... ^ report_print.rb:46: syntax error, unexpected tCONSTANT, expecting keyword_end puts color(:bold, "Report for %s in environment %s at ... ^ report_print.rb:46: syntax error, unexpected tIDENTIFIER, expecting tCOLON2 or '[' or '.' ..., "Report for %s in environment %s at %s" % [color(:underlin... ... ^ report_print.rb:46: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '(' ...ort for %s in environment %s at %s" % [color(:underline, rep... ... ^ report_print.rb:48: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Report File: %s" % @options[:report] ^ report_print.rb:49: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Report Kind: %s" % report.kind ^ report_print.rb:50: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Puppet Version: %s" % report.puppet_version ^ report_print.rb:51: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Report Format: %s" % report.report_format ^ report_print.rb:52: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Configuration Version: %s" % report.configuration_version ^ report_print.rb:53: syntax error, unexpected tCONSTANT, expecting keyword_end ... puts " UUID: %s" % report.transaction_uu... ... ^ report_print.rb:54: syntax error, unexpected tCONSTANT, expecting keyword_end puts " Log Lines: %s %s" % [report.logs... ^ report_print.rb:65: syntax error, unexpected keyword_do_block, expecting keyword_end report.metrics.sort_by{|i, m| m.label}.each do |i, metric| ^ report_print.rb:65: syntax error, unexpected '|', expecting '=' report_print.rb:68: syntax error, unexpected keyword_do_block, expecting keyword_end metric.values.sort_by{|i, m, v| v}.reverse.each do |i, m, v| ^ report_print.rb:68: syntax error, unexpected '|', expecting '=' report_print.rb:73: syntax error, unexpected keyword_end, expecting $end