lib/sanitize_email/config.rb in sanitize_email-1.1.6 vs lib/sanitize_email/config.rb in sanitize_email-1.1.7
- old
+ new
@@ -1,9 +1,11 @@
-# Copyright (c) 2008-13 Peter H. Boling of RailsBling.com
+# Copyright (c) 2008-15 Peter H. Boling of RailsBling.com
# Released under the MIT license
module SanitizeEmail
+ # The API for configuring SanitizeEmail is via `SanitizeEmail.config`
+ # Available configuration options are listed in the `DEFAULTS`` constant.
class Config
extend SanitizeEmail::Deprecation
class << self
@@ -58,13 +60,16 @@
#Won't actually be set with any value,
# because we are still inside the configure block.
@config[:sanitized_to] = @config[:sanitized_recipients]
end
if !@config[:force_sanitize].nil?
- replacement = "
- Please use SanitizeEmail.force_sanitize or SanitizeEmail.sanitary instead.
- Refer to https://github.com/pboling/sanitize_email/wiki for examples."
- deprecation("SanitizeEmail::Config.config[:force_sanitize]", replacement)
+ deprecation_warning_message(
+ <<-EOS
+ SanitizeEmail::Config.config[:force_sanitize] is deprecated.
+ Please use SanitizeEmail.force_sanitize or SanitizeEmail.sanitary instead.
+ Refer to https://github.com/pboling/sanitize_email/wiki for examples.
+ EOS
+ )
SanitizeEmail.force_sanitize = @config[:force_sanitize]
end
end
end