Sha256: 81e3f581564467d76903626a52f0c6a7607b51d90e5c126e6f71f52e105b1553

Contents?: true

Size: 552 Bytes

Versions: 19

Compression:

Stored size: 552 Bytes

Contents

# encoding: utf-8

module Nanoc::Extra::Validators

  # @deprecated Use the Checking API or the `check` command instead
  class W3C

    def initialize(dir, types)
      @dir   = dir
      @types = types
    end

    def run
      args = []
      types = @types.dup
      args << 'html' if types.delete(:html)
      args << 'css'  if types.delete(:css)
      unless types.empty?
        raise Nanoc::Errors::GenericTrivial, "unknown type(s) specified: #{types.join(', ')}"
      end

      Nanoc::CLI.run([ 'check', args ].flatten)
    end

  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
nanoc-3.7.3 lib/nanoc/extra/validators/w3c.rb
nanoc-3.7.2 lib/nanoc/extra/validators/w3c.rb
nanoc-3.7.1 lib/nanoc/extra/validators/w3c.rb
nanoc-3.7.0 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.11 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.10 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.9 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.8 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.7 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.6 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.5 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.4 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.3 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.2 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.1 lib/nanoc/extra/validators/w3c.rb
nanoc-3.6.0 lib/nanoc/extra/validators/w3c.rb
nanoc-3.5.0 lib/nanoc/extra/validators/w3c.rb
nanoc-3.5.0b2 lib/nanoc/extra/validators/w3c.rb
nanoc-3.5.0b1 lib/nanoc/extra/validators/w3c.rb