File: file_validators.rb

package info (click to toggle)
ruby-file-validators 3.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 388 kB
  • sloc: ruby: 1,601; makefile: 10
file content (15 lines) | stat: -rw-r--r-- 430 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

require 'active_model'
require 'ostruct'

module FileValidators
  extend ActiveSupport::Autoload
  autoload :Error
  autoload :MimeTypeAnalyzer
end

Dir[File.dirname(__FILE__) + '/file_validators/validators/*.rb'].each { |file| require file }

locale_path = Dir.glob(File.dirname(__FILE__) + '/file_validators/locale/*.yml')
I18n.load_path += locale_path unless I18n.load_path.include?(locale_path)