lib/git_local/repository.rb in git_local-0.0.5 vs lib/git_local/repository.rb in git_local-0.0.6

- old
+ new

@@ -25,11 +25,11 @@ def file_objects(file_path = nil) repo_path = file_path.nil? ? path : File.join(path, file_path) searchable_repo_path = repo_path.end_with?("/") ? repo_path : "#{repo_path}/" Dir.glob("#{searchable_repo_path}*").each_with_object([]) do |filename, git_files| - next if %w(. ..).include?(filename) || File.extname(filename) == ".zip" || File.directory?(filename) + next if %w[. ..].include?(filename) || File.extname(filename) == ".zip" || File.directory?(filename) git_files << GitLocal::Object.new(filename) end end @@ -64,10 +64,10 @@ def path @path ||= "#{local_directory}/#{org_repo_branch}" end def check_for_special_characters(*args) - regexp = Regexp.new(/([A-Za-z0-9\-\_\/#]+)/) + regexp = Regexp.new(/([A-Za-z0-9\-\_\.\/#]+)/) args.each do |arg| raise InvalidArgument unless arg.gsub(regexp, "").empty? end end