Sha256: 6b4e65bd1468e831ed16856f6bdfd32c9d7b16629cd2bfa9d2fd8ce2212e3b95
Contents?: true
Size: 1007 Bytes
Versions: 9
Compression:
Stored size: 1007 Bytes
Contents
# encoding: utf-8 module LocalPac module Actions class ShowAvailableProxyPacFiles private attr_reader :repo, :options, :vcs_engine, :storage_path, :validator public def initialize(storage_path, options = {}, vcs_engine = GitStorage, validator = PacFileValidator.new) @options = options @vcs_engine = vcs_engine @storage_path = storage_path @validator = validator end def run begin @repo = vcs_engine.new(storage_path) rescue Rugged::OSError raise Exceptions::RepositoryDoesNotExist, "Sorry, but the repository at #{storage_path} does not exist" unless ::Dir.exists? storage_path end printf "%20s | %-20s | %-10s\n", 'Name', 'Path', 'Valid?' printf "%20s-+-%-20s-+-%-10s\n", '-' * 20, '-' * 20, '-' * 10 repo.each_pac_file do |f| printf "%20s | %-20s | %-10s\n", f.name, f.path, validator.valid?(f) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems