def wraith_parse(browser)
        Dir.glob("#{@config.working_dir}/maximus_wraith_#{browser}/**/*").select { |f| File.file? f }.each do |file|
          extension = File.extname(file)
          next unless extension == '.png' || extension == '.txt'

          orig_label = File.dirname(file).split('/').last

          path = @settings[:paths][orig_label].to_s

          @output[:statistics][path] = {
            browser: browser.to_s,
            name: orig_label
          } if @output[:statistics][path].blank?

          browser_output = @output[:statistics][path]

          if extension == '.txt'
            browser_output = wraith_percentage(file, browser_output)
          else
            browser_output[:images] ||= []
            browser_output[:images] << wraith_image(file)
          end

        end
        @output
      end
def wraith_parse(browser)
        Dir.glob("#{@config.working_dir}/maximus_wraith_#{browser}/**/*").select { |f| File.file? f }.each do |file|
          extension = File.extname(file)
          next unless extension == '.png' || extension == '.txt'

          orig_label = File.dirname(file).split('/').last

          path = @settings[:paths][orig_label].to_s

          @output[:statistics][path] = {
            browser: browser.to_s,
            name: orig_label
          } if @output[:statistics][path].blank?

          browser_output = @output[:statistics][path]

          if extension == '.txt'
            browser_output = wraith_percentage(file, browser_output)
          else
            browser_output[:images] ||= []
            browser_output[:images] << wraith_image(file)
          end

        end
        @output
      end
Get a diff percentage of all changes by label and screensize

 @example { :statistics => { "/" => { :browser=>"phantomjs", :name=>"home", :percent_changed=>{ 1024=>2.1, 1280=>1.8, 767=>3.4 } } } }
 @param browser [String] headless browser used to generate the gallery
 @return [Hash] { path: { browser, path_label, percent_changed: { size: percent_diff ] } }