lib/nanoc/data_sources/filesystem/tools.rb in nanoc-4.11.12 vs lib/nanoc/data_sources/filesystem/tools.rb in nanoc-4.11.13
- old
+ new
@@ -4,11 +4,11 @@
# Contains useful functions for managing the filesystem.
#
# @api private
module Tools
# Error that is raised when too many symlink indirections are encountered.
- class MaxSymlinkDepthExceededError < ::Nanoc::Int::Errors::GenericTrivial
+ class MaxSymlinkDepthExceededError < ::Nanoc::Core::TrivialError
# @return [String] The last filename that was attempted to be
# resolved before giving up
attr_reader :filename
# @param [String] filename The last filename that was attempted to be
@@ -19,11 +19,11 @@
end
end
# Error that is raised when a file of an unknown type is encountered
# (something other than file, directory or link).
- class UnsupportedFileTypeError < ::Nanoc::Int::Errors::GenericTrivial
+ class UnsupportedFileTypeError < ::Nanoc::Core::TrivialError
# @return [String] The filename of the file whose type is not supported
attr_reader :filename
# @param [String] filename The filename of the file whose type is not
# supported
@@ -91,11 +91,11 @@
# to extend the file search for files not found by default, example
# "**/.{htaccess,htpasswd}"
#
# @return [Array<String>] A list of files and directories
#
- # @raise [GenericTrivial] when pattern can not be handled
+ # @raise [Nanoc::Core::TrivialError] when pattern can not be handled
def all_files_and_dirs_in(dir_name, extra_files)
base_patterns = ["#{dir_name}/**/*"]
extra_patterns =
case extra_files
@@ -105,10 +105,10 @@
["#{dir_name}/#{extra_files}"]
when Array
extra_files.map { |extra_file| "#{dir_name}/#{extra_file}" }
else
raise(
- Nanoc::Int::Errors::GenericTrivial,
+ Nanoc::Core::TrivialError,
"Do not know how to handle extra_files: #{extra_files.inspect}",
)
end
patterns = base_patterns + extra_patterns