Sha256: a54d2a2d87643c22f17bfe62703262fa0d46c8da188a1f6794c2f53e670f4708
Contents?: true
Size: 594 Bytes
Versions: 1
Compression:
Stored size: 594 Bytes
Contents
require 'multi_sync/source' require 'multi_sync/resources/local_resource' module MultiSync class LocalSource < Source def files files = [] # create a local_resource from each file # making sure to skip any that do not match the include/exclude patterns included_files = Dir.glob(source_dir + include) excluded_files = exclude.nil? ? [] : Dir.glob(source_dir + exclude) (included_files - excluded_files).lazily.each { |path| next if File.directory?(path) files << path_to_local_resource(path) } files.sort end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
multi_sync-0.0.3 | lib/multi_sync/sources/local_source.rb |