lib/hanami/assets/config/sources.rb in hanami-assets-1.0.0.beta2 vs lib/hanami/assets/config/sources.rb in hanami-assets-1.0.0.rc1
- old
+ new
@@ -1,6 +1,7 @@
require 'hanami/utils/load_paths'
+require 'hanami/utils/file_list'
module Hanami
module Assets
# Configuration settings
#
@@ -53,10 +54,10 @@
# @since 0.1.0
# @api private
def files(name = nil)
result = []
- Dir.glob(map { |source| "#{source}#{::File::SEPARATOR}**#{::File::SEPARATOR}#{name}*" }).each do |file|
+ Utils::FileList[map { |source| "#{source}#{::File::SEPARATOR}**#{::File::SEPARATOR}#{name}*" }].each do |file|
next if ::File.directory?(file) || ::File.basename(file).start_with?(SKIPPED_FILE_PREFIX)
result << file
end
result