Sha256: 7c7e1df7da83c3d7df0d99f639cded3f66f551c5cf0c427fe6700e76e8d3cb72
Contents?: true
Size: 903 Bytes
Versions: 2
Compression:
Stored size: 903 Bytes
Contents
# encoding: utf-8 module ProxyPacRb module Cli # Find proxy for url class LintProxyPac < Thor::Group include Shared class_option :proxy_pac, type: :array, desc: 'Proxy.pac-file(s)', aliases: '-p', required: true def pre_init enable_debug_mode end def set_variables @proxy_pacs = options[:proxy_pac].map { |p| ProxyPacFile.new source: p } @loader = ProxyPacLoader.new @linter = ProxyPacLinter.new end def test_proxy_pac @proxy_pacs.each do |p| @loader.load(p) @linter.lint(p) if p.valid? $stderr.puts %(proxy.pac "#{p.source}" is of type #{p.type} and is valid.) true else $stderr.puts %(proxy.pac "#{p.source}" is of type #{p.type} and is invalid.) false end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
proxy_pac_rb-0.4.2 | lib/proxy_pac_rb/cli/lint_proxy_pac.rb |
proxy_pac_rb-0.4.0 | lib/proxy_pac_rb/cli/lint_proxy_pac.rb |