lib/ra10ke/puppetfile_parser.rb in ra10ke-0.6.0 vs lib/ra10ke/puppetfile_parser.rb in ra10ke-0.6.1

- old
+ new

@@ -21,11 +21,11 @@ @modules ||= begin return [] unless File.exist?(puppetfile) all_lines = File.read(puppetfile).lines.map(&:strip_comment) # remove comments from all the lines - lines_without_comments = all_lines.reject { |line| line.match(/#.*\n/) }.join("\n").delete("\n") - lines_without_comments.split('mod').map do |line| + lines_without_comments = all_lines.reject { |line| line.match(/#.*\n/) }.join("\n") + lines_without_comments.split(/^mod/).map do |line| next nil if line =~ /^forge/ next nil if line.empty? parse_module_args(line) end.compact.uniq