Sha256: eb69b0cf9c046fdb98f108f3dd476530aa918eb346fd5dd02c632ab75bebeca4

Contents?: true

Size: 628 Bytes

Versions: 6

Compression:

Stored size: 628 Bytes

Contents

#!/usr/bin/env ruby

require_relative '../lib/yaml-validator'
require 'colorize'

def main
  show_missing = true
  if ARGV.include? '--no-missing'
    show_missing = false 
    ARGV.delete '--no-missing'
  end

  root_path = '.'
  root_path = ARGV[0] if ARGV.length > 0
  
  puts "Validating #{root_path}...\n\n".colorize(:blue).underline
  validator = YamlValidator.new(root_path, :show_missing => show_missing)
  errors = validator.validate()
  puts errors
  
  if errors.length > 0
    puts "\nfound #{errors.length} error(s)".colorize(:red).underline
  else
    puts "no errors".colorize(:green).underline
  end
end

main()

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
yaml-validator-0.1.5 bin/yaml-validator
yaml-validator-0.1.4 bin/yaml-validator
yaml-validator-0.1.3 bin/yaml-validator
yaml-validator-0.1.2 bin/yaml-validator
yaml-validator-0.1.1 bin/yaml-validator
yaml-validator-0.1.0 bin/yaml-validator