lib/reek/source/source_locator.rb in reek-3.2.1 vs lib/reek/source/source_locator.rb in reek-3.3.0

- old
+ new

@@ -1,5 +1,6 @@ +require 'private_attr/everywhere' require 'find' require 'pathname' module Reek module Source @@ -9,11 +10,11 @@ # @api private class SourceLocator # Initialize with the paths we want to search. # # paths - a list of paths as Strings - def initialize(paths, configuration: Configuration::AppConfiguration.new) + def initialize(paths, configuration: Configuration::AppConfiguration.default) @paths = paths.flat_map do |string| path = Pathname.new(string) current_directory?(path) ? path.entries : path end @configuration = configuration @@ -43,10 +44,10 @@ end end end def path_excluded?(path) - configuration.exclude_paths.include?(path) + configuration.path_excluded?(path) end def print_no_such_file_error(path) $stderr.puts "Error: No such file - #{path}" end