require 'active_model' require 'active_support' require 'yukonisuru/version' require 'yukonisuru/validators/alpha_validator' require 'yukonisuru/validators/alpha_numeric_validator' require 'yukonisuru/validators/base64_validator' require 'yukonisuru/validators/boolean_validator' require 'yukonisuru/validators/credit_card_validator' require 'yukonisuru/validators/currency_validator' require 'yukonisuru/validators/cusip_validator' require 'yukonisuru/validators/email_validator' require 'yukonisuru/validators/equality_validator' require 'yukonisuru/validators/gtin_validator' require 'yukonisuru/validators/hex_validator' require 'yukonisuru/validators/imei_validator' require 'yukonisuru/validators/ip_validator' require 'yukonisuru/validators/isbn_validator' require 'yukonisuru/validators/isin_validator' require 'yukonisuru/validators/latitude_validator' require 'yukonisuru/validators/longitude_validator' require 'yukonisuru/validators/mac_address_validator' require 'yukonisuru/validators/name_validator' require 'yukonisuru/validators/password_validator' require 'yukonisuru/validators/phone_validator' require 'yukonisuru/validators/sedol_validator' require 'yukonisuru/validators/slug_validator' require 'yukonisuru/validators/ssn_validator' require 'yukonisuru/validators/url_validator' require 'yukonisuru/validators/username_validator' require 'yukonisuru/validators/uuid_validator' if defined?(RSpec) require 'rspec/matchers' require 'yukonisuru/matchers/ensure_valid_alpha_format_of' require 'yukonisuru/matchers/ensure_valid_alpha_numeric_format_of' require 'yukonisuru/matchers/ensure_valid_base64_format_of' require 'yukonisuru/matchers/ensure_valid_boolean_format_of' require 'yukonisuru/matchers/ensure_valid_credit_card_format_of' require 'yukonisuru/matchers/ensure_valid_currency_format_of' require 'yukonisuru/matchers/ensure_valid_cusip_format_of' require 'yukonisuru/matchers/ensure_valid_email_format_of' require 'yukonisuru/matchers/ensure_valid_equality_matcher_of' require 'yukonisuru/matchers/ensure_valid_gtin_format_of' require 'yukonisuru/matchers/ensure_valid_hex_format_of' require 'yukonisuru/matchers/ensure_valid_imei_format_of' require 'yukonisuru/matchers/ensure_valid_ip_format_of' require 'yukonisuru/matchers/ensure_valid_isbn_format_of' require 'yukonisuru/matchers/ensure_valid_isin_format_of' require 'yukonisuru/matchers/ensure_valid_latitude_format_of' require 'yukonisuru/matchers/ensure_valid_longitude_format_of' require 'yukonisuru/matchers/ensure_valid_mac_address_format_of' require 'yukonisuru/matchers/ensure_valid_name_format_of' require 'yukonisuru/matchers/ensure_valid_password_format_of' require 'yukonisuru/matchers/ensure_valid_phone_format_of' require 'yukonisuru/matchers/ensure_valid_sedol_format_of' require 'yukonisuru/matchers/ensure_valid_slug_format_of' require 'yukonisuru/matchers/ensure_valid_ssn_format_of' require 'yukonisuru/matchers/ensure_valid_url_format_of' require 'yukonisuru/matchers/ensure_valid_username_format_of' require 'yukonisuru/matchers/ensure_valid_uuid_format_of' end if defined?(Rails) require 'rails' module Yukonisuru class Railtie < ::Rails::Railtie initializer 'yukonisuru' do |app| Yukonisuru::Railtie.instance_eval do locales = locales_from(app.config.i18n.available_locales) locales.each do |locale| if File.file?(path(locale)) I18n.load_path << path(locale) end end end end protected def self.path(locale) File.expand_path("../../config/locales/#{locale}.yml", __FILE__) end def self.locales_from(args) array = Array(args || []) array.blank? ? '*' : array end end end end