module AmpHtml class Test def self.all markup html css end def self.markup strings = [' " + complete_path + ":" + line_number.to_s # @results[source] = string # end # end # else # # Search child directories # search_files_in_dir_for(complete_path, strings) # end # end require 'pathname' @results = {} files, dirs = Pathname.glob(File.join(dir, '**/*')).partition &:file? files.each do |file| # puts "AMP-HTML TEST: Testing '#{file}'" line_number = 0 IO.foreach(file) do |line| line_number = line_number + 1 if strings.any? { |string| line.include?(string) } string = strings.detect { |string| line.include?(string) } source = '=> ' + [file, line_number].join(':') @results[source] = string end end end if @results.present? return @results else return nil end end def self.markup_test results if results.present? puts check1 = IO.read(File.join AmpHtml.root, 'amp_html', 'test', 'templates', 'markup', 'meta_viewport.md') unless results.has_value? '