Sha256: a845799257e8ab8e41441550db91bf640b6f0e103f92d0067a91ab54eb68f781

Contents?: true

Size: 913 Bytes

Versions: 83

Compression:

Stored size: 913 Bytes

Contents

module Recog
class Verifier
  attr_reader :fingerprints, :reporter

  def initialize(fingerprints, reporter)
    @fingerprints = fingerprints
    @reporter = reporter
  end

  def verify
    reporter.report(fingerprints.count) do
      fingerprints.each do |fp|
        reporter.print_name fp

        fp.verify_params do |status, message|
          case status
          when :warn
            reporter.warning "WARN: #{message}"
          when :fail
            reporter.failure "FAIL: #{message}"
          when :success
            reporter.success(message)
          end
        end
        fp.verify_tests do |status, message|
          case status
          when :warn
            reporter.warning "WARN: #{message}"
          when :fail
            reporter.failure "FAIL: #{message}"
          when :success
            reporter.success(message)
          end
        end
      end
    end
  end
end
end

Version data entries

83 entries across 83 versions & 2 rubygems

Version Path
recog-2.1.12 lib/recog/verifier.rb
recog-2.1.11 lib/recog/verifier.rb
recog-2.1.10 lib/recog/verifier.rb
recog-2.1.9 lib/recog/verifier.rb
recog-2.1.8 lib/recog/verifier.rb
recog-2.1.7 lib/recog/verifier.rb
recog-2.1.6 lib/recog/verifier.rb
recog-2.1.5 lib/recog/verifier.rb
recog-2.1.4 lib/recog/verifier.rb
recog-2.1.3 lib/recog/verifier.rb
recog-2.1.2 lib/recog/verifier.rb
recog-2.1.1 lib/recog/verifier.rb
recog-2.1.0 lib/recog/verifier.rb
recog-2.0.24 lib/recog/verifier.rb
recog-2.0.23 lib/recog/verifier.rb
recog-2.0.22 lib/recog/verifier.rb
recog-2.0.21 lib/recog/verifier.rb
recog-2.0.20 lib/recog/verifier.rb
recog-2.0.19 lib/recog/verifier.rb
recog-2.0.18 lib/recog/verifier.rb