Sha256: 20e054b59f9118ec6c185493764c042a1386c55f97263cd3f1c7c844590e5d9b
Contents?: true
Size: 1.53 KB
Versions: 16
Compression:
Stored size: 1.53 KB
Contents
# encoding: utf-8 require 'rake/helpers/filelist' require 'rake/common/logger' module Rake module Delphi class LibList < FileList def read_ignored_libs libs = [] file = (ENV['RAKE_DIR'] || Rake.original_dir) + '/.rake.ignored.libs' unless File.exists?(file) Logger.trace(Logger::TRACE, "File #{file} not found") return libs end Logger.trace(Logger::TRACE, "Reading #{file}") IO.readlines(file).each do |line| # skip comment lines (started with # or ;) if /^\s*[#;]/.match(line) Logger.trace(Logger::TRACE, "Line #{line} ignored as a comment") next end libs << FileList.get_ignored_dir_pattern(line.chomp) end libs end alias_method :initialize_base, :initialize def initialize(*patterns) initialize_base(patterns) @exclude_patterns_libs = read_ignored_libs @exclude_procs << proc do |fn| ! File.directory?(fn) end << proc do |fn| @exclude_patterns_libs.any? do |pat| match = fn =~ pat Logger.trace(Logger::TRACE, "Dir #{fn} match pattern /#{pat}/. Ignored") if match match end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems