Sha256: 4d3590de9b926f054e1baddf47ae39274f872bda24485966a60d2a9bc5631dfd
Contents?: true
Size: 1.3 KB
Versions: 40
Compression:
Stored size: 1.3 KB
Contents
module Bake class ProjectFilter def initialize(options) @@filterList = nil @@valid = nil @@options = options end def self.projects calcFilter_internal() if @@filterList.nil? return @@filterList end def self.is_valid? calcFilter_internal() if @@valid.nil? return @@valid end def self.localFile(str) return true if (not is_valid?) || (not @@options.qacfilefilter) projects.any? { |fil| str.include?(fil+"/") && !str.include?(fil+"/test/") && !str.include?(fil+"/mock/") && !str.include?(fil+"/.qacdata/") && !str.include?("/mergedIncludes") } end def self.writeFilter(filter) filter_filename = "#{@@options.qacdata}/filter.txt" File.open(filter_filename, "w+") do |f| filter.uniq! filter.delete_if { |f| (f.end_with? "/gtest") or (f.end_with? "/gmock") } f.puts(filter) end end def self.calcFilter_internal @@filterList = [] filter_filename = "#{@@options.qacdata}/filter.txt" @@valid = File.exist?(filter_filename) if @@valid File.open(filter_filename, "r") do |f| f.each_line { |line| @@filterList << line.strip } end end end end end
Version data entries
40 entries across 40 versions & 1 rubygems