Sha256: 7be911b51b468b0884cd1b7a46a8553b6b67bbf871b82e5244dd8ec62b3b2a3a

Contents?: true

Size: 1.14 KB

Versions: 11

Compression:

Stored size: 1.14 KB

Contents

# encoding: utf-8
module Warden
  module ManagerDeprecation
    class Dummy
      def update(type, &block)
        if type == :session
          warn "[DEPRECATION] warden.serializers.update(:session) is deprecated. " <<
               "Please use Warden::Manager.serialize_from_session and Warden::Manager.serialize_into_session"
          Warden::SessionSerializer.class_eval(&block)
        else
          method_missing(update)
        end
      end

      def method_missing(method, *args)
        warn "[DEPRECATION] warden.serializers.#{method} is deprecated."
        nil
      end
    end

    # Read the default scope from Warden
    def default_scope
      warn "[DEPRECATION] Warden::Manager.default_scope is deprecated. It's now accessible in the Warden::Manager instance."
    end

    # Set the default scope for Warden.
    def default_scope=(scope)
      warn "[DEPRECATION] Warden::Manager.default_scope= is deprecated. Please set it in the Warden::Manager instance."
    end

    def serializers
      warn "[DEPRECATION] warden.serializers is deprecated since Warden::Serializers were merged into Warden::Strategies."
      Dummy.new
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
warden-0.10.4 lib/warden/manager_deprecation.rb
warden-0.10.2 lib/warden/manager_deprecation.rb
warden-0.10.1 lib/warden/manager_deprecation.rb
warden-0.10.0 lib/warden/manager_deprecation.rb
warden-0.9.7 lib/warden/manager_deprecation.rb
warden-0.9.6 lib/warden/manager_deprecation.rb
warden-0.9.5 lib/warden/manager_deprecation.rb
warden-0.9.4 lib/warden/manager_deprecation.rb
warden-0.9.3 lib/warden/manager_deprecation.rb
warden-0.9.2 lib/warden/manager_deprecation.rb
warden-0.9.1 lib/warden/manager_deprecation.rb